[Bug c++/40871] New: g++ does not find lstdc++ on AIX

efernandez at physiomics-plc dot com gcc-bugzilla@gcc.gnu.org
Mon Jul 27 08:18:00 GMT 2009


On AIX 5.3, g++ version 4.4.0 and 4.4.1 cannot find the libstdc++ in default
location. This did not occur with 4.3.x.
The problem has been already discussed on the mailing list in this thread:
http://gcc.gnu.org/ml/gcc-help/2009-06/msg00092.html
and a patch was issued. It was supposedly committed to the main branch after
4.4.0, but for some reason was not present (or did not solve the issue) in
4.4.1.

I have compiled gcc with --disable-shared and use the AIX linker ld, not the
GNU linker.

This is the verbose compilation output of a simple Hello World program written
in C++:

Using built-in specs.
Target: powerpc-ibm-aix5.3.0.0
Configured with: /hpc/work/fernandz/gnusrc/gcc-4.4.1/configure --enable-threads
--enable-languages=c,c++ --prefix=/hpc/work/fernandz/gnu --enable-threads
--disable-shared --enable-version-specific-runtime-libs --disable-nls
--with-gmp=/hpc/work/fernandz/gnu --with-mpfr=/hpc/work/fernandz/gnu
--with-ppl=/hpc/work/fernandz/gnu --with-cloog=/hpc/work/fernandz/gnu
Thread model: aix
gcc version 4.4.1 (GCC) 
COLLECT_GCC_OPTIONS='-v' '-o' 'hello'
 /hpc/work/fernandz/gnu/libexec/gcc/powerpc-ibm-aix5.3.0.0/4.4.1/cc1plus -quiet
-v -D_ALL_SOURCE hellow.cpp -quiet -dumpbase hellow.cpp -auxbase hellow
-version -o /hpc/home/fernandz/User-Tmp/ccrprayy.s
ignoring nonexistent directory
"/hpc/work/fernandz/gnu/lib/gcc/powerpc-ibm-aix5.3.0.0/4.4.1/../../../../powerpc-ibm-aix5.3.0.0/include"
#include "..." search starts here:
#include <...> search starts here:
 /hpc/work/fernandz/gnu/lib/gcc/powerpc-ibm-aix5.3.0.0/4.4.1/include/c++

/hpc/work/fernandz/gnu/lib/gcc/powerpc-ibm-aix5.3.0.0/4.4.1/include/c++/powerpc-ibm-aix5.3.0.0

/hpc/work/fernandz/gnu/lib/gcc/powerpc-ibm-aix5.3.0.0/4.4.1/include/c++/backward
 /usr/local/include
 /hpc/work/fernandz/gnu/include
 /hpc/work/fernandz/gnu/lib/gcc/powerpc-ibm-aix5.3.0.0/4.4.1/include
 /hpc/work/fernandz/gnu/lib/gcc/powerpc-ibm-aix5.3.0.0/4.4.1/include-fixed
 /usr/include
End of search list.
GNU C++ (GCC) version 4.4.1 (powerpc-ibm-aix5.3.0.0)
        compiled by GNU C version 4.4.1, GMP version 4.3.1, MPFR version
2.4.1-p5.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: f579180f2de70dc0754151f494907fb7
COLLECT_GCC_OPTIONS='-v' '-o' 'hello'
 as -u -mppc -o /hpc/home/fernandz/User-Tmp/ccwslsmj.o
/hpc/home/fernandz/User-Tmp/ccrprayy.s
COMPILER_PATH=/hpc/work/fernandz/gnu/libexec/gcc/powerpc-ibm-aix5.3.0.0/4.4.1/:/hpc/work/fernandz/gnu/libexec/gcc/powerpc-ibm-aix5.3.0.0/4.4.1/:/hpc/work/fernandz/gnu/libexec/gcc/powerpc-ibm-aix5.3.0.0/:/hpc/work/fernandz/gnu/lib/gcc/powerpc-ibm-aix5.3.0.0/4.4.1/:/hpc/work/fernandz/gnu/lib/gcc/powerpc-ibm-aix5.3.0.0/
LIBRARY_PATH=/hpc/work/fernandz/gnu/lib/gcc/powerpc-ibm-aix5.3.0.0/4.4.1/:/hpc/work/fernandz/gnu/lib/gcc/powerpc-ibm-aix5.3.0.0/4.4.1/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-o' 'hello'
 /hpc/work/fernandz/gnu/libexec/gcc/powerpc-ibm-aix5.3.0.0/4.4.1/collect2
-bpT:0x10000000 -bpD:0x20000000 -btextro -bnodelcsect -o hello /lib/crt0.o
-L/hpc/work/fernandz/gnu/lib/gcc/powerpc-ibm-aix5.3.0.0/4.4.1
-L/hpc/work/fernandz/gnu/lib/gcc/powerpc-ibm-aix5.3.0.0/4.4.1/../../..
/hpc/home/fernandz/User-Tmp/ccwslsmj.o -lstdc++ -lsupc++ -lm
/hpc/work/fernandz/gnu/lib/gcc/powerpc-ibm-aix5.3.0.0/4.4.1/libgcc.a -lc
/hpc/work/fernandz/gnu/lib/gcc/powerpc-ibm-aix5.3.0.0/4.4.1/libgcc.a
collect2: library libstdc++ -lsupc++ not found


-- 
           Summary: g++ does not find lstdc++ on AIX
           Product: gcc
           Version: 4.4.1
            Status: UNCONFIRMED
          Severity: blocker
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: efernandez at physiomics-plc dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40871



More information about the Gcc-bugs mailing list