Red Hat Bugzilla – Bug 185340
cannot compile ggc 4.x with gcc3
Last modified: 2007-11-30 17:07:23 EST
Description of problem:
linker error while compiling gcc-4.x from source
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Download gcc-4.x
3. Fails with internal error
Works fine with RHEL4U2
/usr/bin/ld: BFD 18.104.22.168.2 20040927 internal error, aborting at
../../bfd/elf32-i386.c line 2262 in elf_i386_relocate_section
/usr/bin/ld: Please report this bug.
log file attached
Created attachment 126071 [details]
gcc 4.1.0 compile log
gcc-4.0.2 also compiles properly with binutils-2.16.1 and other packages from
RHEL4U3 (e.g. gcc-3.4.5-2).
This issue is on Red Hat Engineering's list of planned work items
for the upcoming Red Hat Enterprise Linux 4.4 release. Engineering
resources have been assigned and barring unforeseen circumstances, Red
Hat intends to include this item in the 4.4 release.
This regression seems to be caused by the
patch, added to fix #168316, IT#77962.
I should note that what libstdc++-v3 does here is very fragile and haven't
been ever supported, only happens to work with some ld versions (and doesn't
work with most other ld versions).
One object has versioned symbol (in this case _ZNSt11char_traitsIcE2eqERKcS2_)
@@GLIBCXX_3.4.5 and @GLIBCXX_3.4, another one exports the same symbol (weak)
unversioned. The reason why this works e.g. in gcc4 RHEL4 rpms is that
in RHEL4 gcc4 rpms compatibility.o (which has the versioned symbol) comes last,
while in upstream it comes before string-inst.o which defines the weak symbol.
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.