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

Cant build gnuradio get_system_time(); #1706

Closed
fipso opened this issue Mar 25, 2018 · 11 comments
Closed

Cant build gnuradio get_system_time(); #1706

fipso opened this issue Mar 25, 2018 · 11 comments

Comments

@fipso
Copy link

fipso commented Mar 25, 2018

PyBOMBS - INFO - PyBOMBS Version 2.3.2
PyBOMBS.prefix - WARNING - There already is a prefix in `/usr/local'.
Continue using this path Y/[N]? y
Alias `default_prx' already exists, overwrite Y/[N]? y
PyBOMBS.prefix - INFO - Installing default packages for prefix...
PyBOMBS.prefix - INFO - 
  - gnuradio
PyBOMBS.install_manager - INFO - Phase 1: Creating install tree and installing binary packages:
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
Install tree:
|
\- gnuradio
PyBOMBS.install_manager - INFO - Phase 2: Recursively installing source packages to prefix:
PyBOMBS.install_manager - INFO - Installing package: gnuradio
PyBOMBS.PackageManager - WARNING - A source build for package gnuradio was requested, but binary install was found!
Install gnuradio from source despite binary install available Y/[N]? y
PyBOMBS.Packager.source - WARNING - Build dir already exists: /usr/local/src/gnuradio/build
Building:    (100%) [================================================================================================================]
[  4%] Built target volk_obj
[  4%] Built target volk
[  4%] Built target test_all
[  4%] Built target volk-config-info
[  4%] Built target volk_profile
[  4%] Built target pygen_volk_python_volk_modtool_be0ec
[  5%] Built target pygen_volk_python_volk_modtool_b1063
[  5%] Built target pmt_generated
[  6%] Built target gnuradio-pmt
[  9%] Built target gnuradio-runtime
[ 10%] Built target test-gnuradio-runtime
[ 10%] Built target gr_runtime_test
[ 10%] Built target test-gnuradio-pmt
[ 10%] Built target gr_pmt_test
[ 10%] Built target gnuradio-config-info
[ 10%] Built target pmt_swig_swig_doc
[ 10%] Built target _pmt_swig_swig_tag
[ 10%] Built target pmt_swig_gnuradio_runtime_swig_7dd5e
[ 11%] Built target pygen_gnuradio_runtime_swig_32efc
[ 11%] Built target _pmt_swig
[ 11%] Built target runtime_swig_swig_doc
[ 11%] Built target pmt_swig
[ 11%] Built target _runtime_swig_swig_tag
[ 11%] Built target runtime_swig_gnuradio_runtime_swig_7dd5e
[ 11%] Built target _runtime_swig
[ 11%] Built target pygen_gnuradio_runtime_swig_6a954
[ 11%] Built target pygen_gnuradio_runtime_python_gnuradio_04b8e
[ 11%] Built target pygen_gnuradio_runtime_python_gnuradio_gr_f8332
[ 11%] Built target pygen_gnuradio_runtime_python_gnuradio_gru_717d6
[ 11%] Built target pygen_gnuradio_runtime_python_gnuradio_ctrlport_3cc38
[ 11%] Built target pygen_gnuradio_runtime_python_gnuradio_ctrlport_39365
[ 11%] Built target pygen_gnuradio_runtime_python_pmt_28d67
[ 11%] Built target pygen_gnuradio_runtime_examples_mp_sched_13cbd
[ 12%] Built target pygen_gnuradio_runtime_examples_network_753a9
[ 12%] Built target pygen_gnuradio_runtime_examples_volk_benchmark_0202e
[ 13%] Built target blocks_generated_includes
[ 28%] Built target gnuradio-blocks
[ 29%] Built target test-gr-blocks
[ 30%] Built target pygen_gr_blocks_python_blocks_bf940
[ 30%] Built target pygen_gr_blocks_python_grc_gnuradio_88da0
[ 30%] Built target pygen_gr_blocks_python_grc_gnuradio_b4e0e
[ 30%] Built target pygen_gr_blocks_swig_30d22
[ 30%] Built target blocks_swig10_swig_doc
[ 30%] Built target _blocks_swig10_swig_tag
[ 30%] Built target blocks_swig10_gr_blocks_swig_a6e57
[ 30%] Built target pygen_gr_blocks_swig_90afe
[ 30%] Built target blocks_swig9_swig_doc
[ 30%] Built target _blocks_swig9_swig_tag
[ 30%] Built target blocks_swig9_gr_blocks_swig_a6e57
[ 31%] Built target pygen_gr_blocks_swig_f14d2
[ 31%] Built target blocks_swig8_swig_doc
[ 31%] Built target _blocks_swig8_swig_tag
[ 31%] Built target blocks_swig8_gr_blocks_swig_a6e57
[ 31%] Built target _blocks_swig8
[ 31%] Built target blocks_swig7_swig_doc
[ 31%] Built target _blocks_swig7_swig_tag
[ 31%] Built target blocks_swig7_gr_blocks_swig_a6e57
[ 31%] Built target _blocks_swig7
[ 31%] Built target blocks_swig2_swig_doc
[ 31%] Built target _blocks_swig2_swig_tag
[ 31%] Built target blocks_swig2_gr_blocks_swig_a6e57
[ 32%] Built target _blocks_swig2
[ 33%] Built target pygen_gr_blocks_swig_61dee
[ 33%] Built target blocks_swig1_swig_doc
[ 33%] Built target _blocks_swig1_swig_tag
[ 33%] Built target blocks_swig1_gr_blocks_swig_a6e57
[ 33%] Built target _blocks_swig1
[ 33%] Built target blocks_swig0_swig_doc
[ 33%] Built target _blocks_swig0_swig_tag
[ 33%] Built target blocks_swig5_swig_doc
[ 34%] Built target _blocks_swig5_swig_tag
[ 35%] Built target blocks_swig5_gr_blocks_swig_a6e57
[ 35%] Built target pygen_gr_blocks_swig_9cc30
[ 35%] Built target blocks_swig6_swig_doc
[ 35%] Built target _blocks_swig6_swig_tag
[ 35%] Built target pygen_gr_blocks_swig_6bfdb
[ 35%] Built target blocks_swig3_swig_doc
[ 35%] Built target _blocks_swig3_swig_tag
[ 35%] Built target blocks_swig3_gr_blocks_swig_a6e57
[ 36%] Built target blocks_swig0_gr_blocks_swig_a6e57
[ 37%] Built target _blocks_swig0
[ 38%] Built target _blocks_swig9
[ 38%] Built target pygen_gr_blocks_swig_2313c
[ 38%] Built target pygen_gr_blocks_swig_0707e
[ 38%] Built target _blocks_swig3
[ 38%] Built target _blocks_swig10
[ 38%] Built target pygen_gr_blocks_swig_6a198
[ 38%] Built target blocks_swig4_swig_doc
[ 38%] Built target _blocks_swig4_swig_tag
[ 38%] Built target blocks_swig4_gr_blocks_swig_a6e57
[ 38%] Built target pygen_gr_blocks_swig_a4b9e
[ 38%] Built target pygen_gr_blocks_swig_18cc3
[ 38%] Built target _blocks_swig4
[ 38%] Built target _blocks_swig5
[ 38%] Built target blocks_swig6_gr_blocks_swig_a6e57
[ 38%] Built target _blocks_swig6
[ 38%] Built target pygen_gr_blocks_swig_00b9e
[ 38%] Built target pygen_gr_blocks_examples_tags_01385
[ 38%] Built target pygen_gr_blocks_examples_ctrlport_7a3a7
[ 38%] Built target pygen_grc_72750
[ 39%] Built target grc_generated_xml
[ 39%] Built target pygen_grc_gui_58583
[ 39%] Built target pygen_grc_core_36561
[ 39%] Built target pygen_grc_core_generator_3f96c
[ 39%] Built target pygen_grc_core_utils_4f966
[ 39%] Built target pygen_grc_scripts_48b0a
[ 41%] Built target gnuradio-fec
[ 41%] Built target gr_fec_rstest
[ 41%] Built target fec_swig_swig_doc
[ 41%] Built target _fec_swig_swig_tag
[ 41%] Built target fec_swig_gr_fec_swig_95135
[ 41%] Built target pygen_gr_fec_swig_e0a09
[ 41%] Built target _fec_swig
[ 42%] Built target pygen_gr_fec_python_fec_43c2e
[ 42%] Built target pygen_gr_fec_python_fec_polar_8c35d
[ 42%] Built target pygen_gr_fec_python_fec_polar_58527
[ 42%] Built target pygen_gr_fec_python_fec_LDPC_a3607
[ 43%] Built target gnuradio-fft
[ 43%] Built target fft_swig_swig_doc
[ 43%] Built target _fft_swig_swig_tag
[ 43%] Built target fft_swig_gr_fft_swig_7c2a8
[ 43%] Built target pygen_gr_fft_swig_2d827
[ 43%] Built target _fft_swig
[ 43%] Built target pygen_gr_fft_python_fft_61d88
[ 43%] Built target filter_generated_includes
[ 46%] Built target gnuradio-filter
[ 46%] Built target test-gr-filter
[ 46%] Built target filter_swig_swig_doc
[ 47%] Built target _filter_swig_swig_tag
[ 47%] Built target filter_swig_gr_filter_swig_2b734
[ 47%] Built target _filter_swig
[ 47%] Built target pygen_gr_filter_swig_44f36
[ 47%] Built target pygen_gr_filter_python_filter_9b69d
[ 47%] Built target pygen_gr_filter_python_filter_design_285fd
[ 47%] Built target pygen_gr_filter_python_filter_gui_42873
[ 47%] Built target pygen_gr_filter_apps_e326c
[ 48%] Built target pygen_gr_filter_examples_dadbc
[ 48%] Built target analog_generated_includes
[ 51%] Built target gnuradio-analog
[ 51%] Built target test-gr-analog
[ 51%] Built target analog_swig_swig_doc
[ 51%] Built target _analog_swig_swig_tag
[ 52%] Built target analog_swig_gr_analog_swig_343b7
[ 52%] Built target _analog_swig
[ 52%] Built target pygen_gr_analog_swig_bb043
[ 52%] Built target pygen_gr_analog_python_analog_b5b1e
[ 52%] Built target pygen_gr_analog_examples_99503
[ 52%] Built target pygen_gr_analog_examples_tags_1eec1
[ 52%] Built target digital_generated_includes
[ 57%] Built target gnuradio-digital
[ 57%] Built target test-gr-digital
[ 57%] Built target digital_swig2_swig_doc
[ 57%] Built target _digital_swig2_swig_tag
[ 57%] Built target digital_swig2_gr_digital_swig_61a2d
[ 58%] Built target pygen_gr_digital_swig_59782
[ 58%] Built target digital_swig0_swig_doc
[ 58%] Built target _digital_swig0_swig_tag
[ 59%] Built target digital_swig0_gr_digital_swig_61a2d
[ 59%] Built target pygen_gr_digital_swig_fd436
[ 59%] Built target _digital_swig0
[ 59%] Built target digital_swig1_swig_doc
[ 59%] Built target _digital_swig1_swig_tag
[ 59%] Built target digital_swig1_gr_digital_swig_61a2d
[ 60%] Built target _digital_swig1
[ 60%] Built target pygen_gr_digital_swig_2aca5
[ 60%] Built target pygen_gr_digital_swig_60bd1
[ 60%] Built target _digital_swig2
[ 60%] Built target pygen_gr_digital_python_digital_6c2bc
[ 60%] Built target pygen_gr_digital_python_digital_133dd
[ 60%] Built target pygen_gr_digital_python_grc_gnuradio_eefbc
[ 61%] Built target pygen_gr_digital_examples_4e1c2
[ 61%] Built target pygen_gr_digital_examples_0d34d
[ 61%] Built target pygen_gr_digital_examples_72271
[ 63%] Built target gnuradio-dtv
[ 63%] Built target dtv_swig_swig_doc
[ 63%] Built target _dtv_swig_swig_tag
[ 63%] Built target dtv_swig_gr_dtv_swig_8366b
[ 63%] Built target _dtv_swig
[ 63%] Built target pygen_gr_dtv_swig_53e1e
[ 63%] Built target pygen_gr_dtv_python_dtv_5deec
[ 63%] Built target pygen_gr_dtv_examples_5b1c1
[ 63%] Built target pygen_gr_dtv_apps_588ab
[ 63%] Built target atsci_viterbi_gen
[ 65%] Built target gnuradio-atsc
[ 66%] Built target test_atsci
[ 66%] Built target atsc_swig_swig_doc
[ 66%] Built target _atsc_swig_swig_tag
[ 66%] Built target atsc_swig_gr_atsc_swig_4c1be
[ 66%] Built target _atsc_swig
[ 66%] Built target pygen_gr_atsc_swig_2c208
[ 66%] Built target pygen_gr_atsc_python_atsc_19bc5
[ 66%] Built target pygen_gr_atsc_python_atsc_d52e6
[ 67%] Built target gnuradio-audio
[ 67%] Built target audio_swig_swig_doc
[ 67%] Built target _audio_swig_swig_tag
[ 67%] Built target audio_swig_gr_audio_swig_675a4
[ 67%] Built target _audio_swig
[ 67%] Built target pygen_gr_audio_swig_9ca83
[ 67%] Built target pygen_gr_audio_python_audio_ef86b
[ 68%] Built target pygen_gr_audio_examples_python_e1bdd
[ 68%] Built target dial_tone
[ 69%] Built target gnuradio-channels
[ 69%] Built target channels_swig_swig_doc
[ 69%] Built target _channels_swig_swig_tag
[ 69%] Built target channels_swig_gr_channels_swig_733d0
[ 69%] Built target _channels_swig
[ 69%] Built target pygen_gr_channels_swig_11704
[ 69%] Built target pygen_gr_channels_python_channels_f688a
[ 70%] Built target gnuradio-noaa
[ 70%] Built target noaa_swig_swig_doc
[ 70%] Built target _noaa_swig_swig_tag
[ 70%] Built target noaa_swig_gr_noaa_swig_6fd1f
[ 70%] Built target _noaa_swig
[ 70%] Built target pygen_gr_noaa_swig_f6dbe
[ 71%] Built target pygen_gr_noaa_python_noaa_060e0
[ 71%] Built target gnuradio-pager
[ 71%] Built target pygen_gr_pager_python_pager_7ad81
[ 71%] Built target pager_swig_swig_doc
[ 71%] Built target _pager_swig_swig_tag
[ 71%] Built target pager_swig_gr_pager_swig_b2a57
[ 71%] Built target pygen_gr_pager_swig_ae5af
[ 71%] Built target _pager_swig
[ 71%] Built target pygen_gr_pager_apps_df823
[ 75%] Built target gnuradio-qtgui
[ 75%] Built target display_qt
[ 75%] Built target qtgui_swig_swig_doc
[ 75%] Built target _qtgui_swig_swig_tag
[ 75%] Built target qtgui_swig_gr_qtgui_swig_59a4d
[ 76%] Built target _qtgui_swig
[ 76%] Built target pygen_gr_qtgui_swig_07d69
[ 76%] Built target pygen_gr_qtgui_python_qtgui_e3bae
[ 77%] Built target pygen_gr_qtgui_examples_af20c
[ 78%] Built target pygen_gr_qtgui_apps_4d5b1
[ 78%] Built target pygen_gr_qtgui_apps_bab28
[ 79%] Built target trellis_generated_includes
[ 84%] Built target gnuradio-trellis
[ 84%] Built target gr_trellis_xml
[ 84%] Built target gr_trellis_html
[ 84%] Built target trellis_swig0_swig_doc
[ 84%] Built target _trellis_swig0_swig_tag
[ 84%] Built target trellis_swig0_gr_trellis_swig_30622
[ 85%] Built target pygen_gr_trellis_swig_f8ab8
[ 85%] Built target pygen_gr_trellis_swig_b72c0
[ 85%] Built target _trellis_swig0
[ 85%] Built target trellis_swig1_swig_doc
[ 85%] Built target _trellis_swig1_swig_tag
[ 85%] Built target trellis_swig1_gr_trellis_swig_30622
[ 85%] Built target pygen_gr_trellis_swig_f5fac
[ 86%] Built target _trellis_swig1
[ 86%] Built target pygen_gr_trellis_python_trellis_f1421
[ 86%] Built target pygen_gr_trellis_examples_python_6580f
[ 86%] Built target gnuradio-uhd
[ 86%] Built target tags_demo
[ 86%] Built target uhd_swig_swig_doc
[ 86%] Built target _uhd_swig_swig_tag
[ 86%] Built target uhd_swig_gr_uhd_swig_5e3ce
[ 86%] Building CXX object gr-uhd/swig/CMakeFiles/_uhd_swig.dir/uhd_swigPYTHON_wrap.cxx.o
/usr/local/src/gnuradio/build/gr-uhd/swig/uhd_swigPYTHON_wrap.cxx: In Funktion »PyObject* _wrap_time_spec_t_get_system_time(PyObject*, PyObject*)«:
/usr/local/src/gnuradio/build/gr-uhd/swig/uhd_swigPYTHON_wrap.cxx:19850:34: Fehler: »get_system_time« ist kein Element von »uhd::time_spec_t«
       result = uhd::time_spec_t::get_system_time();
                                  ^~~~~~~~~~~~~~~
make[2]: *** [gr-uhd/swig/CMakeFiles/_uhd_swig.dir/build.make:71: gr-uhd/swig/CMakeFiles/_uhd_swig.dir/uhd_swigPYTHON_wrap.cxx.o] Fehler 1
make[1]: *** [CMakeFiles/Makefile2:13340: gr-uhd/swig/CMakeFiles/_uhd_swig.dir/all] Fehler 2
make: *** [Makefile:163: all] Fehler 2
PyBOMBS.Packager.source - ERROR - Build failed. See output above for error messages.
PyBOMBS.Packager.source - ERROR - Problem occurred while building package gnuradio:
Build failed.
PyBOMBS.install_manager - ERROR - Error installing package gnuradio. Aborting.
@dkozel
Copy link
Contributor

dkozel commented Mar 26, 2018

Hi @fipso. UHD removed the get_system_time function from time_spec_t within the last few months. Errors like this can occur when the python templates don't get correctly rebuilt.

The simplest answer is usually to force a rebuild by deleting the gr-uhd build directory, /usr/local/src/gnuradio/build/gr-uhd/ in your case. Then rerun the build and it will regenerate the necessary swig files.

As a side note, having both a source and system install of GNU Radio, or any other package, can lead to confusing linking problems. If you've done that intentionally then you're probably already keeping track of what software is built against one or the other.

@marcusmueller
Copy link
Member

I absolutely agree with @dkozel – the problem here is that somehow you're not building with the same headers. As such, it's not a GNU Radio bug, and I'll have to close the issue.

@XavierTolza
Copy link

Deleting the gr-udh folder did not work for me. I have only one PYBOMBS prefix "default" in ~/.pybombs/prefix/default. After a rm -R ~/.pybombs/prefix/default/src/gnuradio/build/gr-uhd, and running pybombs install gnuradio, things get re-compiled but I get the same error as previously.

Output from cmd line is the following:
cmdline_output.txt

@zbcwilliam
Copy link

zbcwilliam commented Jul 27, 2018

Hi @fipso, I have encountered the same problem. the UHD (v3.13) has removed uhd::time_spec_t::get_system_time() and added uhd::get_system_time(); by running pybombs install gnuradio command,it calls the uhd::time_spec_t::get_system_time(), thus resulting in the problem.

I have managed to solve the bug by modifing the /usr/local/src/gnuradio/build/gr-uhd/swig/uhd_swigPYTHON_wrap.cxx, in which uhd::time_spec_t::get_system_time() is called; here is what i have done:

Replace

result = uhd::time_spec_t::get_system_time();

with

namespace pt = boost::posix_time;                                                                                                                                                                    pt::ptime time_now = pt::microsec_clock::universal_time();
pt::time_duration time_dur = time_now - pt::from_time_t(0);
result = uhd::time_spec_t(time_t(time_dur.total_seconds()),long(time_dur.fractional_seconds()),double(pt::time_duration::ticks_per_second()));

then run the command pybombs install gnuradio, you will do fine.

@fipso
Copy link
Author

fipso commented Jul 29, 2018

Thanks a lot. Will try that

@pbybee
Copy link

pbybee commented Aug 20, 2018

@zbcwilliam your replacement worked to get gnuradio installed for me. Thanks

@wgaylord
Copy link

wgaylord commented Nov 8, 2018

So this seems to still be a problem. Any solutions to it? Like fixing gnuradio to compile with the version of UHD it compiles from source.

@lordcape
Copy link

lordcape commented Mar 8, 2019

@zbcwilliam thanks!

@gusosborne
Copy link

@zbcwilliam thank you sir!!

@syvic
Copy link

syvic commented Jun 23, 2020

Same problem and @zbcwilliam workarround works perfectly. Thanks a lot!

@shw1n
Copy link

shw1n commented Nov 24, 2020

I developed this issue after accidentally installing gnuradio from a repository while already having a working installation, and deleting the gr-uhd build folder wasn't working for me. What did work:

dpkg -l | grep -i uhd

This showed me I had an older version of libuhd-dev installed, after removing that via

dpkg --remove libuhd-dev

I was able to rebuild gnuradio with no issues

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