gr-analysis icon indicating copy to clipboard operation
gr-analysis copied to clipboard

Compile fails with new UHD

Open gumpgraves opened this issue 7 years ago • 3 comments

Something in newer releases of UHD causes both PyBombs and from source builds to fail.

I get the same errors with either PyBombs or if I try to Build from source. Below is the PyBombs build errors. (GNURadio, UHD, RTL-SDR, OsmoSDR, all build fine)

user@gump-Lenovo:~$ sudo pybombs install gr-analysis PyBOMBS - INFO - PyBOMBS Version 2.3.0 PyBOMBS.Packager.apt - INFO - Install python-apt to speed up apt processing. PyBOMBS.install_manager - INFO - Phase 1: Creating install tree and installing binary packages: Install tree: | - gr-analysis PyBOMBS.install_manager - INFO - Phase 2: Recursively installing source packages to prefix: PyBOMBS.install_manager - INFO - Installing package: gr-analysis PyBOMBS.Packager.apt - INFO - Install python-apt to speed up apt processing. Cloning: (100%) [==============================================================================] PyBOMBS.Packager.apt - INFO - Install python-apt to speed up apt processing. Configuring: (100%) [==============================================================================] Building: (100%) [==============================================================================] [ 6%] Built target gnuradio-analysis Scanning dependencies of target test-analysis [ 9%] Building CXX object lib/CMakeFiles/test-analysis.dir/test_analysis.cc.o [ 12%] Building CXX object lib/CMakeFiles/test-analysis.dir/qa_analysis.cc.o [ 15%] Linking CXX executable test-analysis [ 15%] Built target test-analysis [ 21%] Built target _analysis_swig_doc_tag [ 28%] Built target analysis_swig_swig_doc [ 34%] Built target _analysis_swig_swig_tag [ 43%] Built target analysis_swig_swig_2d0df Scanning dependencies of target _analysis_swig [ 46%] Building CXX object swig/CMakeFiles/_analysis_swig.dir/analysis_swigPYTHON_wrap.cxx.o [ 50%] Linking CXX shared module _analysis_swig.so [ 56%] Built target _analysis_swig [ 65%] Built target pygen_swig_3447b [ 71%] Built target pygen_python_c34e1 [ 84%] Built target pygen_apps_abb64 [ 90%] Built target metadata_to_csv [ 93%] Building CXX object apps/record/CMakeFiles/specrec.dir/specrec.cpp.o In file included from /usr/include/c++/5/atomic:38:0, from /usr/local/include/uhd/utils/atomic.hpp:24, from /usr/local/src/gr-analysis/apps/record/specrec.cpp:36: /usr/include/c++/5/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options. #error This file requires compiler and library support
^ In file included from /usr/local/src/gr-analysis/apps/record/specrec.cpp:36:0: /usr/local/include/uhd/utils/atomic.hpp:37:14: error: ‘uhd::spin_wait_with_timeout’ declared as an ‘inline’ variable std::atomic<T> &cond, ^ /usr/local/include/uhd/utils/atomic.hpp:37:9: error: ‘atomic’ is not a member of ‘std’ std::atomic<T> &cond, ^ /usr/local/include/uhd/utils/atomic.hpp:37:9: note: suggested alternatives: In file included from /usr/include/boost/atomic/atomic.hpp:22:0, from /usr/include/boost/atomic.hpp:12, from /usr/include/boost/thread/pthread/once_atomic.hpp:20, from /usr/include/boost/thread/once.hpp:20, from /usr/include/boost/thread.hpp:17, from /usr/local/src/gr-analysis/apps/record/specrec.cpp:27: /usr/include/boost/atomic/detail/atomic_template.hpp:668:7: note: ‘boost::atomics::atomic’ class atomic : ^ /usr/include/boost/atomic/detail/atomic_template.hpp:668:7: note: ‘boost::atomics::atomic’ In file included from /usr/local/src/gr-analysis/apps/record/specrec.cpp:36:0: /usr/local/include/uhd/utils/atomic.hpp:37:22: error: expected primary-expression before ‘>’ token std::atomic<T> &cond, ^ /usr/local/include/uhd/utils/atomic.hpp:37:25: error: ‘cond’ was not declared in this scope std::atomic<T> &cond, ^ /usr/local/include/uhd/utils/atomic.hpp:38:9: error: expected primary-expression before ‘const’ const T value, ^ /usr/local/include/uhd/utils/atomic.hpp:39:9: error: expected primary-expression before ‘const’ const double timeout ^ /usr/local/include/uhd/utils/atomic.hpp:40:5: error: expression list treated as compound expression in initializer [-fpermissive] ){ ^ /usr/local/include/uhd/utils/atomic.hpp:40:6: error: expected ‘;’ before ‘{’ token ){ ^ /usr/local/include/uhd/utils/atomic.hpp:76:14: error: ‘atomic’ in namespace ‘std’ does not name a template type std::atomic _locked; ^ /usr/local/include/uhd/utils/atomic.hpp: In member function ‘void uhd::simple_claimer::release()’: /usr/local/include/uhd/utils/atomic.hpp:64:13: error: ‘_locked’ was not declared in this scope _locked = false; ^ /usr/local/include/uhd/utils/atomic.hpp: In member function ‘bool uhd::simple_claimer::claim_with_wait(double)’: /usr/local/include/uhd/utils/atomic.hpp:68:39: error: missing template arguments before ‘(’ token if (spin_wait_with_timeout(_locked, false, timeout)){ ^ /usr/local/include/uhd/utils/atomic.hpp:68:40: error: ‘_locked’ was not declared in this scope if (spin_wait_with_timeout(_locked, false, timeout)){ ^ /usr/local/src/gr-analysis/apps/record/specrec.cpp: At global scope: /usr/local/src/gr-analysis/apps/record/specrec.cpp:62:6: error: ‘atomic_uint32_t’ in namespace ‘uhd’ does not name a type uhd::atomic_uint32_t num_elements; ^ /usr/local/src/gr-analysis/apps/record/specrec.cpp: In function ‘void usrp_write_samples_to_file(int, uhd::transport::bounded_buffer<circbuff_element>*, bool)’: /usr/local/src/gr-analysis/apps/record/specrec.cpp:86:3: error: ‘num_elements’ was not declared in this scope num_elements.dec(); ^ /usr/local/src/gr-analysis/apps/record/specrec.cpp: In function ‘void recv_to_file(uhd::usrp::multi_usrp::sptr, const string&, const string&, const string&, const string&, size_t, long long unsigned int, long long unsigned int, double, bool, bool, bool, bool, bool, bool, bool)’: /usr/local/src/gr-analysis/apps/record/specrec.cpp:345:5: error: ‘num_elements’ was not declared in this scope num_elements.inc(); ^ /usr/local/src/gr-analysis/apps/record/specrec.cpp:417:34: error: ‘num_elements’ was not declared in this scope boost::uint32_t cur_cb_size= num_elements.read(); ^ apps/record/CMakeFiles/specrec.dir/build.make:62: recipe for target 'apps/record/CMakeFiles/specrec.dir/specrec.cpp.o' failed make[2]: *** [apps/record/CMakeFiles/specrec.dir/specrec.cpp.o] Error 1 CMakeFiles/Makefile2:657: recipe for target 'apps/record/CMakeFiles/specrec.dir/all' failed make[1]: *** [apps/record/CMakeFiles/specrec.dir/all] Error 2 Makefile:138: recipe for target 'all' failed make: *** [all] Error 2 PyBOMBS.Packager.source - ERROR - Build failed. See output above for error messages. PyBOMBS.Packager.source - ERROR - Problem occurred while building package gr-analysis: Build failed. PyBOMBS.install_manager - ERROR - Error installing package gr-analysis. Aborting. user@gump-Lenovo:~$

sudo pybombs --config std=c++11 install gr-analysis

sudo pybombs --config std=gnu++11 install gr-analysis

gumpgraves avatar Jun 08 '17 13:06 gumpgraves

Thanks for the feedback. Can you tell me what version of UHD / GR you are building with? We typically use GR 3.7.8 and UHD 3.8.5.

garverp avatar Jun 08 '17 14:06 garverp

Yessir,

UHD 3.11.0 ( g1da86f9c )

and GR 3.7.12 ( g0e32fcaf )

Hope this helps.

BT/AR Chris "Gump" Graves

On 06/08/2017 10:12 AM, garverp wrote:

Thanks for the feedback. Can you tell me what version of UHD / GR you are building with? We typically use GR 3.7.8 and UHD 3.8.5.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/garverp/gr-analysis/issues/6#issuecomment-307116033, or mute the thread https://github.com/notifications/unsubscribe-auth/AGe1DVSM7yQS_RY6PUmdJHfZB2wOsfCfks5sCAFjgaJpZM4N0FM-.

gumpgraves avatar Jun 08 '17 14:06 gumpgraves

Comments in issue #7 are reported to fix this. Will try and get a pull request together. In the mean time, try the changes there.

garverp avatar Aug 11 '17 12:08 garverp