Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gr_ettus cmake error #51

Closed
hdtuanss opened this issue Dec 4, 2020 · 9 comments
Closed

Gr_ettus cmake error #51

hdtuanss opened this issue Dec 4, 2020 · 9 comments

Comments

@hdtuanss
Copy link

hdtuanss commented Dec 4, 2020

Hi,
I'm trying to install gr_ettus on my Ubuntu 18.04, I have already completed the installation of UHD 4.0 and GNURadio 3.9.
When I tried to cmake ../ at the build folder of fr_ettus, the result as below:

_pc@pc-All-Series:~/rfnoc/src/gr-ettus/build-host$ cmake ..
-- Checking for module 'gmp'
-- No package 'gmp' found
-- Checking for module 'mpir >= 3.0'
-- No package 'mpir' found
-- Could NOT find MPIR (missing: MPIRXX_LIBRARY MPIR_INCLUDE_DIR)
-- Boost version: 1.65.1
-- Found the following Boost libraries:
-- date_time
-- program_options
-- filesystem
-- system
-- regex
-- thread
-- chrono
-- atomic
-- User set python executable /usr/bin/python3.6
-- Found PythonInterp: /usr/bin/python3.6 (found version "3.6.9")
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.6m.so (found suitable exact version "3.6.9")
-- Extracting version information from git describe...
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.6m.so (found suitable version "3.6.9", minimum required is "2")
-- Using install prefix: /usr/local
-- Building for version: 3.8.0.0 / 3.8.0
-- No C++ unit tests... skipping
CMake Error at swig/CMakeLists.txt:37 (include):
include could not find load file:

GrSwig

CMake Error at swig/CMakeLists.txt:58 (GR_SWIG_MAKE):
Unknown CMake command "GR_SWIG_MAKE".

-- Configuring incomplete, errors occurred!
See also "/home/pc/rfnoc/src/gr-ettus/build-host/CMakeFiles/CMakeOutput.log".
See also "/home/pc/rfnoc/src/gr-ettus/build-host/CMakeFiles/CMakeError.log"._

Could anyone help me with my problem, thank you so much!

@michaelld
Copy link
Contributor

GR 3.9 doesn't use SWIG. Thus, whatever version of gr-ettus you're trying to build won't work with your GR3.9 install & instead requires GR3.8. Given how much in flux GR3.9 is at the moment, I'd strongly recommend sticking with the GR3.8 release or "maint" branch, unless you are intentionally trying out the bleeding edge GR ... in which case I think you're out of luck ... I don't see a branch of gr-ettus that's compatible with GR3.9/master just yet ...

@hdtuanss
Copy link
Author

hdtuanss commented Dec 4, 2020

Hi Michaelld,
Thanks for your support.
My purpose here is using RFNoC with GNURadio, after installing UHD 4.0 and GRC 3.9, I saw the command line of RFNoC and the RFNoC modules on the GRC, are they enough for my work?
Sorry about the question because this is the first time I use USRP and GRC tools

@mgarrett1955
Copy link

mgarrett1955 commented Jan 30, 2021

I am having the same issue with gnuradio 3.8, UHD 4 building build-arm using the e310 sdk.
I have compiled host and arm versions UHD 4.0, Volk and gnuradio. When I try to compile gr-ettus, I receive the following error:

I think there is a python path error betwee 2.7 ,3.7 and 3.8?

I checked out gr-ettus maint-3.8-uhd4.0

my complete build process up to gr-ettus
VM using Ubuntu 20.04LTS-gr-ettus issue.txt

See build process above.

@mgarrett1955
Copy link

mgarrett1955 commented Jan 30, 2021

Here is the cmake output indicating build issues:

(im not sure why this is lined out.)

cd /rfnoc/src/gr-ettus
mkdir build-arm
cd build-arm
cmake -DCMAKE_TOOLCHAIN_FILE=
/rfnoc/src/gnuradio/cmake/Toolchains/oe-sdk_cross.cmake -DCMAKE_INSTALL_PREFIX=/usr ..

gr-ettus-cmake-error.txt

@mgarrett1955
Copy link

I tried the tip master version and received the same cmake errors.

@mgarrett1955
Copy link

mgarrett1955 commented Jan 31, 2021

I believe this to be a python issue. The UDH 4.0 SDK was built against python 3.7, and the master gr-ettus is attempting to build against python 3.8. What is the cmake switch in the cross build for cmake to force a 3.7 cross build? In addition, when gnuradio installs itseld, it sets the LD_LIBRARY_PATH, which get a complaint from the SDK:

source ./environment-setup-cortexa9t2hf-neon-oe-linux-gnueabi
Your environment is misconfigured, you probably need to 'unset LD_LIBRARY_PATH'
but please check why this was set in the first place and that it's safe to unset.
The SDK will not operate correctly in most cases when LD_LIBRARY_PATH is set.
For more references see:
http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html#AEN80
http://xahlee.info/UnixResource_dir/_/ldpath.html

The cross build should not be looking at the host /usr/... ...

@mgarrett1955
Copy link

Mor information from the cmake error:

Build type not specified: defaulting to release.
-- Found LOG4CPP: /home/mgarrett/rfnoc/oe/sysroots/cortexa9t2hf-neon-oe-linux-gnueabi/usr/lib/liblog4cpp.so
-- Found PkgConfig: /home/mgarrett/rfnoc/oe/sysroots/x86_64-oesdk-linux/usr/bin/pkg-config (found version "0.29.2")
-- Checking for module 'gmp'
-- No package 'gmp' found
-- Found GMP: /home/mgarrett/rfnoc/oe/sysroots/cortexa9t2hf-neon-oe-linux-gnueabi/usr/lib/libgmpxx.so
-- Checking for module 'mpir >= 3.0'
-- No package 'mpir' found
-- Could NOT find MPIR (missing: MPIRXX_LIBRARY MPIR_LIBRARY MPIR_INCLUDE_DIR)
-- Found MPLIB: /home/mgarrett/rfnoc/oe/sysroots/cortexa9t2hf-neon-oe-linux-gnueabi/usr/lib/libgmpxx.so
-- Found Boost: /home/mgarrett/rfnoc/oe/sysroots/cortexa9t2hf-neon-oe-linux-gnueabi/usr/lib/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.71.0") found components: date_time program_options filesystem system regex thread unit_test_framework
-- Found Volk: Volk::volk
-- Found Git: /usr/bin/git
-- Extracting version information from git describe...
-- Found UHD: /home/mgarrett/rfnoc/oe/sysroots/cortexa9t2hf-neon-oe-linux-gnueabi/usr/lib/libuhd.so (Required is at least version "4.0")
-- Found PythonLibs: /home/mgarrett/rfnoc/oe/sysroots/cortexa9t2hf-neon-oe-linux-gnueabi/usr/lib/libpython2.7.so (found suitable version "2.7.17", minimum required is "2")
-- Found Doxygen: /usr/bin/doxygen (found version "1.8.17") found components: doxygen missing components: dot
-- PYTHON_EXECUTABLE not set - using default python3
-- Use -DPYTHON_EXECUTABLE=/path/to/python2 to build for python2.
-- Found PythonInterp: /usr/bin/python3.8 (found version "3.8.5")
-- Could NOT find PythonLibs: Found unsuitable version "2.7.17", but required is exact version "3.8" (found /home/mgarrett/rfnoc/oe/sysroots/cortexa9t2hf-neon-oe-linux-gnueabi/usr/lib/libpython2.7.so)
-- Using install prefix: /usr
-- Building for version: 3.8.0.0 / 3.8.0
-- No C++ unit tests... skipping
-- User set python executable /usr/bin/python3.8
-- Could NOT find PythonLibs: Found unsuitable version "2.7.17", but required is exact version "3.8" (found /home/mgarrett/rfnoc/oe/sysroots/cortexa9t2hf-neon-oe-linux-gnueabi/usr/lib/libpython2.7.so)

@mgarrett1955
Copy link

Python executable need to be 3.7, and the LD_LIBRARY_PATH or some variable need to point to the SKD local location (OE not host)

@mbr0wn
Copy link
Contributor

mbr0wn commented Oct 24, 2022

I think this is resolved --

in any case, make sure all the dep versions match. In particular, gr-ettus goes up to GNU Radio 3.8. GR 3.9 is not supported, and for GR 3.10, simply use gr-uhd.

@mbr0wn mbr0wn closed this as completed Oct 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants