Hi,
I tried to build https://cgran.org/wiki/AIS against gnuradio-3.6, and i
fails.
As 3.6 brings in a new build system, I decided to give it a go on the
AIS module. I based everything on gr-howto-write-a-block
I can build and install everything, here is what get installed:
cgagneraud@pluton:~/Downloads/gr-ais-ng/build> sudo make install
[ 22%] Built target gnuradio-ais
[ 27%] Built target _ais_swig_swig_tag
[ 31%] Built target _ais_swig_doc_tag
[ 54%] Built target _ais_swig
[ 81%] Built target pygen_swig_a8cc0
[ 90%] Built target pygen_python_a8569
[100%] Built target pygen_apps_4b161
Linking CXX shared module CMakeFiles/CMakeRelink.dir/_ais_swig.so
Install the project…
– Install configuration: “Release”
– Up-to-date: /usr/local/include/ais/ais_unstuff.h
– Up-to-date: /usr/local/include/ais/ais_shift.h
– Up-to-date: /usr/local/include/ais/ais_parse.h
– Up-to-date: /usr/local/include/ais/ais_invert.h
– Up-to-date: /usr/local/include/ais/ais_extended_lms_dfe_ff.h
– Up-to-date: /usr/local/lib/libgnuradio-ais.so
– Installing: /usr/local/lib/python2.7/site-packages/ais/_ais_swig.so
– Installing: /usr/local/lib/python2.7/site-packages/ais/ais_swig.py
– Installing: /usr/local/lib/python2.7/site-packages/ais/ais_swig.pyc
– Installing: /usr/local/lib/python2.7/site-packages/ais/ais_swig.pyo
– Installing: /usr/local/include/ais/swig/ais_swig.i
– Up-to-date: /usr/local/include/ais/swig/ais_swig_doc.i
– Up-to-date: /usr/local/lib/python2.7/site-packages/ais/init.py
– Up-to-date: /usr/local/lib/python2.7/site-packages/ais/init.pyc
– Up-to-date: /usr/local/lib/python2.7/site-packages/ais/init.pyo
– Up-to-date: /usr/local/bin/ais_decode.py
– Up-to-date: /usr/local/bin/ais_demod.py
But now, if I want to test one of the “app”, this is what i get:
cgagneraud@pluton:~/Downloads/gnuradio-3.6.0> ais_decode.py
Traceback (most recent call last):
File “/usr/local/bin/ais_decode.py”, line 13, in
import ais
File “/usr/local/lib/python2.7/site-packages/ais/init.py”, line
46, in
from ais_swig import *
File “/usr/local/lib/python2.7/site-packages/ais/ais_swig.py”, line
26, in
_ais_swig = swig_import_helper()
File “/usr/local/lib/python2.7/site-packages/ais/ais_swig.py”, line
22, in swig_import_helper
_mod = imp.load_module(‘_ais_swig’, fp, pathname, description)
ImportError: /usr/local/lib/python2.7/site-packages/ais/_ais_swig.so:
undefined symbol: _Z14ais_make_shiftv
I have the same result if i try to “import ais” within a python console.
now ldd tells me that:
cgagneraud@pluton:~/Downloads/gnuradio-3.6.0> ldd
/usr/local/lib/python2.7/site-packages/ais/_ais_swig.so
linux-gate.so.1 => (0xffffe000)
libpython2.7.so.1.0 => /usr/lib/libpython2.7.so.1.0
(0xb75c4000)
libgnuradio-ais.so => /usr/local/lib/libgnuradio-ais.so
(0xb75bb000)
libgruel-3.6.0.so.0.0.0 =>
/usr/local/lib/libgruel-3.6.0.so.0.0.0 (0xb7580000)
libgnuradio-core-3.6.0.so.0.0.0 =>
/usr/local/lib/libgnuradio-core-3.6.0.so.0.0.0 (0xb73c7000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb72d8000)
libm.so.6 => /lib/libm.so.6 (0xb72ad000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb728f000)
libc.so.6 => /lib/libc.so.6 (0xb7122000)
libpthread.so.0 => /lib/libpthread.so.0 (0xb7107000)
libdl.so.2 => /lib/libdl.so.2 (0xb7102000)
libutil.so.1 => /lib/libutil.so.1 (0xb70fd000)
libboost_date_time.so.1.46.1 =>
/usr/lib/libboost_date_time.so.1.46.1 (0xb70ec000)
libboost_program_options.so.1.46.1 =>
/usr/lib/libboost_program_options.so.1.46.1 (0xb708c000)
libboost_filesystem.so.1.46.1 =>
/usr/lib/libboost_filesystem.so.1.46.1 (0xb706e000)
libboost_system.so.1.46.1 => /usr/lib/libboost_system.so.1.46.1
(0xb706a000)
libboost_thread.so.1.46.1 => /usr/lib/libboost_thread.so.1.46.1
(0xb7051000)
libfftw3f.so.3 => /usr/lib/libfftw3f.so.3 (0xb6efe000)
librt.so.1 => /lib/librt.so.1 (0xb6ef5000)
libvolk.so.0.0.0 => /usr/local/lib/libvolk.so.0.0.0
(0xb6dfb000)
/lib/ld-linux.so.2 (0xb7798000)
And a dirty grep for the symbol gives:
cgagneraud@pluton:~/Downloads/gr-ais-ng/build> grep _Z14ais_make_shiftv
/usr/local/lib/libgnuradio-ais.so
/usr/local/lib/python2.7/site-packages/ais/_ais_swig.so
Binary file /usr/local/lib/libgnuradio-ais.so matches
Binary file /usr/local/lib/python2.7/site-packages/ais/_ais_swig.so
matches
So, /lib/python2.7/site-packages/ais/_ais_swig.so really depends on
/usr/local/lib/libgnuradio-ais.so (which is, I guess, where the missing
symbol is). but python can’t load the module due to unresolved symbol…
Note: I have /usr/local/lib in my LD_LIBRARY_PATH and
/usr/local/lib/python2.7/site-packages/ in my PYTHONPATH
The only change in the source code I had to do was to replace in
ais_decode.py:
from gnuradio import ais
with:
import ais
Does anyone has an idea on what is goin on here? I certainly did
something wrong, or fogot something, but I can’t see it.
Regards,
Chris
–
Christian G.,
Embedded systems engineer.
Techworks Marine
1 Harbour road
Dun Laoghaire
Co. Dublin
Ireland
Tel: + 353 (0) 1 236 5990
Web: http://www.techworks.ie/