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

CMake Error #5

Open
dverhaert opened this issue Feb 28, 2018 · 3 comments
Open

CMake Error #5

dverhaert opened this issue Feb 28, 2018 · 3 comments

Comments

@dverhaert
Copy link

dverhaert commented Feb 28, 2018

Hi,

I'm new to Linux and am working on a project in GNURadio using bastibl's IEEE 802-11 blocks: https://github.com/bastibl/gr-ieee802-11. I keep getting an overflow using my USRP N210, which is why I could really use your block to remove the IQ DC spike. However, I can't seem to get it correctly installed. First, when I did cmake .., I got the following error:

-- Build type not specified: defaulting to release.
-- Boost version: 1.58.0
-- Found the following Boost libraries:
--   filesystem
--   system
CMake Error at CMakeLists.txt:126 (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.2) 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.

-- Configuring incomplete, errors occurred!

I figured this was because I installed my GNURadio using pybombs into the /prefix directory, so I thought I could let CMAKE look at that directory by using the command export CMAKE_PREFIX_PATH=/prefix. This worked (gave a few warnings though), but now I get the following error when executing the make command:

/usr/bin/ld: CMakeFiles/test-correctiq.dir/correctiq_impl.cc.o: undefined reference to symbol '_ZN3pmt12dict_has_keyERKN5boost13intrusive_ptrINS_8pmt_baseEEES5_'
/home/danilo/prefix/lib/libgnuradio-pmt-3.7.12git.so.0.0.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
lib/CMakeFiles/test-correctiq.dir/build.make:206: recipe for target 'lib/test-correctiq' failed
make[2]: *** [lib/test-correctiq] Error 1
CMakeFiles/Makefile2:174: recipe for target 'lib/CMakeFiles/test-correctiq.dir/all' failed
make[1]: *** [lib/CMakeFiles/test-correctiq.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2

Do you have any idea what causes this? I tried some small things, and checked I have boost installed, but can't find out what to do. Any help would be really appreciated, sorry for being a Linux noob!

@dverhaert
Copy link
Author

Never mind, I had to type source ~/prefix/setup_env.sh, very stupid.

@kksdr
Copy link

kksdr commented Jan 22, 2019

I am having the a similar issue. I am new also and cannot get the CMake to work either. I do not know where the above "Never mind, I had to type source ~/prefix/setup_env.sh, very stupid." is to be done.

image

Any help would be greatly appreciated!

@ghostop14
Copy link
Owner

Hi folks, yes not having the environment variables set up after gnuradio install will definitely cause problems. The ~/prefix part is actually meant to reference where you installed gnuradio (assuming you installed it from pybombs). It's assuming it's in your home directory in a subdirectory called prefix. You can add a line like "source /setup_env.sh" to your .profile or .bashrc file for your account so it always gets loaded so you won't have to worry about it every time you log in too.

@ghostop14 ghostop14 reopened this Jan 23, 2019
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

3 participants