Search code examples
ubuntucmakewindows-subsystem-for-linuxgnuradiognuradio-companion

GNU Radio 3.8 on Ubuntu 20.04 using WSL: CMake Warning, Build Type Not Specified


Morning All,

I am trying to install GNU Radio. I am running a Windows 10 computer where the Windows Subsystem for Linux was installed. Python 3.8.2 is installed.

After installing WSL and Ubuntu 20.04 I updated and upgraded:

sudo apt-get update
sudo apt-get upgrade

I then proceeded to install using the following: https://wiki.analog.com/resources/tools-software/linux-software/gnuradio

Due to prior attempts and errors with qt5core library, I included two other apt-get installs:

sudo apt-get install qt5-default
sudo apt-get install build essential

All sections installed without errors until I tried to cmake gr-iio

git clone -b upgrade-3.8 https://github.com/analogdevicesinc/gr-iio.git
cd gr-iio
cmake ./

The error I encountered was:

CMake Warning at CMakeLists.txt:89 (find_package):
  By not providing "FindGnuradio.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Gnuradio",
  but CMake did not find one.

  Could not find a package configuration file provided by "Gnuradio"
  (requested version 3.9) with any of the following names:

    GnuradioConfig.cmake
    gnuradio-config.cmake

  Add the installation prefix of "Gnuradio" to CMAKE_PREFIX_PATH or set
  "Gnuradio_DIR" to a directory containing one of the above files.  If
  "Gnuradio" provides a separate development package or SDK, be sure it has
  been installed.


CMake Error at CMakeLists.txt:91 (message):
  Unable to find GNURadio

I couldn't locate anything by the name Gnuradio

find -name Gnuradio

Resulted in no return. I then searched for *.cmake

find -name "*.cmake"

But could not find any cmake files with a prefix of Gnuradio. My returned list is below:

jameshayek@JamesHayekG75:~$ find -name "*.cmake"
./gr-iio/CMakeFiles/3.16.3/CMakeCCompiler.cmake
./gr-iio/CMakeFiles/3.16.3/CMakeCXXCompiler.cmake
./gr-iio/CMakeFiles/3.16.3/CMakeSystem.cmake
./gr-iio/cmake/Modules/CMakeParseArgumentsCopy.cmake
./gr-iio/cmake/Modules/iioConfig.cmake
./libad9361-iio/CMakeDoxygenDefaults.cmake
./libad9361-iio/CMakeFiles/3.16.3/CMakeCCompiler.cmake
./libad9361-iio/CMakeFiles/3.16.3/CMakeSystem.cmake
./libad9361-iio/CMakeFiles/CMakeDirectoryInformation.cmake
./libad9361-iio/CMakeFiles/Makefile.cmake
./libad9361-iio/CMakeFiles/ad9361.dir/DependInfo.cmake
./libad9361-iio/CMakeFiles/ad9361.dir/cmake_clean.cmake
./libad9361-iio/CPackConfig.cmake
./libad9361-iio/CPackSourceConfig.cmake
./libad9361-iio/CTestTestfile.cmake
./libad9361-iio/bindings/matlab/CMakeFiles/CMakeDirectoryInformation.cmake
./libad9361-iio/bindings/matlab/CTestTestfile.cmake
./libad9361-iio/bindings/matlab/cmake_install.cmake
./libad9361-iio/cmake/DarwinPackaging.cmake
./libad9361-iio/cmake/LinuxPackaging.cmake
./libad9361-iio/cmake_install.cmake
./libad9361-iio/test/CMakeFiles/AutoRateTest.dir/DependInfo.cmake
./libad9361-iio/test/CMakeFiles/AutoRateTest.dir/cmake_clean.cmake
./libad9361-iio/test/CMakeFiles/CMakeDirectoryInformation.cmake
./libad9361-iio/test/CMakeFiles/FMComms5SyncTest.dir/DependInfo.cmake
./libad9361-iio/test/CMakeFiles/FMComms5SyncTest.dir/cmake_clean.cmake
./libad9361-iio/test/CMakeFiles/FilterDesignerHardwareTest.dir/DependInfo.cmake
./libad9361-iio/test/CMakeFiles/FilterDesignerHardwareTest.dir/cmake_clean.cmake
./libad9361-iio/test/CMakeFiles/FilterDesignerTest.dir/DependInfo.cmake
./libad9361-iio/test/CMakeFiles/FilterDesignerTest.dir/cmake_clean.cmake
./libad9361-iio/test/CMakeFiles/GenerateRatesTest.dir/DependInfo.cmake
./libad9361-iio/test/CMakeFiles/GenerateRatesTest.dir/cmake_clean.cmake
./libad9361-iio/test/CTestTestfile.cmake
./libad9361-iio/test/cmake_install.cmake
./libiio/CMakeFiles/3.16.3/CMakeCCompiler.cmake
./libiio/CMakeFiles/3.16.3/CMakeSystem.cmake
./libiio/CMakeFiles/CMakeDirectoryInformation.cmake
./libiio/CMakeFiles/Makefile.cmake
./libiio/CMakeFiles/iio.dir/DependInfo.cmake
./libiio/CMakeFiles/iio.dir/cmake_clean.cmake
./libiio/bindings/CMakeFiles/CMakeDirectoryInformation.cmake
./libiio/bindings/cmake_install.cmake
./libiio/cmake/CheckCaseSensitiveFileSystem.cmake
./libiio/cmake/DarwinPackaging.cmake
./libiio/cmake/LinuxPackaging.cmake
./libiio/cmake_install.cmake
./libiio/iiod/CMakeFiles/CMakeDirectoryInformation.cmake
./libiio/iiod/CMakeFiles/iiod.dir/DependInfo.cmake
./libiio/iiod/CMakeFiles/iiod.dir/cmake_clean.cmake
./libiio/iiod/cmake_install.cmake
./libiio/man/CMakeFiles/CMakeDirectoryInformation.cmake
./libiio/man/cmake_install.cmake
./libiio/tests/CMakeFiles/CMakeDirectoryInformation.cmake
./libiio/tests/CMakeFiles/iio_adi_xflow_check.dir/DependInfo.cmake
./libiio/tests/CMakeFiles/iio_adi_xflow_check.dir/cmake_clean.cmake
./libiio/tests/CMakeFiles/iio_attr.dir/DependInfo.cmake
./libiio/tests/CMakeFiles/iio_attr.dir/cmake_clean.cmake
./libiio/tests/CMakeFiles/iio_genxml.dir/DependInfo.cmake
./libiio/tests/CMakeFiles/iio_genxml.dir/cmake_clean.cmake
./libiio/tests/CMakeFiles/iio_info.dir/DependInfo.cmake
./libiio/tests/CMakeFiles/iio_info.dir/cmake_clean.cmake
./libiio/tests/CMakeFiles/iio_readdev.dir/DependInfo.cmake
./libiio/tests/CMakeFiles/iio_readdev.dir/cmake_clean.cmake
./libiio/tests/CMakeFiles/iio_reg.dir/DependInfo.cmake
./libiio/tests/CMakeFiles/iio_reg.dir/cmake_clean.cmake
./libiio/tests/CMakeFiles/iio_stresstest.dir/DependInfo.cmake
./libiio/tests/CMakeFiles/iio_stresstest.dir/cmake_clean.cmake
./libiio/tests/CMakeFiles/iio_tests_helper.dir/DependInfo.cmake
./libiio/tests/CMakeFiles/iio_tests_helper.dir/cmake_clean.cmake
./libiio/tests/CMakeFiles/iio_tests_helper.dir/cmake_clean_target.cmake
./libiio/tests/CMakeFiles/iio_writedev.dir/DependInfo.cmake
./libiio/tests/CMakeFiles/iio_writedev.dir/cmake_clean.cmake
./libiio/tests/cmake_install.cmake

I am unsure how to set an installation prefix or CMAKE_PREFIX_PATH if I can not find any gnuradio cmake location.

Any help will be greatly appreciated.


Solution

  • gr-iio is a module for GNU Radio and requires it and its development package to be already installed:

    gr-iio requires a few main dependencies:

    • libiio
    • libad9361
    • GNU Radio and its development packages
    • swig (Optional for python support)

    On Ubuntu 20.04 development package for GNU Radio is gnuradio-dev. Among other things, this package provides GnuradioConfig.cmake file which is noted in the CMake message you got.