[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gcc 3.3.3 undefined reference stl_alloc.h
From: |
Miroslaw Dach |
Subject: |
Re: gcc 3.3.3 undefined reference stl_alloc.h |
Date: |
Wed, 02 Aug 2006 09:30:07 -0500 |
User-agent: |
Thunderbird 1.5 (X11/20060113) |
Miroslaw Dach wrote:
I have build successfully octave 2.1.73 on Linux fedoracore 2, gcc
3.3.3..
Right now I am trying to build octave_embedded:
http://octave.sf.net/octave_embed.tar.gz
on the same platform but with no success so far.
The compilation goes fine but during linkage I get the following errors:
mkoctfile -v -c test.cpp
g++ -c -fPIC -I/home/urs1/octave/include/octave-2.1.73
-I/home/urs1/octave/include/octave-2.1.73/octave
-I/home/urs1/octave/include -mieee-fp -g -O2 test.cpp -o test.o
mkoctfile -v -c embed.cc
g++ -c -fPIC -I/home/urs1/octave/include/octave-2.1.73
-I/home/urs1/octave/include/octave-2.1.73/octave
-I/home/urs1/octave/include -mieee-fp -g -O2 embed.cc -o embed.o
mkoctfile -v --link-stand-alone test.o embed.o -o test_embed
g++ -I/home/urs1/octave/include/octave-2.1.73
-I/home/urs1/octave/include/octave-2.1.73/octave
-I/home/urs1/octave/include -mieee-fp -g -O2 -fPIC -o test_embed
test.o embed.o -L/home/urs1/octave/lib/octave-2.1.73 -Wl,-rpath
-Wl,/home/urs1/octave/lib/octave-2.1.73 -loctinterp -loctave -lcruft
-llapack -lblas -lreadline -lreadline -lncurses -lm
-L/usr/lib/gcc-lib/i386-redhat-linux/3.3.3
-L/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../.. -lfrtbegin -lg2c
-lm -lgcc_s
........
/home/urs1/octave/lib/octave-2.1.73/liboctinterp.a(builtins.o)(.text+0xa3aa):/usr/include/c++/3.3.3/bits/stl_alloc.h:652:
undefined reference to `Fbessely(octave_value_list const&, int)'
/home/urs1/octave/lib/octave-2.1.73/liboctinterp.a(builtins.o)(.text+0xa414):/usr/include/c++/3.3.3/bits/stl_alloc.h:652:
undefined reference to `Fbesseli(octave_value_list const&, int)'
/home/urs1/octave/lib/octave-2.1.73/liboctinterp.a(builtins.o)(.text+0xa47e):/usr/include/c++/3.3.3/bits/stl_alloc.h:652:
undefined reference to `Fbesselk(octave_value_list const&, int)'
/home/urs1/octave/lib/octave-2.1.73/liboctinterp.a(builtins.o)(.text+0xa4e8):/usr/include/c++/3.3.3/bits/stl_alloc.h:652:
undefined reference to `Fbesselh(octave_value_list const&, int)'
/home/urs1/octave/lib/octave-2.1.73/liboctinterp.a(builtins.o)(.text+0xa552):/usr/include/c++/3.3.3/bits/stl_alloc.h:652:
undefined reference to `Fairy(octave_value_list const&, int)'
........more errors as above but of the same type
It seems to be the same problem which refers to the way how the
exceptions are thrown in the stl_alloc.h:652
allocator() throw() {}
Maybe somebody more experienced can comment on that.
Best Regards
Mirek
------------------------- Reply from Paul
----------------------------------------------
The compile lines are compiling with -fPIC but the link line is linking
to static lib*.a. You might try configuring with shared instead of
static libraries and see if that works, or hack mkoctfile so that the
xxPICFLAG is empty.
If either works, please report back to the list.
- Paul
------------------------------------------------------------------------------------
According to Paul`s suggestion I have tried both
1. I have left empty the xxPICFLAG in the mkoctfile but after
recompilation I have got similar errors as mentioned above with some
additional
2. Next what I have done is the second suggestion to link dynamically
libraries. In this case I have modified
slightly the Makefile in the ocatve_embedded project removing the
Linker option --link-stand-alone
I have typed make and all went smoothly without any warnings and errors.
I have got an executable test_embed :) so far so good
but when I tried to run it, I have got Segmentation fault (core dumped)
Below I atache the outout from the compilation and linkage:
mkoctfile -v -c test.cpp
g++ -c -fPIC -I/home/urs1/octave/include/octave-2.1.73
-I/home/urs1/octave/include/octave-2.1.73/octave
-I/home/urs1/octave/include -mieee-fp -g -O2 test.cpp -o test.o
mkoctfile -v -c embed.cc
g++ -c -fPIC -I/home/urs1/octave/include/octave-2.1.73
-I/home/urs1/octave/include/octave-2.1.73/octave
-I/home/urs1/octave/include -mieee-fp -g -O2 embed.cc -o embed.o
mkoctfile -v test.o embed.o -o test_embed
g++ -shared -Wl,-Bsymbolic -o test_embed test.o embed.o
-L/home/urs1/octave/lib/octave-2.1.73 -loctinterp -loctave -lcruft
-llapack -lblas -lreadline -lncurses -lm
-L/usr/lib/gcc-lib/i386-redhat-linux/3.3.3
-L/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../.. -lfrtbegin -lg2c -lm
-lgcc_s
when I typed the ldd ./test_embed I have got following output:
linux-gate.so.1 => (0x00f0c000)
liblapack.so.3 => /usr/lib/liblapack.so.3 (0x00111000)
libblas.so.3 => /usr/lib/libblas.so.3 (0x0059e000)
libreadline.so.4 => /usr/lib/libreadline.so.4 (0x00645000)
libncurses.so.5 => /usr/lib/libncurses.so.5 (0x00da7000)
libg2c.so.0 => /usr/lib/libg2c.so.0 (0x005ed000)
libm.so.6 => /lib/tls/libm.so.6 (0x0060b000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00977000)
libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x00bc9000)
libc.so.6 => /lib/tls/libc.so.6 (0x00670000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00952000)
Would you have some idea what to do next
Best Regards
Mirek