GnuRadio gr-iio build

Hi all,

I'm trying to build gr-iio but it breaks on the unavailability of some gnu radio source files

Using this procedure:

git clone github.com/.../gr-iio.git
cd gr-iio
cmake ..
make

fatal error: gnuradio/analog/sig_source_f.h: No such file or directory
#include <gnuradio/analog/sig_source_f.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
lib/CMakeFiles/gnuradio-iio.dir/build.make:337: recipe for target 'lib/CMakeFiles/gnuradio-iio.dir/iio_math_impl.cc.o' failed
make[2]: *** [lib/CMakeFiles/gnuradio-iio.dir/iio_math_impl.cc.o] Error 1
CMakeFiles/Makefile2:135: recipe for target 'lib/CMakeFiles/gnuradio-iio.dir/all' failed
make[1]: *** [lib/CMakeFiles/gnuradio-iio.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

I built gnuradio 3.8.0 following the recipe below (running on Ubuntu Bionic 18.04 with python3 installed).

https://wiki.gnuradio.org/index.php/InstallingGR#From_Source

Gnuradio stand alone works, libiio works fine, python bindings also.

I presume gnuradio needs to install the include files to be able to build gr-iio correctly. Is there a quick fix?

Thanks

Parents
  • 0
    •  Analog Employees 
    on Dec 10, 2019 3:00 PM over 1 year ago

    Are you able to locate the file by doing the following:

    $locate sig_source_f.h

    - Srikanth

  • 0
    •  Analog Employees 
    on Dec 10, 2019 3:13 PM over 1 year ago in reply to SrikanthPagadarai

    GNU Radio 3.8 requires a specific branch: https://github.com/analogdevicesinc/gr-iio/tree/upgrade-3.8

    -Travis

  • Then we get some other errors from gnuradio. Sorry but I'm lost here.

    Traceback (most recent call last):
      File "/usr/local/lib/python3.6/dist-packages/iio/iio_swig.py", line 14, in swig_import_helper
        return importlib.import_module(mname)
      File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "<frozen importlib._bootstrap>", line 994, in _gcd_import
      File "<frozen importlib._bootstrap>", line 971, in _find_and_load
      File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 658, in _load_unlocked
      File "<frozen importlib._bootstrap>", line 571, in module_from_spec
      File "<frozen importlib._bootstrap_external>", line 922, in create_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
    ImportError: libgnuradio-iio.so...: cannot open shared object file: No such file or directory

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/usr/local/lib/python3.6/dist-packages/iio/__init__.py", line 30, in <module>
        from .iio_swig import *
      File "/usr/local/lib/python3.6/dist-packages/iio/iio_swig.py", line 17, in <module>
        _iio_swig = swig_import_helper()
      File "/usr/local/lib/python3.6/dist-packages/iio/iio_swig.py", line 16, in swig_import_helper
        return importlib.import_module('_iio_swig')
      File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
    ModuleNotFoundError: No module named '_iio_swig'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/usr/local/lib/python3.6/dist-packages/iio/iio_swig.py", line 14, in swig_import_helper
        return importlib.import_module(mname)
      File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "<frozen importlib._bootstrap>", line 994, in _gcd_import
      File "<frozen importlib._bootstrap>", line 971, in _find_and_load
      File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 658, in _load_unlocked
      File "<frozen importlib._bootstrap>", line 571, in module_from_spec
      File "<frozen importlib._bootstrap_external>", line 922, in create_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
    ImportError: libgnuradio-iio.so...: cannot open shared object file: No such file or directory

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "top_block.py", line 33, in <module>
        import iio
      File "/usr/local/lib/python3.6/dist-packages/iio/__init__.py", line 36, in <module>
        from .iio_swig import *
      File "/usr/local/lib/python3.6/dist-packages/iio/iio_swig.py", line 17, in <module>
        _iio_swig = swig_import_helper()
      File "/usr/local/lib/python3.6/dist-packages/iio/iio_swig.py", line 16, in swig_import_helper
        return importlib.import_module('_iio_swig')
      File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
    ModuleNotFoundError: No module named '_iio_swig'

  • 0
    •  Analog Employees 
    on Dec 10, 2019 10:29 PM over 1 year ago in reply to radiohead

    What files are in the folder "/usr/local/lib/python3.6/dist-packages/iio/"?

    Have you tried re-installing gr-iio once the bindings were removed?

    -Travis

  • The folder "/usr/local/lib/python3.6/dist-packages/iio/" contains files installed by gr-iio (apparent when performing the make install)

    I did not remove the bindings because I still want to be able to interface with the pluto through python3, I simply renamed the iio.py file to another name.

    I tried to reinstall the gr-iio package after that but to no avail.

  • 0
    •  Analog Employees 
    on Dec 13, 2019 12:39 AM over 1 year ago in reply to radiohead

    Where is libgnuradio-iio.so installed? and is this on path?

    -Travis

  • /usr/local/lib/libgnuradio-iio.so
    /usr/local/lib/libgnuradio-iio.so.0
    /usr/local/lib/libgnuradio-iio.so.0.3

Reply Children
  • Any new ideas Travis?

    Alternatively - is there a safe software setup you recommend to install both gnuradio and the iio bindings on the same machine (ubuntu version, python version, gnuradio version, ...) without running into installation issues?

  • 0
    •  Analog Employees 
    on Dec 18, 2019 1:14 AM over 1 year ago in reply to radiohead

    Can you list the files in this folder: "/usr/local/lib/python3.6/dist-packages/iio/"? I just did an install of maint-3.8 and gr-iio imported fine.

    Alternatively - is there a safe software setup you recommend to install both gnuradio and the iio bindings on the same machine (ubuntu version, python version, gnuradio version, ...) without running into installation issues?

    The python bindings and gr-iio blocks share the same module name (iio). To use them both the iio bindings cannot be directly on path. So you will need to import them through a subfolder. Otherwise, python just ignores one.

    -Travis