Gnuradio importerror undefined symbol

I’m new to Gnuradio and python. I’m trying to write a correlation block,
somewhere in my code I use fft filter:

gr::filter::kernel::fft_filter_ccc *d_filter;
d_filter = new gr::filter::kernel::fft_filter_ccc(1, x_vector);
d_filter->filter(noutput_items,in_y,out);

I run

cmake …/
make

and it complies perfectly fine, but when i try
ctest -V -R
I’ll get this error:

Traceback (most recent call last):
2: File
“/home/mohammad/projects/FD/implementation_tests/oot_modules/gr-full_duplex/python/qa_fd_correlation_cc.py”,
line 25, in
2: import full_duplex_swig as full_duplex
2: File
“/home/mohammad/projects/FD/implementation_tests/oot_modules/gr-full_duplex/build/swig/full_duplex_swig.py”,
line 28, in
2: _full_duplex_swig = swig_import_helper()
2: File
“/home/mohammad/projects/FD/implementation_tests/oot_modules/gr-full_duplex/build/swig/full_duplex_swig.py”,
line 24, in swig_import_helper
2: _mod = imp.load_module(’_full_duplex_swig’, fp, pathname,
description)
2: ImportError:
/home/mohammad/projects/FD/implementation_tests/oot_modules/gr-full_duplex/build/lib/libgnuradio-full_duplex.so:
undefined symbol:
_ZN2gr6filter6kernel14fft_filter_cccC1EiRKSt6vectorISt7complexIfESaIS5_EEi
1/1 Test #2: qa_fd_correlation_cc …***Failed 1.30 sec


View this message in context:
http://gnuradio.4.n7.nabble.com/gnuradio-importerror-undefined-symbol-tp52569.html
Sent from the GnuRadio mailing list archive at Nabble.com.

when I run :
c++filt
_ZN2gr6filter6kernel14fft_filter_cccC1EiRKSt6vectorISt7complexIfESaIS5_EEi

this is the output:
gr::filter::kernel::fft_filter_ccc::fft_filter_ccc(int,
std::vectorstd::complex<float,
std::allocatorstd::complex<float >

const&, int)

this definition is different from the one I’m using, I cant fine this in
C++
API Reference,
http://gnuradio.org/doc/doxygen/classgr_1_1filter_1_1kernel_1_1fft__filter__ccc.html

the declaration in C++ API Reference, matches the one I’m using in my
code


View this message in context:
http://gnuradio.4.n7.nabble.com/gnuradio-importerror-undefined-symbol-tp52569p52571.html
Sent from the GnuRadio mailing list archive at Nabble.com.

Hello Mohammad,

interesting!
Now, in most cases something like that happens when you accidentially
link (during build) against one version of GNU Radio, but at run time
(when executing ctest), another version is found and used.
Is it possible that’s the case here (i.e. how did you install GNU Radio,
did you do that only once)? Does “gnuradio-config-info --version” give
you what you expect?

Best regards,
Marcus

Hello Marcus ,
thank you

I found
find_package(Gnuradio “3.7.2” REQUIRED)
in my CMakelists.txt file
and the output for “gnuradio-config-info --version” is
v3.7.6.1-103-g8ecfd13a

is this the problem? How do i fix that?


View this message in context:
http://gnuradio.4.n7.nabble.com/gnuradio-importerror-undefined-symbol-tp52569p52591.html
Sent from the GnuRadio mailing list archive at Nabble.com.

I added

set(GR_REQUIRED_COMPONENTS RUNTIME FILTER)
set(GR_REQUIRED_COMPONENTS RUNTIME FILTER DIGITAL)

and
${GNURADIO_ALL_LIBRARIES}
to my CMakeLists.txt and the problem solved,
but It’s interesting that I had to edit CMakeLists.txt to make it work,
I
thought gnuradio would do it automatically


View this message in context:
http://gnuradio.4.n7.nabble.com/gnuradio-importerror-undefined-symbol-tp52569p52592.html
Sent from the GnuRadio mailing list archive at Nabble.com.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs