# Gnuradio importerror undefined symbol

**URL:** <https://www.ruby-forum.com/t/gnuradio-importerror-undefined-symbol/234448>\
**Category:** GNU Radio\
**Created:** [March 5, 2015, 8:04am UTC](https://www.ruby-forum.com/t/gnuradio-importerror-undefined-symbol/234448 "2015-03-05T08:04:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [March 5, 2015, 8:04am UTC](https://www.ruby-forum.com/t/gnuradio-importerror-undefined-symbol/234448/1 "2015-03-05T08:04:04Z")

</div>

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](http://gnuradio.4.n7.nabble.com/gnuradio-importerror-undefined-symbol-tp52569.html)  
Sent from the GnuRadio mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![Mohammad\_Ghassemi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e9a140/32.png) [@Mohammad\_Ghassemi](https://www.ruby-forum.com/u/Mohammad_Ghassemi)\
**Post date:** [March 5, 2015, 8:20am UTC](https://www.ruby-forum.com/t/gnuradio-importerror-undefined-symbol/234448/2 "2015-03-05T08:20:21Z")

</div>

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&lt;float,  
std::allocatorstd::complex&lt;float \>

> const&, int)

this definition is different from the one I’m using, I cant fine this in  
C++  
API Reference,

> **[GNU Radio Manual and C++ API Reference: gr::filter::kernel::fft\_filter\_ccc...](https://www.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](http://gnuradio.4.n7.nabble.com/gnuradio-importerror-undefined-symbol-tp52569p52571.html)  
Sent from the GnuRadio mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![Mohammad\_Ghassemi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e9a140/32.png) [@Mohammad\_Ghassemi](https://www.ruby-forum.com/u/Mohammad_Ghassemi)\
**Post date:** [March 5, 2015, 11:49am UTC](https://www.ruby-forum.com/t/gnuradio-importerror-undefined-symbol/234448/3 "2015-03-05T11:49:28Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Mohammad\_Ghassemi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e9a140/32.png) [@Mohammad\_Ghassemi](https://www.ruby-forum.com/u/Mohammad_Ghassemi)\
**Post date:** [March 6, 2015, 11:43am UTC](https://www.ruby-forum.com/t/gnuradio-importerror-undefined-symbol/234448/4 "2015-03-06T11:43:24Z")

</div>

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](http://gnuradio.4.n7.nabble.com/gnuradio-importerror-undefined-symbol-tp52569p52591.html)  
Sent from the GnuRadio mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![Mohammad\_Ghassemi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e9a140/32.png) [@Mohammad\_Ghassemi](https://www.ruby-forum.com/u/Mohammad_Ghassemi)\
**Post date:** [March 6, 2015, 12:04pm UTC](https://www.ruby-forum.com/t/gnuradio-importerror-undefined-symbol/234448/5 "2015-03-06T12:04:45Z")

</div>

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](http://gnuradio.4.n7.nabble.com/gnuradio-importerror-undefined-symbol-tp52569p52592.html)  
Sent from the GnuRadio mailing list archive at [Nabble.com](http://Nabble.com).
