This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: `set_new_handler' missing in libstdc++.2.9.0 of egcs-1.1b on sco-3.2v5.0.4
- To: Joao Cardoso <jcardoso at inescn dot pt>
- Subject: Re: `set_new_handler' missing in libstdc++.2.9.0 of egcs-1.1b on sco-3.2v5.0.4
- From: Franz Sirl <Franz dot Sirl-kernel at lauterbach dot com>
- Date: Mon, 02 Nov 1998 18:42:00 +0100
- Cc: egcs at cygnus dot com
Hi,
this should probably a FAQ, check out
<http://www.cygnus.com/ml/egcs/1998-Aug/0811.html> and
<http://www.cygnus.com/ml/egcs/1998-Aug/0813.html>.
I short, remove the 'extern "C" ' around your set_new_handler declaration,
this was a bug and is fixed in egcs >=1.1.
Franz.
At 01:30 02.11.98 , Joao Cardoso wrote:
>Hi,
>
>When trying to compile a program with egcs-1.1b on sco-3.2v5.0.4 I got
>the following error:
>
>Undefined first referenced
> symbol in file
>set_new_handler ../src/liboctinterp.so
>
>in searching for the missing symbol:
>
>in libstdc++.so.2.9.0 it appears as:
>
>nm -p /usr/local/lib/libstdc++.so.2.9.0 | fgrep set_new_handler
>00043c38 T set_new_handler__FPFv_v
>
>nm -pC /usr/local/lib/libstdc++.so.2.9.0 | fgrep set_new_handler
>00043c38 T set_new_handler(void (*)(void))
>
>So, why has the link failed?
>
>In libstdc++.so.2.8.0 it appear as:
>
>nm -p /usr/local/lib/libstdc++.so.2.8.0 | fgrep set_new_handler
>00042150 T set_new_handler
>
>nm -pC /usr/local/lib/libstdc++.so.2.8.0 | fgrep set_new_handler
>00042150 T set_new_handler
>
>And the link does not fail.
>
>It seems that in the new library the symbol is "mangled"???
>If I link against libstdc++.so.2.8.0 I got no unresolved symbols.
>
>More strange, the symbol does not appear in any of the static libraries,
>be it 2.8.0 or 2.9.0!
>
>gcc version egcs-2.91.57 19980901 (egcs-1.1 release)
>(on sco-3.2v5.0.4)
>
>Is this a bug?
>
>*Please note*: I know that shared libs are not supported for
>sco-3.2v5.0.4, so I build them using the following work-around:
>
>I configure
>`--enable-shared --enable multilib'
>I bootstrap the make:
>`make -i bootstrap'
>when building coff/pic, if fails (as coff is not compatible with pic),
>but I dont care, as the target is meaningless. After the full build, I
>`cd egcs-1.1b-objdir/i586-pc-sco3.2v5.0.4/pic/libstdc++'
>`make libstdc++.so.2.9.0'
>and it suceeds, creating an usable shared lib.
>
>I have done this with egcs-1.0.3 and previous releases, and I can use
>the resulting libstdc++.so with several programs.
>
>Thanks,
>Joao
>
>--
>Joao Cardoso, INESC | e-mail:
>R. Jose Falcao 110 | tel: + 351 2 2094345
>4050 Porto, Portugal | fax: + 351 2 2008487