| 
     
      
      
      From: Tom S. <TSo...@da...> - 2004-10-26 15:34:23
      
     
   | 
We ran into this problem as well (AIX 5.2) and were able to fix it by running ranlib on the library. For safety's sake, we went ahead and ran ranlib on all of the c++ libraries.
Should have informed the list, but since I'm pretty sure we're doing many other things wrong in our compile environment I figured this was just another item on the list.
Tom
-----Original Message-----
From: aix...@ww...
[mailto:aix...@ww...]On Behalf Of
David Clissold
Sent: Monday, October 25, 2004 4:18 PM
To: Venkat Gunuganti
Cc: aix...@ww...
Subject: Re: [tbox-l] Re: Package updates: gcc, gcc-c++, binutils, gdb
Hi,
  Something is wrong here, but I'm not sure what.  I reproduced this on 5.2,
but the exact same 5.2 gcc-c++ image installed on 5.3 works with this same
testcase, and the 5.1 image on AIX 5.1 works with this testcase too.
But I did eventually get it to work on 5.2.  Here's what I did (as root):
# cd /opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.3.2
# cp libstdc++.a libstdc++.a.orig
# /usr/bin/ar -o libstdc++.a
Then go back to your test, and it works. (I was doing "g++ test1.cpp -o test1").
Make sure you run "/usr/bin/ar" above, because "/usr/linux/bin/ar" or
"/opt/freeware/bin/ar" (if you have them) will not recognize the -o option.
Using AIX's native 'ar' command, the -o option just recreates and realigns
the archive members and regenerates the archive symbol table.  After doing
that, it works.  It is strange, though, since it works on 5.3; if there was
a problem with the archive alignment or symbol table, then it seems it would
either work on both levels or fail on both.
At any rate, try the above workaround, and I'll try getting a new image built
soon that doesn't have this problem.  I will disable execute permission on
my /opt/freeware/bin/ar so that it always uses the native 'ar' when
creating the archive, as I think that may prevent the problem in the first
place.
On Mon, Oct 25, 2004 at 11:59:01AM -0500, Venkat Gunuganti wrote:
> Hi,
> 
> I had installed the gcc and gcc-c++ on AIX 5.2. The gcc compiler works fine, but I am some trouble using g++ compiler.
> I did a simple test using the following program.
> 
> *--------------
> //  test1.cpp
> 
> #include <cstdio>
> using namespace std;
> 
> int main ()
> {
>   printf ("Hello World!");
>   return 0;
> }
> *---------------
> I get the following errors, when I compile.
> 
> g++ test1.cpp
> 
> ld: 0711-201 SEVERE ERROR: External symbol typeinfo name for std::codecvt<wchar_t, char, char*>, defined in member codecvt.o
>         of archive /opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.3.2/libstdc++.a, was not found in the archive's global symbol table.
> ld: 0711-201 SEVERE ERROR: External symbol typeinfo name for std::codecvt<char, char, char*>, defined in member codecvt.o
>         of archive /opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.3.2/libstdc++.a, was not found in the archive's global symbol table.
> ld: 0711-201 SEVERE ERROR: External symbol typeinfo for std::codecvt<char, char, char*>, defined in member code cvt.o
>         of archive /opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.3.2/libstdc++.a, was not found in the archive's global symbol table.
> ld: 0711-201 SEVERE ERROR: External symbol typeinfo for std::codecvt<wchar_t, char, char*>, defined in member codecvt.o
>         of archive /opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.3.2/libstdc++.a, was not found in the archive's global symbol table.
> ... and more....
> 
> Look's like I am missing some flags or files here, any help is greatly appreciated.
> 
> Thanks
> Venkat
> 
> > gcc and gcc-c++ versions 3.3.2 are now available in the AIX Toolbox.  These
> > are now built directly from the FSF GNU source from the GNU website, and they
> > replace the older "GNUPro" versions previously available in the Toolbox.
> 
> 
> 
> _______________________________________________
> aixtoolbox-list mailing list
> aix...@ww...
> http://www-124.ibm.com/developerworks/oss/mailman/listinfo/aixtoolbox-list
-- 
David Clissold
cl...@au...
_______________________________________________
aixtoolbox-list mailing list
aix...@ww...
http://www-124.ibm.com/developerworks/oss/mailman/listinfo/aixtoolbox-list
 |