4

Getting the following error when running cmake and am unsure how to fix it. It seems like it's telling me exactly what to do, but not very familiar with Linux.

 CMake Error at CMakeLists.txt:153 (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.7.3) 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 contaning one of the above files. If
"Gnuradio" provides a separate development package or SDK, be sure it has
been installed.

EDIT: So I've located something called FindGnuradioRuntime.cmake but am still unsure what to do with it. The error message makes me think it was looking for something named "FindGnuradio.cmake" when it was actually called "FindGnuradioRuntime.cmake"

Commands that were run on a fresh Ubuntu install:

git clone git://git.osmocom.org/rtl-sdr.git
cd rtl-sdr/
mkdir build
cd build
cmake ../
make
sudo make install
sudo ldconfig
git clone git://git.osmocom.org/gr-osmosdr
cd gr-osmosdr/
mkdir build
cd build/
cmake ../           (here is where I ran into a the problem above)
dcvl
  • 485
  • 1
  • 7
  • 21
  • you're not really describing what you're trying to do in the first place. CMake is something that you run from within some existing project, but you don't meniton which you're trying to build, so we can't really help you. – Marcus Müller Nov 08 '15 at 00:50
  • http://sdr.osmocom.org/trac/wiki/rtl-sdr This is the process I'm walking through attempting to allow the use of my USB SDR device with the GNURadio program. What exactly it's doing and how...I'm not sure, but the end state should be allowing me to use my device inside the GNUradio application – dcvl Nov 08 '15 at 03:03
  • what *exactly* did you execute, *where*? – Marcus Müller Nov 08 '15 at 10:27
  • Edited original post with commands that were in the link above. – dcvl Nov 08 '15 at 13:58
  • 1
    Just found out that the install script provided on GNURadio's website not only installs GNURadio, but also the RTL SDR requirements as well, so I wiped my VM and started over and was successful. It takes a few hours, but it is complete and automated so definitely the best way to install GNURadio. Script is here http://www.sbrac.org/files/build-gnuradio – dcvl Nov 08 '15 at 14:16
  • `build-gnuradio` is great, and so is [`pybombs`](http://pybombs.info), which I can heartily recommend as alternative. However, as this problem has solved itself, I'd like to recommend that you delete this question. – Marcus Müller Nov 08 '15 at 18:33

3 Answers3

1
  1. Install / build GNU Radio.
  2. Remove the CMakeCache.txt
  3. When you call cmake .. you can pass arguments. Add the path to the parent directory of GnuradioConfig.cmake or FindGnuRadio.cmake as in

    cmake -DCMAKE_PREFIX_PATH=/gnu/radio/path ..

usr1234567
  • 21,601
  • 16
  • 108
  • 128
  • if you use a CMakeLists.txt, the path to the parent directory can be define with `set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/path/to/your_directory" )` –  Jun 25 '17 at 18:32
1

Making my somewhat hidden response an actual answer:

Just found out that the install script provided on GNURadio's website not only installs GNURadio, but also the RTL SDR requirements as well, so I wiped my VM and started over and was successful. It takes a few hours, but it is complete and automated so definitely the best way to install GNURadio. Script is here http://www.sbrac.org/files/build-gnuradio

dcvl
  • 485
  • 1
  • 7
  • 21
  • This looks promising, but it doesn't like Ubuntu 20.04 (current LTS release). I wonder if you've considered doing a Docker container instead of a VM based solution? I am thinking I'll do that with your script if you haven't already. – Alan Mimms Jun 08 '21 at 17:26
  • I have not. This was also not my script. I just happened to find it – dcvl Mar 28 '22 at 16:39
0

As previous answers noted you didn't describe where you ran into this problem. I'm going to assume it happened when creating an Out Of Tree (OOT) module.

On the OOT Module Page, see the "Notes" Section. They note that you need to install gr-dev. That package will install GnuradioConfig.cmake. You can find it in the standard yum repos, and install it with sudo yum install gnuradio-devel.

Andreas GS
  • 441
  • 5
  • 12