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]

gcc 3.4.0 stdlibc++ AXI 5.2 problem


I hope someone can look at this and tell me where I've gone into the weeds.....

Having more or less successfully bootstrapped 3.4.0 on AIX 5.2 (I say successfully because it built, the binaries run and I can compile C programs) I'm having trouble with linking C++ programs.  To wit I hace the following test case:

#include <iostream>

int main ()
{
	std::cout << "Success!" << std::endl;
}

Pretty simple, right?  I compile it like so:

	g++ -v  xxx.C -o xxx

and get:

Reading specs from /oracle_staging02/gcc-install/bin/../lib/gcc/powerpc-ibm-aix5.2.0.0/3.4.0/specs
Configured with: /oracle_staging02/gcc/gcc-3.4.0/configure --prefix=/opt/gcc -enable-language=c,c++
Thread model: aix
gcc version 3.4.0
 /oracle_staging02/gcc-install/bin/../libexec/gcc/powerpc-ibm-aix5.2.0.0/3.4.0/cc1plus -quiet -v -iprefix /oracle_staging02/gcc-install/bin/../lib/gcc/powerpc-ibm-aix5.2.0.0/3.4.0/ -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED=1 -D_LARGE_FILE_API -D_ALL_SOURCE xxx.C -quiet -dumpbase xxx.C -auxbase xxx -version -o /tmp//cchxOvy3.s
ignoring nonexistent directory "/oracle_staging02/gcc-install/bin/../lib/gcc/powerpc-ibm-aix5.2.0.0/3.4.0/../../../../powerpc-ibm-aix5.2.0.0/include"
ignoring duplicate directory "/opt/gcc/lib/gcc/powerpc-ibm-aix5.2.0.0/3.4.0/../../../../include/c++/3.4.0"
ignoring duplicate directory "/opt/gcc/lib/gcc/powerpc-ibm-aix5.2.0.0/3.4.0/../../../../include/c++/3.4.0/powerpc-ibm-aix5.2.0.0"
ignoring duplicate directory "/opt/gcc/lib/gcc/powerpc-ibm-aix5.2.0.0/3.4.0/../../../../include/c++/3.4.0/backward"
ignoring duplicate directory "/opt/gcc/lib/gcc/powerpc-ibm-aix5.2.0.0/3.4.0/include"
ignoring nonexistent directory "/opt/gcc/lib/gcc/powerpc-ibm-aix5.2.0.0/3.4.0/../../../../powerpc-ibm-aix5.2.0.0/include"
#include "..." search starts here:
#include <...> search starts here:
 /oracle_staging02/gcc-install/bin/../lib/gcc/powerpc-ibm-aix5.2.0.0/3.4.0/../../../../include/c++/3.4.0
 /oracle_staging02/gcc-install/bin/../lib/gcc/powerpc-ibm-aix5.2.0.0/3.4.0/../../../../include/c++/3.4.0/powerpc-ibm-aix5.2.0.0
 /oracle_staging02/gcc-install/bin/../lib/gcc/powerpc-ibm-aix5.2.0.0/3.4.0/../../../../include/c++/3.4.0/backward
 /oracle_staging02/gcc-install/bin/../lib/gcc/powerpc-ibm-aix5.2.0.0/3.4.0/include
 /usr/local/include
 /opt/gcc/include
 /usr/include
End of search list.
GNU C++ version 3.4.0 (powerpc-ibm-aix5.2.0.0)
	compiled by GNU C version 3.4.0.
GGC heuristics: --param ggc-min-expand=32 --param ggc-min-heapsize=4096
 as -u -mppc -o /tmp//cc9IZWc2.o /tmp//cchxOvy3.s
 /oracle_staging02/gcc-install/bin/../libexec/gcc/powerpc-ibm-aix5.2.0.0/3.4.0/collect2 -bpT:0x10000000 -bpD:0x20000000 -btextro -bnodelcsect -o xxx /lib/crt0.o -L/oracle_staging02/gcc-install/bin/../lib/gcc/powerpc-ibm-aix5.2.0.0/3.4.0 -L/oracle_staging02/gcc-install/bin/../lib/gcc -L/opt/gcc/lib/gcc/powerpc-ibm-aix5.2.0.0/3.4.0 -L/oracle_staging02/gcc-install/bin/../lib/gcc/powerpc-ibm-aix5.2.0.0/3.4.0/../../.. -L/opt/gcc/lib/gcc/powerpc-ibm-aix5.2.0.0/3.4.0/../../.. /tmp//cc9IZWc2.o /oracle_staging02/gcc-install/bin/../lib/gcc/powerpc-ibm-aix5.2.0.0/3.4.0/libgcc.a /oracle_staging02/gcc-install/bin/../lib/gcc/powerpc-ibm-aix5.2.0.0/3.4.0/libgcc_eh.a -lc /oracle_staging02/gcc-install/bin/../lib/gcc/powerpc-ibm-aix5.2.0.0/3.4.0/libgcc.a /oracle_staging02/gcc-install/bin/../lib/gcc/powerpc-ibm-aix5.2.0.0/3.4.0/libgcc_eh.a
/tmp//cc9IZWc2.o(.pr+0x1ec):xxx.C: undefined reference to `.std::basic_string<char, std::char_traits<char>, std::allocator<char> >::size() const'
/tmp//cc9IZWc2.o(.pr+0x26c):xxx.C: undefined reference to `.std::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator[](unsigned long) const'
/tmp//cc9IZWc2.o(.pr+0x2e4):xxx.C: undefined reference to `.std::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator[](unsigned long) const'
/tmp//cc9IZWc2.o(.pr+0x334):xxx.C: undefined reference to `.std::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator[](unsigned long) const'
/tmp//cc9IZWc2.o(.pr+0x3f6):xxx.C: undefined reference to `std::cout'
/tmp//cc9IZWc2.o(.pr+0x3fc):xxx.C: undefined reference to `.std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
/tmp//cc9IZWc2.o(.pr+0x40e):xxx.C: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&)'
/tmp//cc9IZWc2.o(.pr+0x410):xxx.C: undefined reference to `.std::basic_ostream<char, std::char_traits<char> >::operator<<(std::basic_ostream<char, std::char_traits<char> >& (*)(std::basic_ostream<char, std::char_traits<char> >&))'
/tmp//cc9IZWc2.o(.pr+0x50c):xxx.C: undefined reference to `.std::ios_base::Init::Init()'
/tmp//cc9IZWc2.o(.pr+0x538):xxx.C: undefined reference to `.std::ios_base::Init::~Init()'
/tmp//cc9IZWc2.o(.tc+0x0):xxx.C: undefined reference to `std::cout'
/tmp//cc9IZWc2.o(.tc+0x0):xxx.C: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&)'
/tmp//cc9IZWc2.o(.rw+0x11):xxx.C: undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status

Using the AIX ld get's very similar messages.

So... if I've been a dunce, it's OK to say so.  But any and all advice will be gratefully accepted.  

best regards,
Gerard Bras


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