analogdevicesinc / gr-iio

IIO blocks for GNU Radio
GNU General Public License v3.0
94 stars 62 forks source link

Drop boost::chrono dependency #57

Closed ggajoch closed 4 years ago

ggajoch commented 4 years ago

On Arch Linux (python 3.8.0 + gnuradio 3.8.0.0-5) running gr-iio based flowgraph result in following error:

Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/iio/__init__.py", line 30, in <module>
    from .iio_swig import *
  File "/usr/lib/python3.8/site-packages/iio/iio_swig.py", line 13, in <module>
    from . import _iio_swig
ImportError: /usr/lib/libgnuradio-iio.so...: undefined symbol: _ZN5boost6chrono12steady_clock3nowEv

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "file_tx.py", line 34, in <module>
    import iio
  File "/usr/lib/python3.8/site-packages/iio/__init__.py", line 36, in <module>
    from .iio_swig import *
  File "/usr/lib/python3.8/site-packages/iio/iio_swig.py", line 13, in <module>
    from . import _iio_swig
ImportError: /usr/lib/libgnuradio-iio.so...: undefined symbol: _ZN5boost6chrono12steady_clock3nowEv

This pull request drops boost::chrono in favor of using std::chrono, which fixed the error. Tested on desktop archlinux (x86_64) + on ADRV9361-Z7035.

commodo commented 4 years ago

Hey,

Thanks for the patch. Could you add a Signed-off-by tag ?

Your description in the PR is useful; could you also add it to the commit message? That way, it's easier to track in git history.

Thanks Alex

ggajoch commented 4 years ago

Thanks for the comment and sorry for late reply. This should be fixed now.

Doom4535 commented 4 years ago

I just merged this locally and it solved #79 without needing to use @ivanmikh's CMake patches. Is it possible to rerun against the CI to see if the failures were related to a CI config?

*fixed typo

commodo commented 4 years ago

I forgot about this. I guess we could merge this. If no objections, I'll do it tomorrow.

Though, probably we'd need to also fix the CI a bit. Maybe update the images to Ubuntu 20.04 docker images, since GNUradio 3.8 comes packaged, so less build-time.