Summary: | Build error on Debian unstable using gcc 4.7.1 | ||
---|---|---|---|
Product: | glibc | Reporter: | Daniel Schepler <dschepler> |
Component: | math | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED WONTFIX | ||
Severity: | enhancement | CC: | aj, hjl.tools, jrnieder |
Priority: | P2 | Flags: | fweimer:
security-
|
Version: | unspecified | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: | ||
Attachments: |
Preprocessed s_isnan.c
Minimal file, should show the problem Valgrind log from cc1 running on s_isnan.i Minimal file, does show the problem |
(In reply to comment #0) > Created attachment 6468 [details] > Preprocessed s_isnan.c > > When I try building glibc from git master branch on an up-to-date Debian sid > amd64 system, with gcc-4.7 version 4.7.1-1, I get this error: > I can't reproduce it with gcc version 4.7.2 20120622 (prerelease) (GCC) Have you tried FSF GCC 4.7.1? That's the same preprocessed file that my gcc 4.7.1 generates. So, this looks fine. I suspect a bug in GCC, perhaps a distro specific patch you're using. Created attachment 6470 [details]
Minimal file, should show the problem
I'm attaching a small test case (just reduced your file to the minimal version). It should fail to compile on your system if you compile manually. If it does, please report it as bug against GCC since other GCC versions work just fine with this.
(In reply to comment #3) > Created attachment 6470 [details] > Minimal file, should show the problem > > I'm attaching a small test case (just reduced your file to the minimal > version). It should fail to compile on your system if you compile manually. If > it does, please report it as bug against GCC since other GCC versions work just > fine with this. I couldn't reproduce the error with your attached file, whether I compiled just with "gcc -c s_isnan_min.i" or put in all the flags from the command line I posted. On the other hand, "gcc -c s_isnan.i" does fail with the same error. (In reply to comment #4) > > I couldn't reproduce the error with your attached file, whether I compiled just > with "gcc -c s_isnan_min.i" or put in all the flags from the command line I > posted. On the other hand, "gcc -c s_isnan.i" does fail with the same error. Use valgrind to see if there is anything odd. Created attachment 6471 [details]
Valgrind log from cc1 running on s_isnan.i
(In reply to comment #5) > (In reply to comment #4) > > > > I couldn't reproduce the error with your attached file, whether I compiled just > > with "gcc -c s_isnan_min.i" or put in all the flags from the command line I > > posted. On the other hand, "gcc -c s_isnan.i" does fail with the same error. > > Use valgrind to see if there is anything odd. Hmm, yes, I do get a couple valgrind errors in cc1, attached. (In reply to comment #6) > Created attachment 6471 [details] > Valgrind log from cc1 running on s_isnan.i It looks OK. Please try FSF GCC 4.7.1. (In reply to comment #8) > (In reply to comment #6) > > Created attachment 6471 [details] > > Valgrind log from cc1 running on s_isnan.i > > It looks OK. Please try FSF GCC 4.7.1. Finally finished the build of FSF GCC 4.7.1, with a configuration as close as possible to Debian's. After the build, "`pwd`/gcc/xgcc -B`pwd`/gcc -c /tmp/s_isnan.i -o /tmp/s_isnan.o" works fine. So, I guess now I need to file a bug on Debian gcc-4.7, and close this bug after I post a link to the Debian bug report. Bug filed with Debian BTS: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=678589 Will wait some time to see Debian package maintainer's response, before I close this bug. *** Bug 14285 has been marked as a duplicate of this bug. *** No response by debian-gcc on Debian bts #678589 so far... Closing this bug. (In reply to comment #12) > No response by debian-gcc on Debian bts #678589 so far... Closing this bug. Shouldn't it at least be documented somewhere so we don't get piles of duplicate reports? (Not to mention making the lives of people building glibc a little better.) Created attachment 6512 [details]
Minimal file, does show the problem
I've found a reduced test case which does show the failure on Debian gcc. It seems the previous inline definition is crucial to reproducing the failure.
FYI: I found that the Debian GCC patch causing this failure was a proposed patch from http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33763#c31 . Build still fails but doesn't seem to be documented at <http://sourceware.org/glibc/wiki/Release/2.16>, so reopening. If it's not easy to avoid tickling this gcc bug, maybe configure could check for it and error out early. GCC has now a patch committed that handles this situation correctly. I ask Debian to update their compiler and replace the buggy patch with a fixed one and close this bug as WONTFIX since it's a bug in a distribution specific compiler that shouuld be fixed with an updated compiler. (In reply to comment #17) > GCC has now a patch committed that handles this situation correctly. > > I ask Debian to update their compiler and replace the buggy patch with a fixed > one The compiler bugfix was merged into Debian's gcc-4.7 package (version 4.7.2-3) on 6 October and enterered testing for Debian 7.0 (wheezy) yesterday. Previous Debian releases don't have gcc 4.7, so I don't think anyone will be running into this any more. Thanks, all. *** Bug 260998 has been marked as a duplicate of this bug. *** Seen from the domain http://volichat.com Page where seen: http://volichat.com/adult-chat-rooms Marked for reference. Resolved as fixed @bugzilla. |
Created attachment 6468 [details] Preprocessed s_isnan.c When I try building glibc from git master branch on an up-to-date Debian sid amd64 system, with gcc-4.7 version 4.7.1-1, I get this error: make subdir=math -C math ..=../ subdir_lib make[2]: Entering directory `/home/lfs/sources/glibc-2.16/math' gcc ../sysdeps/ieee754/dbl-64/wordsize-64/s_isnan.c -c -std=gnu99 -fgnu89-inline -O2 -Wall -Winline -Wwrite-strings -fmerge-all-constants -frounding-math -g -Wstrict-prototypes -fPIC -Wno-uninitialized -D__NO_MATH_INLINES -D__LIBC_INTERNAL_MATH_INLINES -I../include -I/home/lfs/sources/libc-build/math -I/home/lfs/sources/libc-build -I../sysdeps/unix/sysv/linux/x86_64/64/nptl -I../sysdeps/unix/sysv/linux/x86_64/64 -I../nptl/sysdeps/unix/sysv/linux/x86_64 -I../nptl/sysdeps/unix/sysv/linux/x86 -I../sysdeps/unix/sysv/linux/x86 -I../sysdeps/unix/sysv/linux/x86_64 -I../sysdeps/unix/sysv/linux/wordsize-64 -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/inet -I../nptl/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../sysdeps/unix/x86_64 -I../nptl/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../nptl/sysdeps/x86_64/64 -I../sysdeps/x86_64/64 -I../sysdeps/x86_64/fpu/multiarch -I../sysdeps/x86_64/fpu -I../sysdeps/x86/fpu -I../sysdeps/x86_64/multiarch -I../nptl/sysdeps/x86_64 -I../sysdeps/x86_64 -I../sysdeps/x86 -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64/wordsize-64 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/wordsize-64 -I../sysdeps/ieee754 -I../sysdeps/generic -I../nptl -I.. -I../libio -I. -D_LIBC_REENTRANT -include ../include/libc-symbols.h -DPIC -DSHARED -o /home/lfs/sources/libc-build/math/s_isnan.os -MD -MP -MF /home/lfs/sources/libc-build/math/s_isnan.os.dt -MT /home/lfs/sources/libc-build/math/s_isnan.os ../sysdeps/ieee754/dbl-64/wordsize-64/s_isnan.c:30:1: error: '__EI___isnan' aliased to external symbol '__GI___isnan' make[2]: *** [/home/lfs/sources/libc-build/math/s_isnan.os] Error 1 make[2]: Leaving directory `/home/lfs/sources/glibc-2.16/math' make[1]: *** [math/subdir_lib] Error 2 make[1]: Leaving directory `/home/lfs/sources/glibc-2.16' make: *** [all] Error 2 Attaching s_isnan.i from running this command with -save-temps. BTW, if I make -k, then aside from the inevitable errors from libc.a and libc.so not being built, the only errors I get are in s_isnan.c, s_finite.c, s_isnanf.c, and s_finitef.c. And then later, in the others stage, fraiseexcpt.c.