egcs-1.0.1 problem on aix4.2

Joe Buck jbuck@synopsys.com
Fri Jan 9 11:33:00 GMT 1998


> 	I have encounted a problem compiling some c++ code that uses a few stl
> containers.  A short sample of that creates the problem is included below.  I
> haven't seen any comments on this so I'm concerned that I compiled/installed
> egcs improperly.  Any insight would be appreciated.  I can send more
> information if needed.  The code I tested compiles find under aix4.2 with
> egcs-1.0 and under solaris2.5.1 with egcs-1.0 and egcs-1.0.1.

(two files, each of which instantiates vector<double> functions).

> Here is the result of running g++ -v tmp.c++ tmp1.c++
[ on rs6000 / aix 4.2 ]

> ld: 0711-224 WARNING: Duplicate symbol: __malloc_alloc_template<0>::__malloc_alloc_oom_handler   

etc.

Hmm.  The strategy of generating duplicate definitions and having the linker
eliminate all but one is intentional on at least some platforms.  It seems
that the real problem is that the linker is issuing warnings about it
(perhaps meaning that this technique can't be used on aix4.2).  I don't
understand why 1.0 and 1.0.1 are doing something different though.



More information about the Gcc mailing list