.so: undefined symbol: _ZN2gr6blocks12count_bits16E

Hi all gnuradio users,

I have an error when I try to execute a python script after adding a new
block.

My block is add to a gnuradio 3.7 with gr_modtool with a command :

gr_modtool add -t sync packet_sinkThe module containing a blocks is
ieee_868_915. The error is :

Traceback (most recent call last):
File “./qa_symbols_to_chips_bs.py”, line 25, in
import ieee_868_915
File
“/usr/local/lib/python2.7/dist-packages/ieee_868_915/init.py”, line
45, in
from ieee_868_915_swig import *
File
“/usr/local/lib/python2.7/dist-packages/ieee_868_915/ieee_868_915_swig.py”,
line 26, in
_ieee_868_915_swig = swig_import_helper()
File
“/usr/local/lib/python2.7/dist-packages/ieee_868_915/ieee_868_915_swig.py”,
line 22, in swig_import_helper
_mod = imp.load_module(’_ieee_868_915_swig’, fp, pathname,
description)
ImportError: /usr/local/lib/libgnuradio-ieee_868_915.so: undefined
symbol: _ZN2gr6blocks12count_bits16Ej

I tried to delete a lib file libgnuradio-ieee_868_915.so and reinstall
all a block, but it didn’t give a result.

Please help me to fix this error.

Thank you.

Usually a “make clean” will solve this.

–n

You could also try “sudo ldconfig”. It looks like the linker can’t find
some required symbols.

Happy hacking!

Hi Aditya,

just in case the problem still exists, you might miss something like
this in your cmake files

https://github.com/bastibl/gr-ieee802-15-4/commit/a586256ad5e3fe1cf8c998a68a7276adf6e2d691

Best,
Bastian

Thank you, I had the same error when I did sudo ldconfig.
Can you give me an other suggestion.

From: [email protected]
Date: Mon, 10 Feb 2014 13:40:34 -0500
Subject: Re: [Discuss-gnuradio] .so: undefined symbol:
_ZN2gr6blocks12count_bits16E
To: [email protected]
CC: [email protected]; [email protected]

You could also try “sudo ldconfig”. It looks like the linker can’t find
some required symbols.

Happy hacking!

On Mon, Feb 10, 2014 at 12:59 PM, Nick F. [email protected]
wrote:

Usually a “make clean” will solve this.
–n

On Mon, Feb 10, 2014 at 9:57 AM, raf raf [email protected] wrote:

Hi all gnuradio users,

I have an error when I try to execute a python script after adding a new
block.

My block is add to a gnuradio 3.7 with gr_modtool with a command :

gr_modtool add -t sync packet_sinkThe module containing a blocks is
ieee_868_915. The error is :

Traceback (most recent call last):
File “./qa_symbols_to_chips_bs.py”, line 25, in

import ieee_868_915

File
“/usr/local/lib/python2.7/dist-packages/ieee_868_915/init.py”, line
45, in
from ieee_868_915_swig import *
File
“/usr/local/lib/python2.7/dist-packages/ieee_868_915/ieee_868_915_swig.py”,
line 26, in

_ieee_868_915_swig = swig_import_helper()

File
“/usr/local/lib/python2.7/dist-packages/ieee_868_915/ieee_868_915_swig.py”,
line 22, in swig_import_helper
_mod = imp.load_module(’_ieee_868_915_swig’, fp, pathname,
description)

ImportError: /usr/local/lib/libgnuradio-ieee_868_915.so: undefined
symbol: _ZN2gr6blocks12count_bits16Ej

I tried to delete a lib file libgnuradio-ieee_868_915.so and reinstall
all a block, but it didn’t give a result.

Please help me to fix this error.

Thank you.


Discuss-gnuradio mailing list

[email protected]

https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Discuss-gnuradio mailing list

[email protected]

https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Hi raf,

I had similar problems when I was making OOT modules last summer. The
problem with me was that I had not defined the destructor for my blocks
in
the .cc file.

You can run

cd /usr/local/lib/
nm libgnuradio-ieee_868_915.so | grep _ZN2gr6blocks12count_bits16Ej

and see if this symbol is undefined.

I had run

c++filt symbol-name

(replace symbol-name with _ZN2gr6blocks12count_bits16Ej in your case) to
see what this symbol is.

Hi,

Thank you Batian for your feedback;

I try to install a new module based on a blocks of ieeee 802.15.4 for
gnuradio 3.7.

I followed your indications and the advise of Manu, I found after a
modification a similar error with a message :

ImportError: /usr/local/lib/libgnuradio-ieee_868_915.so: undefined
symbol:
ZN2gr12msg_accepter4postEN5boost13intrusive_ptrIN3pmt8pmt_baseEEES5

After using c++filt I got :

gr::msg_accepter::post(boost::intrusive_ptrpmt::pmt_base,
boost::intrusive_ptrpmt::pmt_base)

Please help me.

Hello All,

Thank you for your answer.

I did a command seen in this snapshot :

[email protected]:/usr/local/lib$ nm
libgnuradio-ieee_868_915.so |grep _ZN2gr6blocks12count_bits16Ej
U _ZN2gr6blocks12count_bits16Ej
[email protected]:/usr/local/lib$ c++flit
_ZN2gr6blocks12count_bits16Ej
No command ‘c++flit’ found, did you mean:
Command ‘c++filt’ from package ‘binutils’ (main)
c++flit: command not found
[email protected]:/usr/local/lib$ c++filt
_ZN2gr6blocks12count_bits16Ej
gr::blocks::count_bits16(unsigned int)

The symbol is the instruction gr::blocks::count_bits16(unsigned int). I
Changed this function by blocks::count_bits16(unsigned int), but i get a
same error.

Date: Tue, 11 Feb 2014 10:02:37 +0530
Subject: Re: [Discuss-gnuradio] .so: undefined symbol:
_ZN2gr6blocks12count_bits16E
From: [email protected]
To: [email protected]
CC: [email protected]; [email protected]; [email protected]

Hi raf,

I had similar problems when I was making OOT modules last summer. The
problem with me was that I had not defined the destructor for my blocks
in the .cc file.

You can run

cd /usr/local/lib/
nm libgnuradio-ieee_868_915.so | grep _ZN2gr6blocks12count_bits16Ej

and see if this symbol is undefined.

I had run

c++filt symbol-name

(replace symbol-name with _ZN2gr6blocks12count_bits16Ej in your case) to
see what this symbol is.

On Tue, Feb 11, 2014 at 1:43 AM, raf raf [email protected] wrote:

Thank you, I had the same error when I did sudo ldconfig.
Can you give me an other suggestion.

From: [email protected]
Date: Mon, 10 Feb 2014 13:40:34 -0500
Subject: Re: [Discuss-gnuradio] .so: undefined symbol:
_ZN2gr6blocks12count_bits16E

To: [email protected]
CC: [email protected]; [email protected]

You could also try “sudo ldconfig”. It looks like the linker can’t find
some required symbols.

Happy hacking!

On Mon, Feb 10, 2014 at 12:59 PM, Nick F. [email protected]
wrote:

Usually a “make clean” will solve this.
–n

On Mon, Feb 10, 2014 at 9:57 AM, raf raf [email protected] wrote:

Hi all gnuradio users,

I have an error when I try to execute a python script after adding a new
block.

My block is add to a gnuradio 3.7 with gr_modtool with a command :

gr_modtool add -t sync packet_sinkThe module containing a blocks is
ieee_868_915. The error is :

Traceback (most recent call last):
File “./qa_symbols_to_chips_bs.py”, line 25, in

import ieee_868_915

File
“/usr/local/lib/python2.7/dist-packages/ieee_868_915/init.py”, line
45, in
from ieee_868_915_swig import *
File
“/usr/local/lib/python2.7/dist-packages/ieee_868_915/ieee_868_915_swig.py”,
line 26, in

_ieee_868_915_swig = swig_import_helper()

File
“/usr/local/lib/python2.7/dist-packages/ieee_868_915/ieee_868_915_swig.py”,
line 22, in swig_import_helper
_mod = imp.load_module(’_ieee_868_915_swig’, fp, pathname,
description)

ImportError: /usr/local/lib/libgnuradio-ieee_868_915.so: undefined
symbol: _ZN2gr6blocks12count_bits16Ej

I tried to delete a lib file libgnuradio-ieee_868_915.so and reinstall
all a block, but it didn’t give a result.

Please help me to fix this error.

Thank you.


Discuss-gnuradio mailing list

[email protected]

https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Discuss-gnuradio mailing list

[email protected]

https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Discuss-gnuradio mailing list

[email protected]

https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

On 02/11/2014 10:47 AM, Marcus M. wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bastians solution seems to have fixed your problem by adding the
gr-blocks library to your linker targets.
But now your error exposes that you didn’t link against the gr-runtime.
Are you sure you have something like
set(GR_REQUIRED_COMPONENTS RUNTIME BLOCKS)

…and maybe also PMT
set(GR_REQUIRED_COMPONENTS RUNTIME BLOCKS PMT)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bastians solution seems to have fixed your problem by adding the
gr-blocks library to your linker targets.
But now your error exposes that you didn’t link against the gr-runtime.
Are you sure you have something like
set(GR_REQUIRED_COMPONENTS RUNTIME BLOCKS)
and not deleted the RUNTIME component, leaving only
set(GR_REQUIRED_COMPONENTS BLOCKS)
?

could you please share your project (preferably on github or bitbucket
or the like) or at least the CMakeLists (e.g gists.github.com,
pastebin, or the like) ?

Greetings,
Marcus

On 11.02.2014 10:41, raf raf wrote:

ImportError: /usr/local/lib/libgnuradio-ieee_868_915.so: undefined

https://github.com/bastibl/gr-ieee802-15-4/commit/a586256ad5e3fe1cf8c998a68a7276adf6e2d691

Best,

The module containing a blocks is ieee_868_915. The error is
“/usr/local/lib/python2.7/dist-packages/ieee_868_915/ieee_868_915_swig.py”,


mailing list [email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

_______________________________________________ Discuss-gnuradio
mailing list [email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJS+fGrAAoJEAFxB7BbsDrLHTIH/RDGJLZ0zX82hTRCRUP02ppe
Fzvf4lBfSY3+5dKu29tuva17KWOXu+vRJN+B1lWkzn8j2CRXjCp8OPowe+VjQsKl
H9xFrzpWcDTbYbxWVB+hfj4L/h3zHmEnfM++EF0XtQMMDMTl7RDZTZfKBBT8Tvai
B3ogVLz7O93II23pHYO5B08jIL0T60k7t9G3Z+EYm1+jkpK3WBG4SrE186M7AyV1
w2NeYuKhx4sGMw8mkOEl+rGI9tkYErAzzVwBDDdbQILNU70HToMiqV6i2dNvGK//
UN6U5sEegRNhin/9PaxPi2OGAhI7/6j2FrK8bMbnME89Ho7greHtLVVEb4pXQ+I=
=T7rd
-----END PGP SIGNATURE-----

On 02/11/2014 11:17 AM, raf raf wrote:

Hi Marcus,

I tried to have a lib/CMakeLists.txt and CMakeLists.txt with a same
content like in ieee802-15-4 of Bastian, but it didn’t work and now I
had this error after a modifications :

You do not set required components as we suggested in the previous post.
Therefore you end up with default libs and these defaults do not include
libgnuradio-blocks (which you require).

You tried to set components but forgot PMT, then you got the error:
ImportError: /usr/local/lib/libgnuradio-ieee_868_915.so: undefined
symbol:
ZN2gr12msg_accepter4postEN5boost13intrusive_ptrIN3pmt8pmt_baseEEES5

Currently, you link only against gnuradio-runtime…

ImportError:
/usr/local/lib/python2.7/dist-packages/ieee_868_915/_ieee_868_915_swig.so:
undefined symbol: _ZN2gr12ieee_868_91511packet_sink4makeEv

It would be helpful to check in an example. Your GRC bindings are btw
not working

... ... ... in

you have to fill in some stuff here.

Hi Marcus,

I tried to have a lib/CMakeLists.txt and CMakeLists.txt with a same
content like in ieee802-15-4 of Bastian, but it didn’t work and now I
had this error after a modifications :

ImportError:
/usr/local/lib/python2.7/dist-packages/ieee_868_915/_ieee_868_915_swig.so:
undefined symbol: _ZN2gr12ieee_868_91511packet_sink4makeEv

You can get my project from a github :

https://github.com/zitouni/gr-ieee_868_915

Thank you a lot

On 02/11/2014 11:17 AM, raf raf wrote:

ImportError:
/usr/local/lib/python2.7/dist-packages/ieee_868_915/_ieee_868_915_swig.so:
undefined symbol: _ZN2gr12ieee_868_91511packet_sink4makeEv

You can get my project from a github :

https://github.com/zitouni/gr-ieee_868_915

I just made a pull request… hope that helps a bit.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Raf Raf,

I (and git) can’t seem to find the
set(GR_REQUIRED_COMPONENTS
line in your CMakeLists.txt at all. That shouldn’t be the case. Please
add it somewhere around line 92 as discussed and give it a try :slight_smile:

Greetings,
Marcus

On 11.02.2014 11:17, raf raf wrote:

/usr/local/lib/python2.7/dist-packages/ieee_868_915/_ieee_868_915_swig.so:

undefined symbol: _ZN2gr12ieee_868_91511packet_sink4makeEv

Date: Tue, 11 Feb 2014 11:07:42 +0100 From:

error exposes that you didn’t link against the gr-runtime. Are
you sure you have something like set(GR_REQUIRED_COMPONENTS
RUNTIME BLOCKS)

…and maybe also PMT set(GR_REQUIRED_COMPONENTS RUNTIME BLOCKS
PMT)

and not deleted the RUNTIME component, leaving only
set(GR_REQUIRED_COMPONENTS BLOCKS) ?

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJS+fyxAAoJEAFxB7BbsDrLbToH/2YRM4eL+0+2SXmlR5C1cSnd
9cJr7qILf8hXXfc0Z/lFQeYWEGYT4hjA77QbmNtD2Xr1nWFsaxeVMa/aMwJqTgEF
M6FrVFh0J4ZRMDNzy2uMBTCi+8NjA0cOMMUjsvlWqRWbHv9JPDe1L8s64AzHZpMz
am4BOMQf3Sk05Y4IA4EMGgIZPRB10uPaUKIVe2orPngnqtSsvjwX13xY3HKoNeVU
gnmuqROIf0I9vC3iqPha4wva6/C6IPEa/Rg86XKJ8DRlHI1eg+7Hp5ZsVma/9Qoz
w5kYbXDvFoGOEJnhNZVA52cPC3QmsqITXm2T+jCkw6gN/GHgGikzqBSbOaxZbXQ=
=eJ4W
-----END PGP SIGNATURE-----