This is the mail archive of the gcc-help@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]
Other format: [Raw text]

Re: AIX 5.3 GCC 4.2.1 libstdc++ Linker Problems


ericbambach1@discover.com writes:
 > Hello,
 > 
 >         Please CC as I'm not subscribed. Hope line breaks are ok, I hate 
 > Lotus Notes :)
 > 
 >         I'm having a lot of trouble getting gcc 4.2.1 compiled and run on 
 > AIX 5.3 on the power5 architecture. Even after GCC compiles successfully 
 > it seems libstdc++.a isn't built correctly.
 > 
 >         We have the IBM binary gcc-4.0.0 compiler installed in 
 > /opt/freeware/bin so I know its possible to get GCC on here somehow.
 > 
 >         It builds fine but compilation of this simple test program fails 
 > with g++. gcc SEEMS to function ok but I havent checked it in depth yet. 
 > Take a look at the session below (edited for readability + mask 
 > user+hostname only) where it first fails to find libgcc_s even though the 
 > configure script placed it in /sys/usr/lib just like I asked, Next it cant 
 > link against libstdc++.a. Once I turn on the verbose output I see that 
 > libstdc++.a has no symbols being imported! I dont know much about 
 > compilers but it seems that I need SOME symbols from libstdc++ are needed. 
 > Last, if I force it to link against IBM's libstdc++.a it works fine. 
 > 
 >         Am I building gcc wrong? I did build it with GNU make and the AIX 
 > as+ld. I borrowed IBM's config flags from 4.0.0. Any additional info 
 > needed?

This is a clue:

Configured with: ../gcc-4.2.1/configure --with-as=/usr/bin/as 
--with-ld=/usr/bin/ld --disable-nls --enable-languages=c,c++ 
--prefix=/sys/usr/local --bindir=/sys/usr --enable-threads 
--enable-version-specific-runtime-libs --host=powerpc-ibm-aix5.3.0.0 : 
(reconfigured) ../gcc-4.2.1/configure --with-as=/usr/bin/as 
--with-ld=/usr/bin/ld --disable-nls --enable-languages=c,c++ 
--prefix=/sys/usr/local --with-slibdir=/sys/usr/lib --enable-threads 
--enable-version-specific-runtime-libs --host=powerpc-ibm-aix5.3.0.0

So, you configured and built gcc without specifying the dir for the
shared libgcclibrary, and you then reconfigured with one.  Why did you
do this?

 > Symbol
 >  
 > ----------------------------------------------------------------------------------------------
 >  __gxx_personality_v0      [6]     ER PR hello.c(/tmp//cc05Pxwk.o)
 >                                    00000111 .data    R_POS    [24] 
 > _GLOBAL__F_main_8A711DF0
 > ER: The return code is 8.
 > ld: 0711-317 ERROR: Undefined symbol: __gxx_personality_v0
 > collect2: ld returned 8 exit status

OK, so __gxx_personality_v0 is missing.  It should be in
/sys/usr/local/lib/libstdc++.  Is it?

Andrew.


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