Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 11384 - glibc problems
Summary: glibc problems
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
: 14072 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-11-30 04:14 UTC by Erik Olofsen
Modified: 2003-02-04 19:42 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Erik Olofsen 2002-11-30 04:14:47 UTC
 
Comment 1 SpanKY gentoo-dev 2002-11-30 13:34:24 UTC
please provide some more information as to why it is 'incorrect' 
Comment 2 Erik Olofsen 2002-11-30 13:43:35 UTC
Recently I assembled a PC with an MSI 645E Max-U motherboard and an
Intel 2.4 GHz CPU.  I bootstrapped Gentoo Linux from
"livecd-ut2003-i586-1.4.1" although I booted the system from an 1.3
version because with 1.4.1, the network card didn't work because of
APIC problems.  The bootstrap process was successful; I used
CFLAGS='-march=pentium4 -O3 -pipe" in make.conf.

However, numerical software, using g77, performed incorrectly on rare
occasions.  I installed gcc version 2.95.3, but the problem wasn't
solved.  I tracked it down to the libm library; linking the above
software with a version from a Slackware 8.1 distribution (also with
glibc version 2.2.5) made it yield correct results.

A separate `make' of glibc-2.2.5 failed, maybe because of missing patches.
A `make' of glibc-2.3.1 was successful, but the `make check' failed
at ' ./math/test-double.out' with Error 2.

Probably the compiler generated during the bootstrap isn't able to
produce a correct libm library.
Comment 3 SpanKY gentoo-dev 2002-11-30 13:57:22 UTC
did you try building glibc w/out 'march=pentium4' ? 
maybe instead using 'mcpu=i686' ? 
Comment 4 Erik Olofsen 2002-11-30 14:02:07 UTC
Yes, that is, without any CFLAGS; the 'make check' failed at another stage,
I would have to do that again to be able to report exactly which one.
Comment 5 Martin Schlemmer (RETIRED) gentoo-dev 2002-11-30 14:16:04 UTC
What gcc version ?  3.2 is known to break some optimizations, so try to use
3.2.1 ?
Comment 6 Erik Olofsen 2002-11-30 16:54:11 UTC
I've downloaded gcc-3.2.1 and performed a 'make bootstrap' (so with a possibly
broken gcc 3.2) with default optimization settings and installed it in a local
directory. Using that compiler (by use of the CC variable), with the above
optimization flags (in CFLAGS), I built glibc-2.3.1, and the 'make check' failed
at another stage. It could be that another component, such as the assembler or
the linker is broken. I therefore downloaded binutils-2.13.1 and built them
using the above gcc-3.2.1, and built glibc using these (--with-binutils). Again,
the 'make check' failed, at the same stage. Well, the gcc and binutils were made
on a broken environment and could not recover as yet... (By the way, on the same
computer, using gcc-2.95.3, the 'make check' of glibc-2.2.5 (glibc-2.3.1 was too
new) was successful, so I doubt it has anything to do with the hardware.
The only solution now seems to be bootstrapping the whole system with the newer
compiler?
Comment 7 Martin Schlemmer (RETIRED) gentoo-dev 2002-11-30 17:15:40 UTC
Where does it fail now ?
Comment 8 Erik Olofsen 2002-11-30 18:45:02 UTC
It failed at 'math/test-misc'. To be sure that what I said before was true,
I compiled gcc-3.2.1, binutils-2.13.1 on the same machine under the slackware
distribution, so starting with gcc-2.95.3.
'make check' of glibc-2.3.1 failed at the same stage! But without the
optimization options, the 'make check' passed! Of course, a problem with my
hardware can still not be excluded, and I don't know if the optimization options
I used cause problems on a different machine as well. Is the check performed
when emerge
builds glibc? It appears to be necessary.
Comment 9 Erik Olofsen 2002-12-01 06:48:47 UTC
I did many builds and 'make checks' of glibc-2.3.1,
using gcc-3.2.1 and binutils-2.13.1. Summary:

-march=pentium4 -O3  ->  FAILS
-march=pentium4 -O2  ->  FAILS
-march=pentium4 -O1  ->  FAILS

-march=pentium3 -O3  ->  PASSES
-mcpu=pentium4 -O3   ->  PASSES

-march=pentium4 -mfpmath=i387 -O3  ->  FAILS

When it fails, it is always in `test-misc'; the first failure
in the output file reads 'modf (4.29497e+09, ...) failed'
Comment 10 Martin Schlemmer (RETIRED) gentoo-dev 2002-12-01 07:06:48 UTC
Sounds pretty much like what I suspected.  Thus is why the strip-flags() command
in the ebuild.  3.2.1 fixes a lot of -march=pentium4 issues, but guess not all
of them :(
Comment 11 Erik Olofsen 2002-12-01 07:19:53 UTC
Yes indeed. But if strip-flags() was operational when I
bootstrapped gentoo (on Oct 25) how could I get an
improperly functioning libm?
Comment 12 Martin Schlemmer (RETIRED) gentoo-dev 2002-12-01 08:12:04 UTC
It leaves -march, -mcpu, -O and -pipe.  But -march=pentium4 also broke xfree,
mozilla, etc among things, so I use -march=pentium3 on my P4 box.  We can
have a CFLAGS="${CFLAGS/pentium4/pentium3}" type of thing in glibc, but
problem is if you filter too much, you may miss if it is actually fixed in
gcc.
Comment 13 Erik Olofsen 2002-12-01 08:22:33 UTC
Thank you very much for your comments.
I guess the -march=pentium4 issues are known to the gcc team so that
I don't need to report this?
Would it be an idea to have a configuration option so that the ebuilds
do tests on generated packages when available?
Comment 14 Martin Schlemmer (RETIRED) gentoo-dev 2002-12-01 09:08:02 UTC
I think it will help if you could report it.  To be honest, I have not looked
at the current open bugs at gcc.gnu.org.

If you file it, you can tell them at least that it is an unpatched version of
3.2.1.
Comment 15 Martin Schlemmer (RETIRED) gentoo-dev 2002-12-25 18:30:48 UTC
This should rather be a CANTFIX, but oh well.  Hopefully gcc.gnu.org will
fix related problems, or maybe some dev will start doing gcc hacking :/

Anyhow, try gcc-3.2.1-r1, as it have some updates from cvs and Redhat patches.
Comment 16 SpanKY gentoo-dev 2003-01-17 22:23:05 UTC
*** Bug 14072 has been marked as a duplicate of this bug. ***