交叉编译的GNU Radio的OpenWrt的(Cross compiling Gnu Radio

2019-09-20 05:13发布

我试图上的OpenWRT“Attittude调整”(最新主干源)安装GNU收音机。 我横编GR,一切似乎已经编译和链接就好了。 然而,在Python导入模块产生以下情况:

root@OpenWrt:/usr/lib/python2.7/dist-packages/gnuradio/gr# python
Python 2.7.3 (default, Jul 21 2012, 17:36:54) 
[GCC 4.6.3 20120201 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from gnuradio import gr
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/gnuradio/gr/__init__.py", line 43, in <module>
    from gnuradio_core import *
  File "/usr/lib/python2.7/dist-packages/gnuradio/gr/gnuradio_core.py", line 23, in <module>
    from gnuradio_core_runtime import *
  File "/usr/lib/python2.7/dist-packages/gnuradio/gr/gnuradio_core_runtime.py", line 26, in <module>
    _gnuradio_core_runtime = swig_import_helper()
  File "/usr/lib/python2.7/dist-packages/gnuradio/gr/gnuradio_core_runtime.py", line 22, in swig_import_helper
    _mod = imp.load_module('_gnuradio_core_runtime', fp, pathname, description)
ImportError: File not found
>>> 

需要注意的是Python已经在包含SWIG库的目录被调用。 这里是ldd _gnuradio_core_runtime.so ,在目标系统上运行:

checking sub-depends for '/usr/lib/libgnuradio-core-3.6.2git.so.0.0.0'
checking sub-depends for '/usr/lib/libgruel-3.6.2git.so.0.0.0'
checking sub-depends for '/usr/lib/libboost_date_time.so.1.49.0'
checking sub-depends for '/usr/lib/libboost_program_options.so.1.49.0'
checking sub-depends for '/usr/lib/libboost_filesystem.so.1.49.0'
checking sub-depends for '/usr/lib/libboost_system.so.1.49.0'
checking sub-depends for '/usr/lib/libboost_thread.so.1.49.0'
checking sub-depends for '/lib/libpthread.so.0'
checking sub-depends for '/usr/lib/libstdc++.so.6'
checking sub-depends for '/lib/libm.so.0'
checking sub-depends for '/lib/libgcc_s.so.1'
checking sub-depends for '/lib/libc.so.0'
checking sub-depends for '/usr/lib/libfftw3f.so.3'
checking sub-depends for 'not found'
checking sub-depends for '/lib/librt.so.0'
checking sub-depends for '/usr/lib/libvolk.so.0.0.0'
checking sub-depends for '/lib/libdl.so.0'
    libgnuradio-core-3.6.2git.so.0.0.0 => /usr/lib/libgnuradio-core-3.6.2git.so.0.0.0 (0x00000000)
    libgruel-3.6.2git.so.0.0.0 => /usr/lib/libgruel-3.6.2git.so.0.0.0 (0x00000000)
    libboost_date_time.so.1.49.0 => /usr/lib/libboost_date_time.so.1.49.0 (0x00000000)
    libboost_program_options.so.1.49.0 => /usr/lib/libboost_program_options.so.1.49.0 (0x00000000)
    libboost_filesystem.so.1.49.0 => /usr/lib/libboost_filesystem.so.1.49.0 (0x00000000)
    libboost_system.so.1.49.0 => /usr/lib/libboost_system.so.1.49.0 (0x00000000)
    libboost_thread.so.1.49.0 => /usr/lib/libboost_thread.so.1.49.0 (0x00000000)
    libpthread.so.0 => /lib/libpthread.so.0 (0x00000000)
    libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00000000)
    libm.so.0 => /lib/libm.so.0 (0x00000000)
    libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00000000)
    libc.so.0 => /lib/libc.so.0 (0x00000000)
    libfftw3f.so.3 => /usr/lib/libfftw3f.so.3 (0x00000000)
    libfftw3f_threads.so.3 => not found (0x00000000)
    librt.so.0 => /lib/librt.so.0 (0x00000000)
    libvolk.so.0.0.0 => /usr/lib/libvolk.so.0.0.0 (0x00000000)
    libdl.so.0 => /lib/libdl.so.0 (0x00000000)
    ld-uClibc.so.0 => ld-uClibc.so.0 (0x00000000)

这里的输出file _gnuradio_core_runtime.so构建系统上:

_gnuradio_core_runtime.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, not stripped

在目标系统上的英特尔凌动运行。 最后,我能想到的最后一块有用的信息是PYTHONPATH设置为/usr/lib/python2.7/dist-packages 。 我在一个损失的问题是什么。 我希望精彩的堆栈溢出社区可以帮助找到解决办法。 预先感谢您的任何指针!

Answer 1:

目标是缺少libfftw3f_threads.so库。 由于系统调用dlopen()无法解析的依赖性_gnuradio_core_runtime.so ,它告诉Python的文件无法找到。 我复制到图书馆的目标,确实ldconfig和Python正确加载库。 (溶液贷记柔印)。



文章来源: Cross compiling Gnu Radio for Openwrt