I'm trying to build the UHD library () on Ubuntu 20.04 and when I run cmake .. from host/build, I get this message:
-- Checking for Boost version 1.58 or greater
-- Looking for required Boost components...
CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message): Could NOT find Boost (missing: chrono date_time filesystem program_options serialization thread unit_test_framework system) (found suitable version "1.71.0", minimum required is "1.58")
Call Stack (most recent call first): /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake-3.16/Modules/FindBoost.cmake:2179 (find_package_handle_standard_args) cmake/Modules/UHDBoost.cmake:176 (find_package) CMakeLists.txt:296 (include)This is really confusing to me for two reasons:
- It says it found a suitable version (1.71.0 with 1.58 being the minimum), but it still somehow failed.
- I've got another machine running Ubuntu 20.04 where this works and I can't find any differences in the environment. It's the exact same version of CMake (3.16.3), exact same version of Boost (1.71.0), etc. I get the same Boost libraries in the same paths when I run
ldconfig -pand my LIBRARY_PATH and LD_LIBRARY_PATH environment variables are the same.
Having it work on another machine with a (seemingly) identical environment makes me optimistic that this should be solvable. Does anyone have an idea of what next steps I could take in troubleshooting? Thanks!
21 Answer
You have to follow official compilation guide and install many development packages by
sudo apt-get install libboost-all-dev libusb-1.0-0-dev doxygen python3-docutils python3-mako python3-numpy python3-requests python3-ruamel.yaml python3-setuptools cmake build-essentialand then retry.
Or simpler - install binary UHD packages by
sudo apt-get install libuhd-dev uhd-host gnuradio 3