public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* gcc 3.4.0 stdlibc++ AXI 5.2 problem
@ 2004-07-07 17:56 Bras, Gerard
  2004-07-11 21:11 ` llewelly
  0 siblings, 1 reply; 2+ messages in thread
From: Bras, Gerard @ 2004-07-07 17:56 UTC (permalink / raw)
  To: gcc-help

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: gcc 3.4.0 stdlibc++ AXI 5.2 problem
  2004-07-07 17:56 gcc 3.4.0 stdlibc++ AXI 5.2 problem Bras, Gerard
@ 2004-07-11 21:11 ` llewelly
  0 siblings, 0 replies; 2+ messages in thread
From: llewelly @ 2004-07-11 21:11 UTC (permalink / raw)
  To: Bras, Gerard; +Cc: gcc-help

"Bras, Gerard" <gbras@anacomp.com> writes:

> 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 

Am I blind, or does this link line not contain -lstdc++ ? 

> /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.  

I think something went wrong with your configure/build/install of
    gcc. I don't know what. I keep hearing one needs special patches
    to aix ld and as in order to build a working gcc. I dont' know the
    details. 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-07-11 21:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-07 17:56 gcc 3.4.0 stdlibc++ AXI 5.2 problem Bras, Gerard
2004-07-11 21:11 ` llewelly

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).