EttusResearch / gr-ettus

Out-of-tree GNU Radio Module for Experimental Ettus Research Features
Other
48 stars 44 forks source link

Building gr-ettus for e310 (cross compiling)(gnuradio3.8 UHDv4) error in cmake generation #53

Open Arshamza opened 3 years ago

Arshamza commented 3 years ago

Hi every one I am building gr-ettus for e310 using e3xx_e310_sdk_default-v4.0.0.0(source environment-setup-cortexa9t2hf-neon-oe-linux-gnueabi) after initiating the environment I use cmake with these var: cmake -DCMAKE_TOOLCHAIN_FILE=~/rfnocv4/src/gnuradio/cmake/Toolchains/oe-sdk_cross.cmake -DCMAKE_INSTALL_PREFIX=/usr ../ but it stop with error about not finding "gnuradio::runtime_swig: sample of terminal output: -- Checking for module SWIG -- Found SWIG version 3.0.12. -- Found SWIG: /usr/bin/swig3.0
-- Found PythonLibs: /home/ali/rfnocv4/oe/sysroots/cortexa9t2hf-neon-oe-linux-gnueabi/usr/lib/libpython2.7.so (found suitable version "2.7.17", minimum required is "2") -- User set python executable /usr/bin/python2.7 -- Found PythonLibs: /home/ali/rfnocv4/oe/sysroots/cortexa9t2hf-neon-oe-linux-gnueabi/usr/lib/libpython2.7.so (found suitable exact version "2.7.17") -- User set python executable /usr/bin/python2.7 -- Configuring done CMake Error at /home/ali/rfnocv4/oe/sysroots/cortexa9t2hf-neon-oe-linux-gnueabi/usr/lib/cmake/gnuradio/UseSWIG.cmake:418 (add_custom_command): Error evaluating generator expression:

$<TARGET_PROPERTY:gnuradio::runtime_swig,INTERFACE_INCLUDE_DIRECTORIES>

Target "gnuradio::runtime_swig" not found. Call Stack (most recent call first): /home/ali/rfnocv4/oe/sysroots/cortexa9t2hf-neon-oe-linux-gnueabi/usr/lib/cmake/gnuradio/UseSWIG.cmake:559 (SWIG_ADD_SOURCE_TO_MODULE) /home/ali/rfnocv4/oe/sysroots/cortexa9t2hf-neon-oe-linux-gnueabi/usr/lib/cmake/gnuradio/GrSwig.cmake:137 (swig_add_library) swig/CMakeLists.txt:58 (GR_SWIG_MAKE)

CMake Error at /home/ali/rfnocv4/oe/sysroots/cortexa9t2hf-neon-oe-linux-gnueabi/usr/lib/cmake/gnuradio/UseSWIG.cmake:418 (add_custom_command): Error evaluating generator expression:

$<TARGET_PROPERTY:gnuradio::runtime_swig,INTERFACE_INCLUDE_DIRECTORIES>

Target "gnuradio::runtime_swig" not found. Call Stack (most recent call first): /home/ali/rfnocv4/oe/sysroots/cortexa9t2hf-neon-oe-linux-gnueabi/usr/lib/cmake/gnuradio/UseSWIG.cmake:559 (SWIG_ADD_SOURCE_TO_MODULE) /home/ali/rfnocv4/oe/sysroots/cortexa9t2hf-neon-oe-linux-gnueabi/usr/lib/cmake/gnuradio/GrSwig.cmake:137 (swig_add_library) swig/CMakeLists.txt:58 (GR_SWIG_MAKE) .....

CMake Error at /home/ali/rfnocv4/oe/sysroots/cortexa9t2hf-neon-oe-linux-gnueabi/usr/lib/cmake/gnuradio/GrSwig.cmake:144 (target_include_directories): Error evaluating generator expression:

$<TARGET_PROPERTY:gnuradio::runtime_swig,INTERFACE_INCLUDE_DIRECTORIES>

Target "gnuradio::runtime_swig" not found. Call Stack (most recent call first): swig/CMakeLists.txt:58 (GR_SWIG_MAKE)

-- Generating done CMake Generate step failed. Build files cannot be regenerated correctly. terminaloutput.txt

thanks.

mgarrett1955 commented 3 years ago

Im having this same error, seems like a python 2.7,3.7 and 3.8 issue, and missing path to the oe SDK directory?

Here are the installation sequence: and error output.

gr-ettus-cmake-error.txt

Here is the installation process starting with a fresh Ubuntu 20 VM. Includes, UHD 4.0, Volk, gnuradio all host and arm compiled, gr-ettus builds on the host, but does not cross compile, due to CMAKE not finding correct python versions and paths into the SDK..

VM using Ubuntu 20.04LTS-gr-ettus issue.txt

mgarrett1955 commented 3 years ago

I also just noticed that the build-host install (native linux) does not show up in gnuradio, not sure why, paths look ok..

Arshamza commented 3 years ago

I dig a bit further and find this from the error we know CMake Error at /home/ali/rfnocv4/oe/sysroots/cortexa9t2hf-neon-oe-linux-gnueabi/usr/lib/cmake/gnuradio/UseSWIG.cmake:418 (add_custom_command): Error evaluating generator expression:

$<TARGET_PROPERTY:gnuradio::runtime_swig,INTERFACE_INCLUDE_DIRECTORIES>

and then when cmake call other generation because it didn't populate the directory of swig runtime other module build create error as well, that we didn't find swig this error come from ~/rfnoc/src/gr-ettus/swig/CmakeLists.txt in line 44 there is something wrong about this code 43>> set(GR_SWIG_INCLUDE_DIRS $<TARGET_PROPERTY:gnuradio::runtime_swig,INTERFACE_INCLUDE_DIRECTORIES> ${UHD_INCLUDE_DIRS} it can not update GR_SWIG_INCLUDE_DIRS then it makes other cmakelists to miss runtime_swig why there is error in evaluating generator expression of this line ? it works as long as you use -DUHD_INCLUDE_DIRS=/.. in your top cmake (for host ) but it cannot work with toolchain I think it comes from $<TARGET_PROPERTY:gnuradio::runtime_swig,INTERFACE_INCLUDE_DIRECTORIES> how I correct it ? thanks.