libstd++/gcc question...
Ziqiang Tang
ztang@guitar.lcs.mit.edu
Tue Feb 29 14:11:00 GMT 2000
Hi there,
I've been trying to build a clean distribution of Jikes, the IBM Java
compiler. When compiled on a new distribution of Dell-bundled RH6.1, the
executable worked fine. When compiled on my old version of RH5.2 with
these versions:
Kernel modules 2.1.85
Gnu C 2.95.2
Binutils 2.9.4.0.6
Linux C Library 2.1.2
Dynamic linker ldd (GNU libc) 2.1.2
Linux C++ Library 2.8.1
Procps 2.0.6
Mount 2.10f
Net-tools Utilities
Kbd 0.94
Sh-utils 1.16
... the binary would segfault upon exit from the program. After looking
at it through ltrace/ldd, it became clear that the version
compiled/working cleanly is linking to libstdc++-libc6.1-1.so.2, and using
__builtin_new(8, 0x401611b4, 0xbffffd44, 1, 0xbffffd18) = 0x082d1d00
__builtin_vec_new(6, 0xbffffd44, 1, 0x082d1d00, 8192) = 0x082d1d10
... etc for memory management.
The *broken* version on my machine (as shown above) is not linking to
libstdc++ and using malloc/free, with the segfault coming as a result of
multiple free-ing of the same memory location.
At first this was because libstdc++ wasn't avilable on my machine, but
even after adding the RPMs the same problem persisted... Is there
something I have to do to get GCC to recognize that it should use
libstdc++ as a standardlib when linking?
The RPM packages on my machine for libstdc++ include:
libstdc++-compat-2.95.2-3
libstdc++-2.95.2-3
libstdc++-devel-2.95.2-3
Thanks for any help.
More information about the Gcc-help
mailing list