[Bug target/38547] duplicate symbols with g++ on AIX

2011-05-15 Thread tammer at tammer dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38547

--- Comment #21 from Rainer Tammer  2011-05-15 
09:20:15 UTC ---
Hello,
Sorry for the delayed answer.

On 02.05.2011 19:41, jqian at tibco dot com wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38547
>
> --- Comment #20 from Jason Qian  2011-05-02 17:35:23 
> UTC ---
> Comment on attachment 16962
>   --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=16962
> errors during build
>
> Hi Rainer
>
> I got the same message using gcc4.4.0 ob AIX 5.3
>
> Duplicate symbol: .__divti3
>
> Is there patch for this ?
>
Unfortunately not. This problem is there for a long time.
But I am not aware of a patch.

Bye
  Rainer


[Bug target/38547] duplicate symbols with g++ on AIX

2011-05-02 Thread jqian at tibco dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38547

--- Comment #20 from Jason Qian  2011-05-02 17:35:23 
UTC ---
Comment on attachment 16962
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=16962
errors during build

Hi Rainer

I got the same message using gcc4.4.0 ob AIX 5.3

Duplicate symbol: .__divti3

Is there patch for this ?


[Bug target/38547] duplicate symbols with g++ on AIX

2009-01-25 Thread tammer at tammer dot net


--- Comment #19 from tammer at tammer dot net  2009-01-25 09:18 ---
Hello,
I second that.
Bye
  Rainer


-- 


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



[Bug target/38547] duplicate symbols with g++ on AIX

2009-01-21 Thread bruprz1 at lhsystems dot pl


--- Comment #18 from bruprz1 at lhsystems dot pl  2009-01-21 14:39 ---
(In reply to comment #13)
> symbols. The assembly files generated by GCC for AIX always have included
> multiple symbol definitions for certain global variable and function

If I understand correctly, that statement means that there have always been
duplicate symbols under AIX. This may be true for 5.3, but:

We maintain an application in C/C++ (over 1.5 million ELOC, with shared
libraries) and since we had upgraded to AIX 5.2 and GCC4.1.1 we didn't have
even one duplicate symbol there. Before that we indeed had duplicate symbols in
C++ code (since weak symbols were not supported). Please have a look at the
following:

host52:/tmp$ oslevel -r
5200-00
host52:/tmp$ /usr/local/gcc/3.4.3/bin/g++ a.cc
host52:/tmp$ /usr/local/gcc/4.1.1/bin/g++ a.cc


host53:/tmp$ oslevel -r
5300-02
host53:/tmp$ /usr/local/gcc/4.0.2/bin/g++ a.cc
ld: 0711-224 WARNING: Duplicate symbol: .__divdi3
ld: 0711-224 WARNING: Duplicate symbol: .__moddi3
ld: 0711-224 WARNING: Duplicate symbol: .__udivdi3
ld: 0711-224 WARNING: Duplicate symbol: .__umoddi3
ld: 0711-224 WARNING: Duplicate symbol: .__udivmoddi4
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
host53:/tmp$ /usr/local/gcc/4.3.2/bin/g++ a.cc
ld: 0711-224 WARNING: Duplicate symbol: .__divdi3
ld: 0711-224 WARNING: Duplicate symbol: .__moddi3
ld: 0711-224 WARNING: Duplicate symbol: .__udivdi3
ld: 0711-224 WARNING: Duplicate symbol: .__umoddi3
ld: 0711-224 WARNING: Duplicate symbol: .__udivmoddi4
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.

It looks like a 5.3 regression - could you have look at the problem again,
please?


-- 


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



[Bug target/38547] duplicate symbols with g++ on AIX

2008-12-22 Thread tammer at tammer dot net


--- Comment #17 from tammer at tammer dot net  2008-12-22 12:31 ---
Hello,
I found one interesting thing:

The call (for .libs/libstdc++.so.6) which produced the error messaged ends in:
  ${wl}-berok
Should this not be:
  -Wl,-berok
Bye
 Rainer


-- 


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



[Bug target/38547] duplicate symbols with g++ on AIX

2008-12-22 Thread tammer at tammer dot net


--- Comment #16 from tammer at tammer dot net  2008-12-22 12:17 ---
Created an attachment (id=16962)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16962&action=view)
errors during build


-- 


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



[Bug target/38547] duplicate symbols with g++ on AIX

2008-12-22 Thread tammer at tammer dot net


--- Comment #15 from tammer at tammer dot net  2008-12-22 12:16 ---
Hello,
I just started my own build of 4.2.4 ...
During stage3 I get the following errors:


ld: 0711-768 WARNING: Object
../libsupc++/.libs/libsupc++convenience.a[eh_terminate.o], section 1, function
.__cxxabiv1::__terminate(void (*)()):
The branch at address 0x13c is not followed by a recognized no-op
or TOC-reload instruction. The unrecognized instruction is 0x0.
ld: 0711-768 WARNING: Object
../libsupc++/.libs/libsupc++convenience.a[eh_terminate.o], section 1, function
.std::terminate():
The branch at address 0x194 is not followed by a recognized no-op
or TOC-reload instruction. The unrecognized instruction is 0x0.

see attached log...


Bye
  Rainer


-- 


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



[Bug target/38547] duplicate symbols with g++ on AIX

2008-12-22 Thread tammer at tammer dot net


--- Comment #14 from tammer at tammer dot net  2008-12-22 09:48 ---
Hello,
yes, the binary executes. 
So these symbols should be removed from the export file from ligbcc_s.a then?

I will build gcc 4.2.4 on my build machine (AIX 5.3) with the SPEC file/patch
from Mr. Perzl. Then I will look for the export file of libgcc_s.a.

Bye
  Rainer


-- 


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



[Bug target/38547] duplicate symbols with g++ on AIX

2008-12-22 Thread pinskia at gcc dot gnu dot org


--- Comment #13 from pinskia at gcc dot gnu dot org  2008-12-22 08:17 
---
Oh, you should read the installation instructions:
http://gcc.gnu.org/install/specific.html 

Linking executables and shared libraries may produce warnings of duplicate
symbols. The assembly files generated by GCC for AIX always have included
multiple symbol definitions for certain global variable and function
declarations in the original program. The warnings should not prevent the
linker from producing a correct library or runnable executable.


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution||INVALID


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



[Bug target/38547] duplicate symbols with g++ on AIX

2008-12-22 Thread pinskia at gcc dot gnu dot org


--- Comment #12 from pinskia at gcc dot gnu dot org  2008-12-22 08:11 
---
Actually those symbols in libgcc_s.a should be hidden ...


-- 


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



[Bug target/38547] duplicate symbols with g++ on AIX

2008-12-22 Thread tammer at tammer dot net


--- Comment #11 from tammer at tammer dot net  2008-12-22 08:03 ---
Hello,
one clarification 
... this happened with all 4.x gcc versions ...

This means I have tried to build gcc 4.x myself and I ran in the same problem
that the symbols come from two libraries. One library provides the static
version and one the dynamic. I think that this functions should be pulled in
via the static version... am I wrong here ? Unfortunately I have no deeper
knowledge of the gcc build environment so its really hard to track down the
problem. Thanks for your help.

Bye
  Rainer


-- 


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



[Bug target/38547] duplicate symbols with g++ on AIX

2008-12-21 Thread tammer at tammer dot net


--- Comment #10 from tammer at tammer dot net  2008-12-22 07:57 ---
Created an attachment (id=16960)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16960&action=view)
AIX gcc 4.2.4 spec file


-- 


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



[Bug target/38547] duplicate symbols with g++ on AIX

2008-12-21 Thread tammer at tammer dot net


--- Comment #9 from tammer at tammer dot net  2008-12-22 07:56 ---
Created an attachment (id=16959)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16959&action=view)
AIX gcc 4.2.4 patch


-- 


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



[Bug target/38547] duplicate symbols with g++ on AIX

2008-12-21 Thread tammer at tammer dot net


--- Comment #8 from tammer at tammer dot net  2008-12-22 07:56 ---
Hello,
this happened with all 4.x gcc versions. This version is from www.perzl.org.
There is only a tiny patch to the build files (see attachment).

Bye
  Rainer


-- 


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



[Bug target/38547] duplicate symbols with g++ on AIX

2008-12-21 Thread pinskia at gcc dot gnu dot org


--- Comment #7 from pinskia at gcc dot gnu dot org  2008-12-22 07:46 ---
-lgcc_s
/opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/4.2.4/libgcc.a

That should not happen.  In fact I am reading init_gcc_specs correctly, you
have a modified GCC version.

Did you compile this GCC yourself or is this from a binary install of GCC?

I do know that other folks trying to use gcc with C++ on aix5.3 works.


-- 


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



[Bug target/38547] duplicate symbols with g++ on AIX

2008-12-21 Thread tammer at tammer dot net


--- Comment #6 from tammer at tammer dot net  2008-12-22 07:28 ---
Hello,
I have uploaded the dump of ligbcc.a and libgcc_s.a.
Bye
  Rainer


-- 


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



[Bug target/38547] duplicate symbols with g++ on AIX

2008-12-21 Thread tammer at tammer dot net


--- Comment #5 from tammer at tammer dot net  2008-12-22 07:27 ---
Created an attachment (id=16958)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16958&action=view)
libgcc_s dump


-- 


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



[Bug target/38547] duplicate symbols with g++ on AIX

2008-12-21 Thread tammer at tammer dot net


--- Comment #4 from tammer at tammer dot net  2008-12-22 07:27 ---
Created an attachment (id=16957)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16957&action=view)
libgcc dump


-- 


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



[Bug target/38547] duplicate symbols with g++ on AIX

2008-12-21 Thread tammer at tammer dot net


--- Comment #3 from tammer at tammer dot net  2008-12-22 07:22 ---
Hello,
here is the -v log:
Using built-in specs.
Target: powerpc-ibm-aix5.3.0.0
Configured with: ../gcc-4.2.4/configure --with-as=/usr/bin/as
--with-ld=/usr/bin/ld --enable-languages=c,c++,fortran --prefix=/opt/freeware
--enable-threads --enable-version-specific-runtime-libs --disable-nls
--enable-decimal-float=dpd --host=powerpc-ibm-aix5.3.0.0
Thread model: aix
gcc version 4.2.4
 /opt/freeware/libexec/gcc/powerpc-ibm-aix5.3.0.0/4.2.4/cc1plus -quiet -v
-D_ALL_SOURCE hello.cpp -quiet -dumpbase hello.cpp -auxbase hello -version -o
/tmp//ccyHZAZn.s
ignoring nonexistent directory
"/opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/4.2.4/../../../../powerpc-ibm-aix5.3.0.0/include"
#include "..." search starts here:
#include <...> search starts here:
 /opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/4.2.4/include/c++

/opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/4.2.4/include/c++/powerpc-ibm-aix5.3.0.0
 /opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/4.2.4/include/c++/backward
 /usr/local/include
 /opt/freeware/include
 /opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/4.2.4/include
 /usr/include
End of search list.
GNU C++ version 4.2.4 (powerpc-ibm-aix5.3.0.0)
compiled by GNU C version 4.2.4.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=32768
Compiler executable checksum: aad024cebe4ac3095c87c9dcfa7fc033
 /usr/bin/as -u -mppc -o /tmp//ccQD9A51.o /tmp//ccyHZAZn.s
 /opt/freeware/libexec/gcc/powerpc-ibm-aix5.3.0.0/4.2.4/collect2
-bpT:0x1000 -bpD:0x2000 -btextro -bnodelcsect -o hello /lib/crt0.o
-L/opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/4.2.4
-L/opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/4.2.4/../../.. /tmp//ccQD9A51.o
-lstdc++ -lm -lgcc_s
/opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/4.2.4/libgcc.a -lc -lgcc_s
/opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/4.2.4/libgcc.a
ld: 0711-224 WARNING: Duplicate symbol: .__divdi3
ld: 0711-224 WARNING: Duplicate symbol: .__moddi3
ld: 0711-224 WARNING: Duplicate symbol: .__udivdi3
ld: 0711-224 WARNING: Duplicate symbol: .__umoddi3
ld: 0711-224 WARNING: Duplicate symbol: .__udivmoddi4
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.

Bye
  Rainer


-- 


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



[Bug target/38547] duplicate symbols with g++ on AIX

2008-12-21 Thread pinskia at gcc dot gnu dot org


--- Comment #2 from pinskia at gcc dot gnu dot org  2008-12-21 23:00 ---

 .__divdi3
{/opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/4.2.4/libgcc_s.a[shr.o]}
** Duplicate **   
../../gcc-4.2.4/gcc/libgcc2.c(/opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/4.2.4/libgcc.a[_divdi3.o])

libgcc.a and libgcc_s.a should not be linked in together.


Can you add a -v to the gcc command line and provide that output?  


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING


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