This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Shared libstdc++ on AIX


I cannot get shared libstdc++ working on AIX.  I tried the GNU
assembler compiled from CVS, I tried the AIX assembler, I tried the
AIX assembler for everything except ios.cc and string-inst.cc as David
Edelsohn suggested a while ago, but no luck.  Also running the
regression I get lots of EH related failures.

If I configure gcc with --disable-shared, things work fine, except I
got warnings about duplicate symbols:

vlad ~/c % g++ -O2 ostream-bug.C
ld: 0711-224 WARNING: Duplicate symbol: std::_Format_cache<char>::_S_pword_ix
ld: 0711-224 WARNING: Duplicate symbol: std::numpunct<char>::id
ld: 0711-224 WARNING: Duplicate symbol: std::num_get<char, std::istreambuf_iterator<char, std::char_traits<char> > >::id
ld: 0711-224 WARNING: Duplicate symbol: std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > >::id
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.

The transcript of the failure is included below.

Zoli

vlad ~/c % cat ostream-bug.C 
#include <fstream>

using std::ofstream;

int
main (void)
{
  ofstream f("/dev/tty");

  f << int(13)  << std::endl;

  return 0;
}
vlad ~/c % gcc-3.0 -v
Reading specs from .../lib/gcc-lib/powerpc-ibm-aix4.3.3.0/3.0/specs
Configured with: ../gcc-3.0/configure --prefix=... --enable-languages=c,c++,java --enable-version-specific-runtime-libs --disable-nls
Thread model: single
gcc version 3.0
vlad ~/c % g++-3.0 -g ostream-bug.C
g++-3.0 -g ostream-bug.C: 3.47s+0.54s, 85% CPU, 4.702 total
vlad ~/c % gdb a.out
GNU gdb 20010620
Copyright 2001 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "powerpc-ibm-aix4.3.3.0"...
(gdb) run
Starting program: /home/hzoli/c/a.out 

Program received signal SIGABRT, Aborted.
0xd01761a8 in raise () from /usr/lib/libc.a(shr.o)
(gdb) bt
#0  0xd01761a8 in raise () from /usr/lib/libc.a(shr.o)
#1  0xd016f8cc in abort () from /usr/lib/libc.a(shr.o)
#2  0xd1fae7ec in __cxxabiv1::__terminate(void (*)()) (handler=0)
    at ../../../../gcc-3.0/libstdc++-v3/libsupc++/eh_terminate.cc:47
#3  0xd1fae874 in std::terminate() ()
    at ../../../../gcc-3.0/libstdc++-v3/libsupc++/eh_terminate.cc:57
#4  0xd1fafc6c in __cxa_throw (obj=0x0, tinfo=0xffffffff, dest=Cannot access memory at address 0xffffffff
)
    at ../../../../gcc-3.0/libstdc++-v3/libsupc++/eh_throw.cc:77
#5  0xd1faac84 in std::__throw_bad_cast() ()
    at ../../../../gcc-3.0/libstdc++-v3/src/functexcept.cc:50
#6  0x10002440 in std::basic_ios<char, std::char_traits<char> >::_M_check_facet(std::locale::facet const*) (this=0xdeadbeef, __f=0xffffffff)
    at .../lib/gcc-lib/powerpc-ibm-aix4.3.3.0/3.0/include/g++/bits/basic_ios.h:202
#7  0x10001448 in std::ostream::operator<<(long) (this=0x2ff22020, __n=13)
    at .../lib/gcc-lib/powerpc-ibm-aix4.3.3.0/3.0/include/g++/bits/ostream.tcc:148
#8  0x100007b8 in std::ostream::operator<<(int) (this=0x2ff22020, __n=13)
    at .../lib/gcc-lib/powerpc-ibm-aix4.3.3.0/3.0/include/g++/bits/std_ostream.h:120
#9  0x1000046c in main () at ostream-bug.C:10
#10 0x100001dc in __start ()


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]