[RBL+] [Discuss-gnuradio] undefined symbol error:

Hi,

I just updated the gnuradio software, I did the normal dance and
everything looked fine.

The following error message popped when I executed pretty much all
python executables:

Traceback (most recent call last):
File “./usrp_rx_cfile.py”, line 9, in ?
from gnuradio import gr, eng_notation
File “/usr/local/lib/python2.4/site-packages/gnuradio/gr/
init.py”, line 42, in ?
from gnuradio_swig_python import *
File “/usr/local/lib/python2.4/site-packages/gnuradio/gr/
gnuradio_swig_python.py”, line 23, in ?
from gnuradio_swig_py_runtime import *
File “/usr/local/lib/python2.4/site-packages/gnuradio/gr/
gnuradio_swig_py_runtime.py”, line 6, in ?
import _gnuradio_swig_py_runtime
ImportError: /usr/local/lib/python2.4/site-packages/gnuradio/gr/
_gnuradio_swig_py_runtime.so: undefined symbol:
_ZN28gr_single_threaded_scheduler4stopEv
[chenqi@newton python]$ ./usrp_fft.py
Traceback (most recent call last):
File “./usrp_fft.py”, line 23, in ?
from gnuradio import gr, gru
File “/usr/local/lib/python2.4/site-packages/gnuradio/gr/
init.py”, line 42, in ?
from gnuradio_swig_python import *
File “/usr/local/lib/python2.4/site-packages/gnuradio/gr/
gnuradio_swig_python.py”, line 23, in ?
from gnuradio_swig_py_runtime import *
File “/usr/local/lib/python2.4/site-packages/gnuradio/gr/
gnuradio_swig_py_runtime.py”, line 6, in ?
import _gnuradio_swig_py_runtime
ImportError: /usr/local/lib/python2.4/site-packages/gnuradio/gr/
_gnuradio_swig_py_runtime.so: undefined symbol:
_ZN28gr_single_threaded_scheduler4stopEv

I removed /usr/local/lib/python2.4/site-packages/gnuradio/gr, and did
make install again, it still didn’t work.

Any help or comment will be appreciated.

Thanks

Chen

On Mar 2, 2008, at 9:28 PM, Qi Chen wrote:

ImportError: /usr/local/lib/python2.4/site-packages/gnuradio/gr/
_gnuradio_swig_py_runtime.so: undefined symbol:
_ZN28gr_single_threaded_scheduler4stopEv

It looks like ‘/usr/local/lib’ isn’t in the library search path. If
you’re running on some versions of Linux, you’ll need to update the
ld.so cache after installing GNU Radio:

$ cat /etc/ld.so.conf
–> if /usr/local/lib isn’t in this file, then do the following 3
commands; otherwise, go to the end and run that command:
$ cp /etc/ld.so.conf /tmp/ld.so.conf
$ echo /usr/local/lib >> /tmp/ld.so.conf
$ sudo mv /tmp/ld.so.conf /etc/ld.so.conf

then

$ sudo ldconfig

now try running those GNU Radio scripts again and if it still fails,
please include your computer’s setup info: how you installed GNU
Radio, OS and version, how you installed background apps and such. - MLD

Michael,

On Mar 3, 2008, at 8:33 AM, Michael D. wrote:

$ cat /etc/ld.so.conf
–> if /usr/local/lib isn’t in this file, then do the following 3
commands; otherwise, go to the end and run that command:
I ran the above command and /usr/local/lib wasn’t included

$ cp /etc/ld.so.conf /tmp/ld.so.conf
$ echo /usr/local/lib >> /tmp/ld.so.conf
$ sudo mv /tmp/ld.so.conf /etc/ld.so.conf

after executing those three line, the path was successfully included.

then

$ sudo ldconfig

I tried running the same script, it’s giving me the same error message

now try running those GNU Radio scripts again and if it still
fails, please include your computer’s setup info: how you installed
GNU Radio, OS and version, how you installed background apps and
such. - MLD

My machine is running fedora 6, and all source files are stored on a
network drive. I built everything from there. I checked with out sys
admin about the permission, looks ok.
It wasn’t a fresh install, it was upgraded from the older version,
after I checked out the latest version from /trunk, I did the following:

./bootscrap
./configure
sudo make && make check ( I had to use sudo here for some permission
reason)
sudo make install

everything looked fine after those steps, no error messages (after I
got the permission issue fixed).

I didn’t reinstall all the dependencies, coz they were already
installed, and the I could run the previous gnuradio software and
scripts no problem.

On Mon, Mar 03, 2008 at 09:57:09AM -0600, Qi Chen wrote:

Michael,

On Mar 3, 2008, at 8:33 AM, Michael D. wrote:

On Mar 2, 2008, at 9:28 PM, Qi Chen wrote:

ImportError:
/usr/local/lib/python2.4/site-packages/gnuradio/gr/_gnuradio_swig_py_runtime.so:
undefined symbol: _ZN28gr_single_threaded_scheduler4stopEv

This is often a symptom of multiple partially corrupt installations.

To recover, find all places where you may have installed GNU Radio and
remove all relevant files, then rebuild and install.

E.g.,

$ sudo rm /usr/local/lib/libgnuradio*
$ sudo rm /usr/local/lib/libusrp*
$ sudo rm -fr /usr/local/lib/python2.4/site-packages/gnuradio
$ sudo rm -fr /usr/local/lib/python2.4/site-packages/usrp*

Eric

Eric, and Michael,

Eric B. wrote:

/usr/local/lib/python2.4/site-packages/gnuradio/gr/_gnuradio_swig_py_runtime.so:
$ sudo rm /usr/local/lib/libgnuradio*
$ sudo rm /usr/local/lib/libusrp*
$ sudo rm -fr /usr/local/lib/python2.4/site-packages/gnuradio
$ sudo rm -fr /usr/local/lib/python2.4/site-packages/usrp*

I have done exactly what you mentioned above, and it worked. I didn’t
reconfigure the whole thing, all I did was to sudo make install.

Thanks for both of your help.

I’m not a Fedora expert (I do a lot of testing on Ubuntu 6.06 through
7.10 - to verify compatibility) … but I expect Fedora to be similar
(others might offer corrections). I’ve tested the latest SVN trunk on
Mac OS X 10.5 and Ubunut 7.10 without issues, so (obviously) something
is odd with your install … especially if GNU Radio was working
before and not now. In general you won’t need to update dependencies
between GNU Radio builds; the latest SVN trunk in the past few months
hasn’t changed requirements.

You can verify that this is a library path issue by:

cd /usr/local/lib
nm -a libgnuradio-core.so | grep stop | grep single

–> should provide a string such as “T
__ZN28gr_single_threaded_scheduler4stopEv”.

Some notes:

  1. Since you’re making off of a network drive, I’d recommend building
    in a separate, local-to-your-computer directory (if possible), e.g.:

cd NETWORK_PATH_TO_GR
sh bootstrap
cd ~
mkdir gr_build
cd gr_build
NETWORK_PATH_TO_GR/configure
make
make check
sudo make install

or something like that.

  1. After doing “configure” when upgrading the SVN trunk, you’ll
    oftentimes want to do “make distclean” to get rid of cruft:

cd NETWORK_PATH_TO_GR
sh bootstrap
./configure
make distclean