From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ziqiang Tang To: gcc-help@gcc.gnu.org Subject: libstd++/gcc question... Date: Tue, 29 Feb 2000 14:11:00 -0000 Message-id: <200002292212.RAA16353@guitar.lcs.mit.edu> X-SW-Source: 2000-02/msg00112.html 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. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ziqiang Tang To: gcc-help@gcc.gnu.org Subject: libstd++/gcc question... Date: Sat, 01 Apr 2000 00:00:00 -0000 Message-ID: <200002292212.RAA16353@guitar.lcs.mit.edu> X-SW-Source: 2000-q1/msg00306.html Message-ID: <20000401000000.DvsJYPiEfeyP10u4BSQQAMCSQbeoaRkH3EXR5Cj30Ss@z> 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.