Compile/swig error

(I’m not sure if this got sent the first time, I apologize if I am
repeating myself)

Hi,

for background info, I am running ubuntu 7.04. my gnuradio code is
laest development branch downloaded and installed about two weeks ago.
I got it compiled and installed without any problems.

however, i do have a problem now: i have written a block that takes in
two bytes and outputs three bytes, something i’m calling
gr_interp_test_bb. I’ve gotten the .cc, .h and .i files in
/gnuradio-core/src/lib/general. I have edited the general.i and
Makefile.am and inserted the names of my files at the appropriate
places.

When I run make and make install from /gnuradio-core/src/lib, i can not
see any errors in the ouptut text. however, i then run python from the
command line, and enter “from gnuradio import gr” and this is what i
get:

Traceback (most recent call last):
File “”, line 1, in
File “/usr/local/lib/python2.5/site-packages/gnuradio/gr/init.py”,
line 27, in
from gnuradio_swig_python import *
File
“/usr/local/lib/python2.5/site-packages/gnuradio/gr/gnuradio_swig_python.py”,
line 23, in
from gnuradio_swig_py_runtime import *
File
“/usr/local/lib/python2.5/site-packages/gnuradio/gr/gnuradio_swig_py_runtime.py”,
line 6, in
import _gnuradio_swig_py_runtime
ImportError: /usr/local/lib/libgnuradio-core.so.0: undefined symbol:
_ZTV17gr_interp_test_bb

I found something about adding “/usr/local/lib” to /etc/ld.so.conf, so i
tried that and it didn’t work.

fwiw, my /etc/ld.so.conf now looks like:

include /etc/ld.so.conf.d/*.conf
/usr/local/lib
/usr/local/lib

any help, ideas, suggestions would be most appreciated.

Thanks,
Alex Y.

===============================
Alex Y.
[email protected] mailto:[email protected]
Graduate Research Assistant
Center for Wireless Telecommunications
Virginia Tech

On Fri, Oct 26, 2007 at 10:39:13AM -0400, Alex Y. wrote:

Makefile.am and inserted the names of my files at the appropriate places.

When I run make and make install from /gnuradio-core/src/lib, i can not
see any errors in the ouptut text. however, i then run python from the
command line, and enter “from gnuradio import gr” and this is what i get:

You need to make install from gnuradio-core. You’re not rebuilding
the swig glue.

Eric

On Sat, Oct 27, 2007 at 09:11:47AM -0700, Alex Y. wrote:

make[2]: Leaving directory

Thanks,
Alex Y.

Looks like your code isn’t linked into the library.

Did you add it to libgeneral_la_SOURCES in general/Makefile.am?

In general, you’d be better off building your new stuff “out of the
tree” using the strategy spelled out in the “How to Write a Block”
paper. That way it’s independent of changes that we make to the main
body of code, and means that you can keep up with our changes without
having to constantly modify the tree.

Eric

Eric B. wrote:

command line, and enter “from gnuradio import gr” and this is what i get:

You need to make install from gnuradio-core. You’re not rebuilding
the swig glue.

Thanks Eric. I tried that and ran into this problem:

g++ -g -O2 -Wall -Woverloaded-virtual -pthread -o
.libs/benchmark_dotprod
benchmark_dotprod.o
…/…/…/gnuradio-core/src/lib/.libs/libgnuradio-core.so
…/…/…/gnuradio-core/src/lib/.libs/libgnuradio-core.so: undefined
reference to vtable for gr_interp_test_bb' collect2: ld returned 1 exit status make[2]: *** [benchmark_dotprod] Error 1 make[2]: Leaving directory/work/gnuradio_src/trunk/gnuradio-core/src/tests’
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/work/gnuradio_src/trunk/gnuradio-core/src’
make: *** [all-recursive] Error 1

All I could find out about any vtable errors was something about gcc and
g++, but I haven’t updated anything on my system except the actual
gnuradio
source.

Any other suggestions?

Thanks,
Alex Y.


View this message in context:
http://www.nabble.com/Compile-swig-error-tf4697770.html#a13444707
Sent from the GnuRadio mailing list archive at Nabble.com.

Alex Y. wrote:

`/work/gnuradio_src/trunk/gnuradio-core/src/tests’
Thanks,
Alex Y.

Alex,

Have you made a destructor function for the class? Those errors tend to
pop up when you haven’t properly overloaded the virtual functions.

Tom

Eric B. wrote:

Looks like your code isn’t linked into the library.

Did you add it to libgeneral_la_SOURCES in general/Makefile.am?

I did add it to general/Makefile.am, right after the
gr_interleaved_short_to_complex.* entries. I’ve checked to make sure
that
I inserted them alphabetically, one entry each for the .cc, .h and .i
files
(in the appropriate sections.) I can attach the relevant files if
anyone
would care to take a look.

In general, you’d be better off building your new stuff “out of the
tree” using the strategy spelled out in the “How to Write a Block”
paper. That way it’s independent of changes that we make to the main
body of code, and means that you can keep up with our changes without
having to constantly modify the tree.

I had originally planned to do that, but Tom R. suggested that I drop it
gnuradio-core/…/general. (I think that may have been in expectation
of
contributing back to the source tree for inclusion, which isn’t
happening
right now.) I will probably go back and reorganize all my code in its
own
packages, but I’m staring down a deadline and I want it to “just work”
right
now. If i can’t get find any solutions as it stands, then i will go
back
and reogranize.

thanks,
alex

View this message in context:
http://www.nabble.com/Compile-swig-error-tf4697770.html#a13445303
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