Tuesday, April 21, 2020

GNU Radio 3.8 OOT Linking (Migration from 3.7)

I'm migrating an OOT module from GNU Radio 3.7 to 3.8.1.

When running my app, I get:
ImportError: /home/myuser/gr/as/lib/libgnuradio-myproject.so.1.0.0git: undefined symbol: _ZN2gr6filter6kernel14fft_filter_cccC1EiRKSt6vectorISt7complexIfESaIS5_EEi

And verifying with ldd, I see libgnuradio-filter does not exist at the dependency list of the compiled .so.

In myproject/CMakeLists.txt,
I have:

find_package(Gnuradio "3.8" REQUIRED COMPONENTS blocks fft filter)
#make sure our local CMake Modules path comes first
list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_SOURCE_DIR}/cmake/Modules)
include(GrVersion)

The same source code worked in GNU Radio 3.8 where the CMakeLists.txt file contained:
set(GR_REQUIRED_COMPONENTS RUNTIME FILTER)
find_package(Gnuradio "3.7.2" REQUIRED)
list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_SOURCE_DIR}/cmake/Modules)
include(GrVersion)


And the compiled .so file indeed referred to libgnuradio-filter.

I assume there's some mistake in the CMakeLists.txt file that causes the compiled shared object not to link to libgnuradio-filter, but the above is based on the module porting guide, so any pointer will be appreciated.

No comments:

Post a Comment