Bug 17932 - gcc-3.4.2 fails to compile glibc-2.3.3
Summary: gcc-3.4.2 fails to compile glibc-2.3.3
Status: RESOLVED DUPLICATE of bug 15095
Alias: None
Product: gcc
Classification: Unclassified
Component: c (show other bugs)
Version: 3.4.2
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-11 14:08 UTC by Ansgar Radermacher
Modified: 2005-07-23 22:49 UTC (History)
2 users (show)

See Also:
Host: Linux 2.4.27
Target:
Build: gcc-3.4.2
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ansgar Radermacher 2004-10-11 14:08:46 UTC
When compiling glibc-2.3.3 (configured from a new subdir "obj" using simply
../configure --enable-add-ons), I get the following error message in glibc
subdirectory "elf". The problems seems to be a gcc bug, since gcc-3.3.4 compiles
fine (and since I could not really see why the types should conflict).

Ansgar

---------

gcc -v
Reading specs from /local/software/gcc/3.4.2/lib/gcc/i686-pc-linux-gnu/3.4.2/specs
Configured with: ../configure --prefix=/local/software/gcc/3.4.2
Thread model: posix
gcc version 3.4.2

---------

make
....
make[2]: Entering directory `/tmp/glibc-2.3.3/elf'
gcc dl-runtime.c -c -std=gnu99 -O2 -Wall -Winline -Wstrict-prototypes
-Wwrite-strings -g -mpreferred-stack-boundary=2  -fexceptions
-fasynchronous-unwind-tables   -I../include -I. -I/tmp/glibc-2.3.3/obj/elf -I..
-I../libio  -I/tmp/glibc-2.3.3/obj -I../sysdeps/i386/elf
-I../linuxthreads/sysdeps/unix/sysv/linux/i386
-I../linuxthreads/sysdeps/unix/sysv/linux -I../linuxthreads/sysdeps/pthread
-I../sysdeps/pthread -I../linuxthreads/sysdeps/unix/sysv
-I../linuxthreads/sysdeps/unix -I../linuxthreads/sysdeps/i386/i686
-I../linuxthreads/sysdeps/i386 -I../sysdeps/unix/sysv/linux/i386
-I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common
-I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../sysdeps/unix/sysv/i386
-I../sysdeps/unix/sysv -I../sysdeps/unix/i386 -I../sysdeps/unix
-I../sysdeps/posix -I../sysdeps/i386/i686/fpu -I../sysdeps/i386/i686
-I../sysdeps/i386/i486 -I../sysdeps/i386/fpu -I../sysdeps/i386
-I../sysdeps/wordsize-32 -I../sysdeps/ieee754/ldbl-96
-I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754
-I../sysdeps/generic/elf -I../sysdeps/generic -I
/lib/modules/2.4.25/build/include -D_LIBC_REENTRANT -include
../include/libc-symbols.h       -o /tmp/glibc-2.3.3/obj/elf/dl-runtime.o -MD -MP
-MF /tmp/glibc-2.3.3/obj/elf/dl-runtime.o.dt
dl-runtime.c:57: error: conflicting types for 'fixup'
../sysdeps/i386/dl-machine.h:158: error: previous declaration of 'fixup' was here
dl-runtime.c:57: error: conflicting types for 'fixup'
../sysdeps/i386/dl-machine.h:158: error: previous declaration of 'fixup' was here
dl-runtime.c:142: error: conflicting types for 'profile_fixup'
../sysdeps/i386/dl-machine.h:161: error: previous declaration of 'profile_fixup'
was here
dl-runtime.c:142: error: conflicting types for 'profile_fixup'
../sysdeps/i386/dl-machine.h:161: error: previous declaration of 'profile_fixup'
was here
../sysdeps/i386/dl-machine.h:158: warning: 'fixup' declared `static' but never
defined
../sysdeps/i386/dl-machine.h:161: warning: 'profile_fixup' declared `static' but
never defined
Comment 1 Andrew Pinski 2004-10-11 14:14:38 UTC
See <http://gcc.gnu.org/ml/gcc/2004-03/msg00039.html> for why this was changed.

*** This bug has been marked as a duplicate of 15095 ***
Comment 2 James Richard Tyrer 2004-10-24 01:13:56 UTC
This bug is marked as a duplicate of a bug that has been marked INVALID.  
  
So, this bug isn't a duplicate anymore and should be reopened.  
  
 
--  
JRT  
  
  
Comment 3 Andrew Pinski 2004-10-24 01:41:14 UTC
But it is invalid code, I said read why GCC changed and why this version glibc is wrong. 
Comment 4 James Richard Tyrer 2004-10-24 02:55:18 UTC
Subject: Re:  gcc-3.4.2 fails to compile glibc-2.3.3

pinskia at gcc dot gnu dot org wrote:
> ------- Additional Comments From pinskia at gcc dot gnu dot org  2004-10-24 01:41 -------
> But it is invalid code, I said read why GCC changed and why this version glibc is wrong. 
> 
> 
OK, so I will go back to reporting it as a GLibc bug which is what I did first 
and was advised that it was a GCC bug.

--
JRT
Comment 5 MJ Burak 2004-12-03 19:58:41 UTC
Any fix for this?  I'm getting the same error.

I tried to build glibc 2.3.3 on RedHat Linux Advanced Serer 2.1
(kernel 2.4.9-e.24), but ran into an error saying compiler support for
__threads is required, so I used

configure --enable-add-ons=linuxthreads --prefix=/usr/local/glibc

(note:  prefix is not the same directory where the distribution was
un-packed.  That was done in /usr/local/glibc-2.3.3)

That allowed configure to complete without any further errors.

However, when I ran "make", I got the following:

ld-runtime.c:56: error: conflicting types for 'fixup'
../sysdeps/i386/dl-machine.h:158: error: previous declaration of
'fixup' was here
dl-runtime.c:56: error: conflicting types for 'fixup'
../sysdeps/i386/dl-machine.h:158: error: previous delcaration of
'fixup' was here
dl-runtime.c:141: error: conflicting types for 'profile_fixup'
../systemps/i386/dl-machine.h:161: error: previous delcaration of
'profile_fixup' was here
dl-runtime.c:141: error: conflicting types for 'profile_fixup'
../sysdeps/i386/dl-machine.h:161: error: previous delcaration of
'profile_fixup' was here
../sysdeps/i386/dl-machine.h:158: warning: 'fixup' declared 'static'
but never defined
../sysdeps/i386/sl-machine.h:161: warning: 'profile_fixup' declared'
static' but never defined
make[2]: *** [/usr/local/glibc/elf/dl-runtime.o] Error 1
make[2]: Leaving directory '/usr/local/glibc-2.3.3/elf'
make[1]: *** [elf/subdir_lib] Error 2
make[1]: Leaving directory '/usr/local/glibc-2.3.3'
make: *** [all] Error 2

I'm using gcc 3.4.3, with binutils 2.15.

Comment 6 Ansgar Radermacher 2004-12-07 09:33:27 UTC
Subject: Re:  gcc-3.4.2 fails to compile glibc-2.3.3

I understand that this is a glibc bug, a patch is available here:
http://kegel.com/crosstool/crosstool-0.28-rc37/patches/glibc-2.3.2/fixup.patch
I havn't tried it - alternatively, a workaround is to use gcc 3.3.4 or 
older to compile glibc-2.3.3.

maryburak11 at aol dot com wrote:

>------- Additional Comments From maryburak11 at aol dot com  2004-12-03 19:58 -------
>Any fix for this?  I'm getting the same error.
>
>I tried to build glibc 2.3.3 on RedHat Linux Advanced Serer 2.1
>(kernel 2.4.9-e.24), but ran into an error saying compiler support for
>__threads is required, so I used
>
>configure --enable-add-ons=linuxthreads --prefix=/usr/local/glibc
>
>(note:  prefix is not the same directory where the distribution was
>un-packed.  That was done in /usr/local/glibc-2.3.3)
>
>That allowed configure to complete without any further errors.
>
>However, when I ran "make", I got the following:
>
>ld-runtime.c:56: error: conflicting types for 'fixup'
>.../sysdeps/i386/dl-machine.h:158: error: previous declaration of
>'fixup' was here
>dl-runtime.c:56: error: conflicting types for 'fixup'
>.../sysdeps/i386/dl-machine.h:158: error: previous delcaration of
>'fixup' was here
>dl-runtime.c:141: error: conflicting types for 'profile_fixup'
>.../systemps/i386/dl-machine.h:161: error: previous delcaration of
>'profile_fixup' was here
>dl-runtime.c:141: error: conflicting types for 'profile_fixup'
>.../sysdeps/i386/dl-machine.h:161: error: previous delcaration of
>'profile_fixup' was here
>.../sysdeps/i386/dl-machine.h:158: warning: 'fixup' declared 'static'
>but never defined
>.../sysdeps/i386/sl-machine.h:161: warning: 'profile_fixup' declared'
>static' but never defined
>make[2]: *** [/usr/local/glibc/elf/dl-runtime.o] Error 1
>make[2]: Leaving directory '/usr/local/glibc-2.3.3/elf'
>make[1]: *** [elf/subdir_lib] Error 2
>make[1]: Leaving directory '/usr/local/glibc-2.3.3'
>make: *** [all] Error 2
>
>I'm using gcc 3.4.3, with binutils 2.15.
>
>
>
>  
>