Thanks for the reply. I tried the CMake approach following the steps you
mentioned but received an error when building.
First, I created CMakeLists which is pretty simple as shown below
cmake_minimum_required(VERSION 3.10)
#set the project name
project(Tutorial)
#add the executable
add_executable(replay_example rfnoc_replay_samples_1_from_file.cpp)
Then, I sourced the file, and set the flag for CMake. Lastly, inside of a build
directory, I tried building the App and got the following printout
/usr/local/share/uhd/images/y/sysroots/x86_64-oesdk-linux/usr/libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/9.2.0/real-ld:
CMakeFiles/replay_example.dir/rfnoc_replay_samples_1_from_file.cpp.o:(.rodata._ZTVN5boost15program_options11typed_valueIjcEE[_ZTVN5boost15program_options11typed_valueIjcEE]+0x1c):
undefined reference to
`boost::program_options::value_semantic_codecvt_helper<char>::parse(boost::any&,
std::vector<std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > > > const&, bool) const'
/usr/local/share/uhd/images/y/sysroots/x86_64-oesdk-linux/usr/libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/9.2.0/real-ld:
CMakeFiles/replay_example.dir/rfnoc_replay_samples_1_from_file.cpp.o:(.rodata._ZTVN5boost15program_options11typed_valueIdcEE[_ZTVN5boost15program_options11typed_valueIdcEE]+0x1c):
undefined reference to
`boost::program_options::value_semantic_codecvt_helper<char>::parse(boost::any&,
std::vector<std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > > > const&, bool) const'
collect2: error: ld returned 1 exit status
CMakeFiles/replay_example.dir/build.make:83: recipe for target 'replay_example'
failed
make[2]: *** [replay_example] Error 1
CMakeFiles/Makefile2:75: recipe for target 'CMakeFiles/replay_example.dir/all'
failed
make[1]: *** [CMakeFiles/replay_example.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
I'm not sure if this is a boost issue or something else.
On Tuesday, August 24, 2021, 07:21:17 PM EDT, Jonathon Pendlum
<[email protected]> wrote:
Hi Tellrell,
Do not use the Xilinx SDK, only the Yocto one, i.e.
/usr/local/share/uhd/images/y/sysroots/cortexa9t2hf-neon-oe-linux-gnueabi
You need to source the "environment-setup-cortexa9t2hf-neon-oe-linux-gnueabi"
file before cross compiling. If you use cmake with building your application,
you also need to set the flag "-DCMAKE_TOOLCHAIN_FILE=<path to
UHD>/host/cmake/Toolchains/oe-sdk_cross.cmake".
Also, if you just want to run the UHD example, it already exists on the N310's
root file system at: /usr/lib/uhd/examples/rfnoc_replay_samples_from_file
Jonathon
On Tue, Aug 24, 2021 at 4:42 PM Tellrell White via USRP-users
<[email protected]> wrote:
I'm trying to compile the source code using SDK 2019.1. I'm pointing the the
SDK project to the directory for sysroot and also to the directory for my linux
toolchain which are the following
/usr/local/share/uhd/images/y/sysroots/cortexa9t2hf-neon-oe-linux-gnueabi
/tools/Xilinx/SDK/2019.1/gnu/aarch32/lin/gcc-arm-linux-gnueabi/arm-linux-gnueabihf
I continue to get the following error stating that these files can't be found,
however, they do exist. And, when I try adding them within the project and
refreshing nothing happens.
cannot find /lib/ld-linux-armhf.so.3
cannot find /lib/libc.so.6
cannot find /usr/lib/libc_nonshared.a
Am I going about building this application correctly? I thought that linking my
project to sysroot which I installed for the n310 and to the SDK toolchain(
maybe I'm doing this incorrectly) would be pretty straightforward.
On Tuesday, August 24, 2021, 12:41:05 PM EDT, Marcus D. Leech
<[email protected]> wrote:
On 2021-08-24 12:08 p.m., Tellrell White wrote:
Yep. Marcus you caught it!! That worked. Do I need to complete the sections on
"Compiling MPM Natively" and "Building UHD"?? I understand that I need the
cross-compiler for compiling SW for the device but I don't see the need for
completing the other two parts. Is there something additional that needs to be
done other than cross compiling on the host machine and ssh'ing over the
executable?
As far as I know, you should be able to just cross-compile the code you're
interested in.
_______________________________________________
USRP-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
_______________________________________________
USRP-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]