Lets say I am trying to compile a C++ application that uses
gnuradio-core
and gnuradio-uhd. I have gnuradio installed in
/opt/gnuradio/some-version
and uhd installed in /opt/uhd/some-version - both of these paths are
within
pkg-config reach. The problem is if I do:
pkg-config --cflags gnuradio-core gnuradio-uhd
I get:
-I/opt/gnuradio/3.6.0/include/gnuradio -I/opt/gnuradio/3.6.0/include
which does not include where the UHD headers are located. Consequently,
compilation will fail with:
/opt/gnuradio/3.6.0/include/gnuradio/gr_uhd_api.h:25:26: fatal error:
uhd/config.hpp: No such file or directory
In this simple case I could just include uhd as dependency but is it
really
what I am supposed to do or should gnuradio-uhd pull it in
automatically?
Also note that the same happens with --ldflags:
My real problem is that I am trying to build gr-osmosdr from http://cgit.osmocom.org/cgit/gr-osmosdr/ which checks for gnuradio-uhd
but
not for uhd itself and therefore cmake will not include the UHD paths.
Lets say I am trying to compile a C++ application that uses gnuradio-core
and gnuradio-uhd. I have gnuradio installed in /opt/gnuradio/some-version
and uhd installed in /opt/uhd/some-version - both of these paths are within
pkg-config reach. The problem is if I do:
pkg-config --cflags gnuradio-core gnuradio-uhd
Just add uhd to the list of pkg config dependencies.
Does it work?
Just add uhd to the list of pkg config dependencies.
Does it work?
Yes, that works for the pkg-config part, but not when compiling
gr-osmosdr using cmake. I guess we can also include uhd as dependency
in the gr-osmosdr cmake files, but I’m curious if that is the right
way to do it?
and uhd installed in /opt/uhd/some-version - both of these paths are within
in the gr-osmosdr cmake files, but I’m curious if that is the right
way to do it?
Probably since gr-uhd public headers expose stuff in uhd public headers.
You might as well grab FindUHD.cmake from gnuradio and copy it into
gr-osmosdr cmake source tree.
Thanks for the tip.
UHD has now been added as dependency and it compiles fine now.
Probably since gr-uhd public headers expose stuff in uhd public headers.
You might as well grab FindUHD.cmake from gnuradio and copy it into
gr-osmosdr cmake source tree.
-Josh
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.