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
Are you able to locate the file by doing the following:
$locate sig_source_f.h
- Srikanth
GNU Radio 3.8 requires a specific branch: https://github.com/analogdevicesinc/gr-iio/tree/upgrade-3.8
-Travis
Wow Travis, you nailed it again. gr-iio can be built and installed.
However, gnu-radio now complains that the iio module has no attribute pluto_source.
Could this be related to the rollback of libiio you recommended me to do on a previous ticket last friday?
Cheers
In GR-3.8 we had to put the gr-iio module in a different place, so sometimes the bindings interfere since they have the same module name (iio). I would remove the bindings iio.py file.
-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'
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.
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
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?