Hi,
I'm having trouble installing gr-osmosdr via pybombs so I checked out the master branch from git.osmocom.org/gr-osmosdr, but building still fails with the same error:
gregor@gregor-laptop ~/temp/gr-osmosdr/build $ cmake ../ -- Build type not specified: defaulting to release. -- Extracting version information from git describe... -- Configuring Boost C++ Libraries... -- Boost version: 1.58.0 -- Found the following Boost libraries: -- thread -- system -- chrono -- date_time -- atomic -- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") Checking for GNU Radio Module: RUNTIME -- Checking for module 'gnuradio-runtime' -- Found gnuradio-runtime, version 3.7.13.4 * INCLUDES=/home/gregor/prefix/include * LIBS=/home/gregor/prefix/lib/libgnuradio-runtime.so;/home/gregor/prefix/lib/libgnuradio-pmt.so;/usr/lib/liblog4cpp.so -- Found GNURADIO_RUNTIME: /home/gregor/prefix/lib/libgnuradio-runtime.so;/home/gregor/prefix/lib/libgnuradio-pmt.so;/usr/lib/liblog4cpp.so
GNURADIO_RUNTIME_FOUND = TRUE Checking for GNU Radio Module: BLOCKS -- Checking for module 'gnuradio-blocks' -- Found gnuradio-blocks, version 3.7.13.4 * INCLUDES=/home/gregor/prefix/include * LIBS=/home/gregor/prefix/lib/libgnuradio-blocks.so;/home/gregor/prefix/lib/libgnuradio-runtime.so;/home/gregor/prefix/lib/libgnuradio-pmt.so;/usr/lib/liblog4cpp.so -- Found GNURADIO_BLOCKS: /home/gregor/prefix/lib/libgnuradio-blocks.so;/home/gregor/prefix/lib/libgnuradio-runtime.so;/home/gregor/prefix/lib/libgnuradio-pmt.so;/usr/lib/liblog4cpp.so
GNURADIO_BLOCKS_FOUND = TRUE Checking for GNU Radio Module: PMT -- Checking for module 'gnuradio-runtime' -- Found gnuradio-runtime, version 3.7.13.4 * INCLUDES=/home/gregor/prefix/include * LIBS=/home/gregor/prefix/lib/libgnuradio-runtime.so;/home/gregor/prefix/lib/libgnuradio-pmt.so;/usr/lib/liblog4cpp.so -- Found GNURADIO_PMT: /home/gregor/prefix/lib/libgnuradio-runtime.so;/home/gregor/prefix/lib/libgnuradio-pmt.so;/usr/lib/liblog4cpp.so
GNURADIO_PMT_FOUND = TRUE -- Checking for module 'gnuradio-iqbalance' -- Found gnuradio-iqbalance, version 0 -- Found GNURADIO_IQBALANCE: /home/gregor/prefix/lib/libgnuradio-iqbalance.so -- Found UHD: /home/gregor/prefix/lib/libuhd.so -- Checking for module 'gnuradio-uhd' -- Found gnuradio-uhd, version 3.7.13.4 -- Found gnuradio-uhd: /home/gregor/prefix/include, /home/gregor/prefix/lib/libgnuradio-uhd.so -- Found GNURADIO_UHD: /home/gregor/prefix/lib/libgnuradio-uhd.so -- Checking for module 'gnuradio-fcd' -- Found gnuradio-fcd, version 3.7.13.4 -- Found gnuradio-fcd: /home/gregor/prefix/include, /home/gregor/prefix/lib/libgnuradio-fcd.so -- Found GNURADIO_FCD: /home/gregor/prefix/lib/libgnuradio-fcd.so -- Checking for module 'gnuradio-fcdproplus' -- No package 'gnuradio-fcdproplus' found -- gnuradio-fcdproplus not found. -- Could NOT find GNURADIO_FCDPP (missing: GNURADIO_FCDPP_LIBRARIES GNURADIO_FCDPP_INCLUDE_DIRS) -- Checking for module 'libosmosdr' -- Found libosmosdr, version -- Found libosmosdr: /home/gregor/prefix/include, /home/gregor/prefix/lib/libosmosdr.so -- Checking for module 'librtlsdr' -- Found librtlsdr, version 0.6.0-2-gf68bb -- Found librtlsdr: /home/gregor/prefix/include, /home/gregor/prefix/lib/librtlsdr.so -- Checking for module 'libmirisdr' -- No package 'libmirisdr' found -- libmirisdr not found. -- Checking for module 'libhackrf' -- Found libhackrf, version 0.5 -- Found LIBHACKRF: /home/gregor/prefix/lib/libhackrf.so -- Checking for module 'libairspy' -- Found libairspy, version 1.0 -- Found LIBAIRSPY: /home/gregor/prefix/lib/libairspy.so -- Checking for module 'volk' -- Found volk, version 1.4 -- Found VOLK: /home/gregor/prefix/lib/libvolk.so -- Checking for module 'libbladeRF' -- Found libbladeRF, version 2.2.0-git-e4bf84a -- Found libbladeRF: /home/gregor/prefix/include, /home/gregor/prefix/lib/libbladeRF.so -- Checking for module 'libfreesrp' -- No package 'libfreesrp' found -- libfreesrp not found. -- Found Doxygen: /usr/bin/doxygen (found version "1.8.11") -- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython2.7.so (found suitable version "2.7.12", minimum required is "2") -- -- Checking for module SWIG -- Found SWIG version 3.0.8. -- Found SWIG: /usr/bin/swig3.0
-- Minimum SWIG version required is 1.3.31
-- The build system will automatically enable all components.
-- Use -DENABLE_DEFAULT=OFF to disable components by default.
-- Configuring Python support support... -- Dependency PYTHONLIBS_FOUND = TRUE -- Dependency SWIG_FOUND = TRUE -- Dependency SWIG_VERSION_CHECK = TRUE -- Enabling Python support support.
-- Override with -DENABLE_PYTHON=ON/OFF
-- Configuring high resolution timing... -- Performing Test HAVE_CLOCK_GETTIME -- Performing Test HAVE_CLOCK_GETTIME - Success -- Performing Test HAVE_MACH_ABSOLUTE_TIME -- Performing Test HAVE_MACH_ABSOLUTE_TIME - Failed -- Performing Test HAVE_QUERY_PERFORMANCE_COUNTER -- Performing Test HAVE_QUERY_PERFORMANCE_COUNTER - Failed
-- High resolution timing supported through clock_gettime.
-- Configuring Osmocom IQ Imbalance Correction support... -- Dependency GNURADIO_IQBALANCE_FOUND = TRUE -- Enabling Osmocom IQ Imbalance Correction support.
-- Override with -DENABLE_IQBALANCE=ON/OFF
-- Configuring sysmocom OsmoSDR support... -- Dependency LIBOSMOSDR_FOUND = TRUE -- Enabling sysmocom OsmoSDR support.
-- Override with -DENABLE_OSMOSDR=ON/OFF
-- Configuring FUNcube Dongle support... -- Dependency GNURADIO_FCD_FOUND = TRUE -- Enabling FUNcube Dongle support.
-- Override with -DENABLE_FCD=ON/OFF
-- Configuring FUNcube Dongle Pro+ support... -- Dependency GNURADIO_FCDPP_FOUND = FALSE -- Disabling FUNcube Dongle Pro+ support.
-- Override with -DENABLE_FCDPP=ON/OFF
-- Configuring IQ File Source & Sink support... -- Dependency GNURADIO_BLOCKS_FOUND = TRUE -- Enabling IQ File Source & Sink support.
-- Override with -DENABLE_FILE=ON/OFF
-- Configuring Osmocom RTLSDR support... -- Dependency LIBRTLSDR_FOUND = TRUE -- Enabling Osmocom RTLSDR support.
-- Override with -DENABLE_RTL=ON/OFF
-- Configuring RTLSDR TCP Client support... -- Dependency GNURADIO_BLOCKS_FOUND = TRUE -- Enabling RTLSDR TCP Client support.
-- Override with -DENABLE_RTL_TCP=ON/OFF
-- Configuring Ettus USRP Devices support... -- Dependency UHD_FOUND = TRUE -- Dependency GNURADIO_UHD_FOUND = TRUE -- Enabling Ettus USRP Devices support.
-- Override with -DENABLE_UHD=ON/OFF
-- Configuring Osmocom MiriSDR support... -- Dependency LIBMIRISDR_FOUND = FALSE -- Disabling Osmocom MiriSDR support.
-- Override with -DENABLE_MIRI=ON/OFF
-- Configuring HackRF & rad1o Badge support... -- Dependency LIBHACKRF_FOUND = TRUE -- Enabling HackRF & rad1o Badge support. -- Override with -DENABLE_HACKRF=ON/OFF -- Looking for hackrf_device_list -- Looking for hackrf_device_list - found
-- HackRF multiple device support enabled
-- Configuring nuand bladeRF support... -- Dependency LIBBLADERF_FOUND = TRUE -- Enabling nuand bladeRF support.
-- Override with -DENABLE_BLADERF=ON/OFF
-- Configuring RFSPACE Receivers support... -- Enabling RFSPACE Receivers support.
-- Override with -DENABLE_RFSPACE=ON/OFF
-- Configuring AIRSPY Receiver support... -- Dependency LIBAIRSPY_FOUND = TRUE -- Enabling AIRSPY Receiver support.
-- Override with -DENABLE_AIRSPY=ON/OFF
-- Configuring SoapySDR support support... -- Dependency SoapySDR_FOUND = 1 -- Enabling SoapySDR support support.
-- Override with -DENABLE_SOAPY=ON/OFF
-- Configuring Red Pitaya SDR support... -- Enabling Red Pitaya SDR support.
-- Override with -DENABLE_REDPITAYA=ON/OFF
-- Configuring FreeSRP support support... -- Dependency LIBFREESRP_FOUND = FALSE -- Disabling FreeSRP support support. -- Override with -DENABLE_FREESRP=ON/OFF -- Found PythonInterp: /usr/bin/python2 (found suitable version "2.7.12", minimum required is "2") -- Performing Test HAVE_WNO_UNUSED_BUT_SET_VARIABLE
-- Performing Test HAVE_WNO_UNUSED_BUT_SET_VARIABLE - Success
-- ###################################################### -- # Gnuradio enabled components -- ###################################################### -- * Python support -- * Osmocom IQ Imbalance Correction -- * sysmocom OsmoSDR -- * FUNcube Dongle -- * IQ File Source & Sink -- * Osmocom RTLSDR -- * RTLSDR TCP Client -- * Ettus USRP Devices -- * HackRF & rad1o Badge -- * nuand bladeRF -- * RFSPACE Receivers -- * AIRSPY Receiver -- * SoapySDR support
-- * Red Pitaya SDR
-- ###################################################### -- # Gnuradio disabled components -- ###################################################### -- * FUNcube Dongle Pro+ -- * Osmocom MiriSDR
-- * FreeSRP support
-- Building for version: v0.1.4-127-g4d83c606 / 0.1.5git -- Using install prefix: /usr/local -- Configuring done -- Generating done -- Build files have been written to: /home/gregor/temp/gr-osmosdr/build gregor@gregor-laptop ~/temp/gr-osmosdr/build $ make Scanning dependencies of target gnuradio-osmosdr [ 2%] Building CXX object lib/CMakeFiles/gnuradio-osmosdr.dir/source_impl.cc.o In file included from /home/gregor/temp/gr-osmosdr/lib/bladerf/bladerf_source_c.h:26:0, from /home/gregor/temp/gr-osmosdr/lib/source_impl.cc:72: /home/gregor/temp/gr-osmosdr/lib/bladerf/bladerf_common.h:291:50: error: ‘>>’ should be ‘> >’ within a nested template argument list static std::list<boost::weak_ptr<struct bladerf>> _devs; /**< dev cache */ ^ In file included from /home/gregor/temp/gr-osmosdr/lib/source_impl.cc:72:0: /home/gregor/temp/gr-osmosdr/lib/bladerf/bladerf_source_c.h:141:32: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11 const float SCALING_FACTOR = 2048.0f; ^ lib/CMakeFiles/gnuradio-osmosdr.dir/build.make:62: recipe for target 'lib/CMakeFiles/gnuradio-osmosdr.dir/source_impl.cc.o' failed make[2]: *** [lib/CMakeFiles/gnuradio-osmosdr.dir/source_impl.cc.o] Error 1 CMakeFiles/Makefile2:135: recipe for target 'lib/CMakeFiles/gnuradio-osmosdr.dir/all' failed make[1]: *** [lib/CMakeFiles/gnuradio-osmosdr.dir/all] Error 2 Makefile:138: recipe for target 'all' failed make: *** [all] Error 2
I'm running Linux Mint 18.3 Sylvia and am trying to compile for GNU Radio 3.7 (which I installed via pybombs), gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.11).
Hi Gregor,
On 21/01/2019 16.39, gregor christandl wrote:
gregor@gregor-laptop ~/temp/gr-osmosdr/build $ make Scanning dependencies of target gnuradio-osmosdr [ 2%] Building CXX object lib/CMakeFiles/gnuradio-osmosdr.dir/source_impl.cc.o In file included from /home/gregor/temp/gr-osmosdr/lib/bladerf/bladerf_source_c.h:26:0, from /home/gregor/temp/gr-osmosdr/lib/source_impl.cc:72: /home/gregor/temp/gr-osmosdr/lib/bladerf/bladerf_common.h:291:50: error: ‘>>’ should be ‘> >’ within a nested template argument list static std::list<boost::weak_ptr<struct bladerf>> _devs; /**< dev cache */
I'm running Linux Mint 18.3 Sylvia and am trying to compile for GNU Radio 3.7 (which I installed via pybombs), gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.11).
It seems it can't be compiled with certain gcc versions. You could manually apply the following changes from https://github.com/Nuand/bladeRF/issues/684#issuecomment-434389842
Quick fix would be to edit bladerf_common.h:291 (and any other lines it errors out on) to change:
|static std::list<boost::weak_ptr<struct bladerf>> _devs; /**< dev cache */|
to:
|static std::list<boost::weak_ptr<struct bladerf> > _devs; /**< dev cache */|
These three lines in bladerf_common.cc will likely also need changing:
|bladerf_common.cc:54:std::list<boost::weak_ptr<struct bladerf>> bladerf_common::_devs; bladerf_common.cc:1112: _devs.push_back(static_cast<boost::weak_ptr<struct bladerf>>(dev)); bladerf_common.cc:1120: std::list<boost::weak_ptr<struct bladerf>>::iterator it(_devs.begin()); |
Or you could try to update your compiler to a more recent version.
in templates, things like "vector of complex of float" used to be written as vector<complex<float> > with a space between the > and >, because that avoids the ambiguity with >> (the right-shift operator).
This should be remedied in C++11, i.e. "just work" with or without the space; I guess the original authors used C++11 by default. CMake makes such decisions on the fly, depending on (way too) many factors.
I must admit I don't know the language version policy for gr-osmosdr, but my guess is that setting the C++ standard to C++11 should work; however, since we're passing std::string around, and that changed its ABI between C++98 and 11, I'd like to recommend that you use the same C++ standard as your GNU Radio uses. GNU Radio uses C++11 on the master branch, or 98 on the maint-3.7 branch. Don't know which one you've built!
So, as Vasil pointed out, the easiest way out is to simply add these spaces where necessary, and thus making gr-osmosdr compatible to both C++ versions
Best regards, Marcus
On Tue, 2019-01-29 at 23:08 +0200, Vasil Velichkov wrote:
Hi Gregor, On 21/01/2019 16.39, gregor christandl wrote:
gregor@gregor-laptop ~/temp/gr-osmosdr/build $ make Scanning dependencies of target gnuradio-osmosdr [ 2%] Building CXX object lib/CMakeFiles/gnuradio- osmosdr.dir/source_impl.cc.o In file included from /home/gregor/temp/gr- osmosdr/lib/bladerf/bladerf_source_c.h:26:0, from /home/gregor/temp/gr- osmosdr/lib/source_impl.cc:72: /home/gregor/temp/gr-osmosdr/lib/bladerf/bladerf_common.h:291:50: error: ‘>>’ should be ‘> >’ within a nested template argument list static std::list<boost::weak_ptr<struct bladerf>> _devs; /**< dev cache */
I'm running Linux Mint 18.3 Sylvia and am trying to compile for GNU Radio 3.7 (which I installed via pybombs), gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.11).
It seems it can't be compiled with certain gcc versions. You could manually apply the following changes from https://github.com/Nuand/bladeRF/issues/684#issuecomment-434389842
Quick fix would be to edit bladerf_common.h:291 (and any other lines it errors out on) to change: static std::list<boost::weak_ptr<struct bladerf>> _devs; /**< dev cache */ to: static std::list<boost::weak_ptr<struct bladerf> > _devs; /**< dev cache */ These three lines in bladerf_common.cc will likely also need changing: bladerf_common.cc:54:std::list<boost::weak_ptr<struct bladerf>> bladerf_common::_devs; bladerf_common.cc:1112: _devs.push_back(static_cast<boost::weak_pt r<struct bladerf>>(dev)); bladerf_common.cc:1120: std::list<boost::weak_ptr<struct bladerf>>::iterator it(_devs.begin());
Or you could try to update your compiler to a more recent version.
Marcus Müller marcus.mueller@ettus.com writes:
I must admit I don't know the language version policy for gr-osmosdr, but my guess is that setting the C++ standard to C++11 should work; however, since we're passing std::string around, and that changed its ABI between C++98 and 11, I'd like to recommend that you use the same C++ standard as your GNU Radio uses. GNU Radio uses C++11 on the master branch, or 98 on the maint-3.7 branch.
It is unfortunate that compilers default to different language standards. It seems each program should declare the standards supported in the README, and the configure.ac should check that the --std= argument is acceptable to the compiler and then add it to CXXFLAGS.
(Agreed that one must compile C++ programs with the same --std. Also, due to libstdc++ ABI changes, one should use the same compiler for all programs too.)