Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 87249 - [glibc/tests] glibc-2.3.4.20041102-r1 fails math/test-ifloat
Summary: [glibc/tests] glibc-2.3.4.20041102-r1 fails math/test-ifloat
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
: 59558 99785 101071 102699 108381 118164 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-03-30 04:01 UTC by Lars Strojny
Modified: 2006-09-11 01:51 UTC (History)
10 users (show)

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


Attachments
Add '-fno-PIE' to the compilation of test-float.c and test-ifloat.c (glibc-2.3.5-hardtest.patch,873 bytes, patch)
2005-10-01 13:20 UTC, Kevin F. Quinn (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Strojny 2005-03-30 04:01:57 UTC
$ emerge glibc
[...]
86-pc-linux-gnu-nptl/nss:/var/tmp/portage/glibc-2.3.4.20041102-r1/work/build-default-i686-pc-linux-gnu-nptl/nis:/var/tmp/portage/glibc-2.3.4.20041102-r1/work/build-default-i686-pc-linux-gnu-nptl/rt:/var/tmp/portage/glibc-2.3.4.20041102-r1/work/build-default-i686-pc-linux-gnu-nptl/resolv:/var/tmp/portage/glibc-2.3.4.20041102-r1/work/build-default-i686-pc-linux-gnu-nptl/crypt:/var/tmp/portage/glibc-2.3.4.20041102-r1/work/build-default-i686-pc-linux-gnu-nptl/nptl /var/tmp/portage/glibc-2.3.4.20041102-r1/work/build-default-i686-pc-linux-gnu-nptl/math/test-ifloat  > /var/tmp/portage/glibc-2.3.4.20041102-r1/work/build-default-i686-pc-linux-gnu-nptl/math/test-ifloat.out
make[2]: *** [/var/tmp/portage/glibc-2.3.4.20041102-r1/work/build-default-i686-pc-linux-gnu-nptl/math/test-ifloat.out] Error 1
make[2]: Leaving directory `/var/tmp/portage/glibc-2.3.4.20041102-r1/work/glibc-2.3.3/math'
make[1]: *** [math/tests] Error 2
make[1]: Leaving directory `/var/tmp/portage/glibc-2.3.4.20041102-r1/work/glibc-2.3.3'
make: *** [check] Error 2

!!! ERROR: sys-libs/glibc-2.3.4.20041102-r1 failed.
!!! Function src_test, Line 756, Exitcode 2
!!! make check failed :(
!!! If you need support, post the topmost build error, NOT this status message.

$ emerge info
Portage 2.0.51.19 (default-linux/x86/2004.3, gcc-3.3.5, glibc-2.3.4.20041102-r0, 2.6.10-as3-adorno i686)
=================================================================
System uname: 2.6.10-as3-adorno i686 Pentium III (Katmai)
Gentoo Base System version 1.6.10
Python:              dev-lang/python-2.3.4-r1 [2.3.4 (#1, Feb 11 2005, 05:40:28)]
dev-lang/python:     2.3.4-r1
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.8.5-r3, 1.6.3, 1.7.9-r1, 1.4_p6, 1.9.4, 1.5
sys-devel/binutils:  2.15.92.0.2-r1
sys-devel/libtool:   1.5.10-r4
virtual/os-headers:  2.6.8.1-r1, 2.6.8.1-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -mcpu=i686 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/alias /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS=""
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache collision-protect distlocks maketest sandbox severe sfperms strict test userpriv usersandbox"
GENTOO_MIRRORS="ftp:///ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://ftp.easynet.nl/mirror/gentoo/"
LANG="de_DE.utf-8"
LC_ALL="de_de.UTF-8"
MAKEOPTS="-s"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/mnt/portage/overlay-portage /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 aac acl apache2 audiofile bash-completion bitmap bzlib calendar cpdflib crypt exif flac ftp gd gd-external gif gpgme hardened iconv icq imap ipv6 ithreads jpeg ldap mad makecheck mbox mikmod mysql ncurses nls nntp nogcj nptl nptlonly oggvorbis pam pcre pdflib pic pie png postgres python samba session sharedmem simplexml skey smtp sockets sqlite ssl suexec threads tiff truetype unicode userlocales vhosts xfs xml xml2 xmlrpc zlib"
Unset:  ASFLAGS, CBUILD, CTARGET, LDFLAGS
Comment 1 Slowking Man 2005-05-13 19:48:44 UTC
Fails for me too, same version on Gentoo Hardened.

gcc --print-file-name=crtbegin.o` /var/tmp/portage/glibc-2.3.4.20041102-r1/work/build-default-i686-pc-linux-gnu-nptl/math/test-ifloat.o /var/tmp/portage/glibc-2.3.4.20041102-r1/work/build-default-i686-pc-linux-gnu-nptl/math/libm.so.6  -Wl,-rpath-link=/var/tmp/portage/glibc-2.3.4.20041102-r1/work/build-default-i686-pc-linux-gnu-nptl:/var/tmp/portage/glibc-2.3.4.20041102-r1/work/build-default-i686-pc-linux-gnu-nptl/math:/var/tmp/portage/glibc-2.3.4.20041102-r1/work/build-default-i686-pc-linux-gnu-nptl/elf:/var/tmp/portage/glibc-2.3.4.20041102-r1/work/build-default-i686-pc-linux-gnu-nptl/dlfcn:/var/tmp/portage/glibc-2.3.4.20041102-r1/work/build-default-i686-pc-linux-gnu-nptl/nss:/var/tmp/portage/glibc-2.3.4.20041102-r1/work/build-default-i686-pc-linux-gnu-nptl/nis:/var/tmp/portage/glibc-2.3.4.20041102-r1/work/build-default-i686-pc-linux-gnu-nptl/rt:/var/tmp/portage/glibc-2.3.4.20041102-r1/work/build-default-i686-pc-linux-gnu-nptl/resolv:/var/tmp/portage/glibc-2.3.4.20041102-r1/work/build-default-i686-pc-linux-gnu-nptl/crypt:/var/tmp/portage/glibc-2.3.4.20041102-r1/work/build-default-i686-pc-linux-gnu-nptl/nptl /var/tmp/portage/glibc-2.3.4.20041102-r1/work/build-default-i686-pc-linux-gnu-nptl/libc.so.6 /var/tmp/portage/glibc-2.3.4.20041102-r1/work/build-default-i686-pc-linux-gnu-nptl/libc_nonshared.a -lgcc -lgcc_eh `i686-pc-linux-gnu-gcc --print-file-name=crtend.o` /var/tmp/portage/glibc-2.3.4.20041102-r1/work/build-default-i686-pc-linux-gnu-nptl/csu/crtn.o
GCONV_PATH=/var/tmp/portage/glibc-2.3.4.20041102-r1/work/build-default-i686-pc-linux-gnu-nptl/iconvdata LC_ALL=C   /var/tmp/portage/glibc-2.3.4.20041102-r1/work/build-default-i686-pc-linux-gnu-nptl/elf/ld-linux.so.2 --library-path /var/tmp/portage/glibc-2.3.4.20041102-r1/work/build-default-i686-pc-linux-gnu-nptl:/var/tmp/portage/glibc-2.3.4.20041102-r1/work/build-default-i686-pc-linux-gnu-nptl/math:/var/tmp/portage/glibc-2.3.4.20041102-r1/work/build-default-i686-pc-linux-gnu-nptl/elf:/var/tmp/portage/glibc-2.3.4.20041102-r1/work/build-default-i686-pc-linux-gnu-nptl/dlfcn:/var/tmp/portage/glibc-2.3.4.20041102-r1/work/build-default-i686-pc-linux-gnu-nptl/nss:/var/tmp/portage/glibc-2.3.4.20041102-r1/work/build-default-i686-pc-linux-gnu-nptl/nis:/var/tmp/portage/glibc-2.3.4.20041102-r1/work/build-default-i686-pc-linux-gnu-nptl/rt:/var/tmp/portage/glibc-2.3.4.20041102-r1/work/build-default-i686-pc-linux-gnu-nptl/resolv:/var/tmp/portage/glibc-2.3.4.20041102-r1/work/build-default-i686-pc-linux-gnu-nptl/crypt:/var/tmp/portage/glibc-2.3.4.20041102-r1/work/build-default-i686-pc-linux-gnu-nptl/nptl /var/tmp/portage/glibc-2.3.4.20041102-r1/work/build-default-i686-pc-linux-gnu-nptl/math/test-ifloat  > /var/tmp/portage/glibc-2.3.4.20041102-r1/work/build-default-i686-pc-linux-gnu-nptl/math/test-ifloat.out
make[2]: *** [/var/tmp/portage/glibc-2.3.4.20041102-r1/work/build-default-i686-pc-linux-gnu-nptl/math/test-ifloat.out] Error 1
make[2]: Leaving directory `/var/tmp/portage/glibc-2.3.4.20041102-r1/work/glibc-2.3.3/math'
make[1]: *** [math/tests] Error 2
make[1]: Leaving directory `/var/tmp/portage/glibc-2.3.4.20041102-r1/work/glibc-2.3.3'
make: *** [check] Error 2

!!! ERROR: sys-libs/glibc-2.3.4.20041102-r1 failed.
!!! Function src_test, Line 760, Exitcode 2
!!! make check failed :(
!!! If you need support, post the topmost build error, NOT this status message.

emerge --info --verbose:

Portage 2.0.51.19 (hardened/x86/2.6, gcc-3.3.5-20050130, glibc-2.3.4.20041102-r1, 2.6.11-hardened-r1 i686)
=================================================================
System uname: 2.6.11-hardened-r1 i686 Intel(R) Pentium(R) 4 CPU 2.53GHz
Gentoo Base System version 1.4.16
Python:              dev-lang/python-2.3.5 [2.3.5 (#1, May 11 2005, 18:37:00)]
dev-lang/python:     2.3.5
sys-apps/sandbox:    [Not Present]
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.8.5-r3, 1.5, 1.7.9-r1, 1.6.3, 1.4_p6, 1.9.5
sys-devel/binutils:  2.15.92.0.2-r7
sys-devel/libtool:   1.5.16
virtual/os-headers:  2.6.8.1-r2
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE=""
ARCH="x86"
AUTOCLEAN="yes"
BASH_ENV="/etc/spork/is/not/valid/profile.env"
CFLAGS="-O2 -march=i686 -pipe"
CHOST="i686-pc-linux-gnu"
CLASSPATH="."
CLEAN_DELAY="5"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CVS_RSH="ssh"
CXXFLAGS="-O2 -march=i686 -pipe"
DISPLAY=":0.0"
DISTDIR="/usr/portage/distfiles"
EDITOR="/usr/bin/vim"
ELIBC="glibc"
FEATURES="autoaddcvs autoconfig ccache collision-protect distlocks sandbox sfperms strict test userpriv"
FETCHCOMMAND="/usr/bin/wget -t 5 --passive-ftp -P ${DISTDIR} ${URI}"
GCC_SPECS=""
GDK_USE_XFT="1"
GENTOO_MIRRORS="http://gentoo.osuosl.org/ ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo http://csociety-ftp.ecn.purdue.edu/pub/gentoo/ ftp://csociety-ftp.ecn.purdue.edu/pub/gentoo/ ftp://mirror.iawnet.sandia.gov/pub/gentoo/ ftp://ftp.ussg.iu.edu/pub/linux/gentoo http://gentoo.seren.com/gentoo http://gentoo.chem.wisc.edu/gentoo/ ftp://gentoo.chem.wisc.edu/gentoo/ http://cudlug.cudenver.edu/gentoo/ ftp://cudlug.cudenver.edu/pub/mirrors/distributions/gentoo/ http://gentoo.ccccom.com ftp://gentoo.ccccom.com http://gentoo.mirrors.tds.net/gentoo ftp://gentoo.mirrors.tds.net/gentoo http://gentoo.netnitco.net ftp://gentoo.netnitco.net/pub/mirrors/gentoo/source/ http://mirror.espri.arizona.edu/gentoo/ http://mirror.clarkson.edu/pub/distributions/gentoo/ http://mirrors.acm.cs.rpi.edu/gentoo/ ftp://ftp.ndlug.nd.edu/pub/gentoo/ http://open-systems.ufl.edu/mirrors/gentoo http://gentoo.llarian.net/ ftp://gentoo.llarian.net/pub/gentoo http://gentoo.binarycompass.org http://mirror.datapipe.net/gentoo http://mirror.datapipe.net/gentoo http://gentoo.eliteitminds.com http://gentoo.cs.lewisu.edu/gentoo/ ftp://linux.cs.lewisu.edu/gentoo/ http://prometheus.cs.wmich.edu/gentoo http://modzer0.cs.uaf.edu/public/gentoo/ http://mirror.usu.edu/mirrors/gentoo/ ftp://mirror.usu.edu/mirrors/gentoo/ http://lug.mtu.edu/gentoo http://mirror.phy.olemiss.edu/mirror/gentoo"
GRP_STAGE23_USE="x86 berkdb crypt readline nls ssl tcpd zlib pam pic  hardened dlloader"
G_BROKEN_FILENAMES="1"
HOME="/root"
HOSTNAME="hal"
INFODIR="/usr/share/info"
INFOPATH="/usr/share/info:/usr/share/binutils-data/i686-pc-linux-gnu/2.15.92.0.2/info:/usr/share/gcc-data/i686-pc-linux-gnu/3.3.5-20050130/info:/usr/share/info/emacs-21"
INPUTRC="/etc/inputrc"
JAVAC="/opt/sun-jdk-1.4.2.08/bin/javac"
JAVA_HOME="/opt/sun-jdk-1.4.2.08"
JDK_HOME="/opt/sun-jdk-1.4.2.08"
KERNEL="linux"
LANG="en_US.utf8"
LC_ALL="en_US.utf8"
LESS="-R"
LESSOPEN="|lesspipe.sh %s"
LOGNAME="root"
MAKEOPTS="-j2"
MANPATH="/usr/share/man:/usr/local/share/man:/usr/share/binutils-data/i686-pc-linux-gnu/2.15.92.0.2/man:/usr/share/gcc-data/i686-pc-linux-gnu/3.3.5-20050130/man::/opt/sun-jdk-1.4.2.08/man"
MOZILLA_FIVE_HOME="/usr/lib/mozilla"
NOCOLOR="false"
OLDPWD="/root"
OPENGL_PROFILE="xorg-x11"
PAGER="/usr/bin/less"
PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/3.3.5-20050130:/usr/i386-pc-linux-gnu/gcc-bin/3.3.5:/opt/sun-jdk-1.4.2.08/bin:/opt/sun-jdk-1.4.2.08/jre/bin:/opt/sun-jdk-1.4.2.08/jre/javaws"
PKGDIR="/usr/portage//packages/x86/"
PORTAGE_ARCHLIST="alpha amd64 arm hppa ia64 m68k mips ppc ppc64 ppc-macos ppc-od s390 sh sparc x86 x86-fbsd x86-obsd x86-od"
PORTAGE_BINHOST_CHUNKSIZE="3000"
PORTAGE_CALLER="emerge"
PORTAGE_GID="250"
PORTAGE_MASTER_PID="4299"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage/"
PRELINK_PATH=""
PRELINK_PATH_MASK="/usr/lib/gstreamer-0.8:/usr/lib/wine:/usr/lib/valgrind:/opt"
PS1="\[\033[01;31m\]\h \[\033[01;34m\]\W \$ \[\033[00m\]"
PWD="/"
PYTHONDOCS="/usr/share/doc/python-docs-2.3.5/html"
RESUMECOMMAND="/usr/bin/wget -c -t 5 --passive-ftp -P ${DISTDIR} ${URI}"
RPMDIR="/usr/portage/rpm"
RSYNC_RETRIES="3"
RSYNC_TIMEOUT="180"
SHELL="/bin/bash"
SHLVL="1"
STAGE1_USE="hardened pic "
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
TERM="xterm"
USE="3dnow X acl acpi aim apache2 authdaemond avifile bash-completion berkdb bitmap-fonts bzip2 bzlib c++ calendar caps cdr chroot crypt cups curl curlwrappers dlloader doc dv dvd dvdr eds emacs esd evo examples exif extensions fam fbcon firebird flac flash foomaticdb ftp gabber gb gcj gd gdbm gif glut gmp gnome gnustep gnutls gphoto2 gstreamer gtk gtk2 gtkhtml hal hardened hardenedphp howl icq ieee1394 imagemagick imap imlib inline innodb ipv6 ithreads java javascript jikes jpeg junit kerberos krb4 lcms ldap leim libgda libwww lm_sensors mad memlimit mikmod mime ming mmap mmx mng mozilla mozsvg mozxmlterm mp3 mpeg mpi msn mysql mysqli ncurses nls nptl odbc ogg openal opengl oscal oss other_var1 other_var2 pam pcre pda pdflib perl php pic plotutils png portaudio posix ppds python quicktime readline recode sasl scanner sftplogging sharedext sharedmem shorten skey slp smartcard sndfile sockets socks5 spell spl sse ssl svg svga szip tcltk tcpd tetex threads tidy tiff tokenizer truetype truetype-fonts unicode usb userlocales v41 vcd videos vorbis wifi win32codecs wnf wxwindows x86 xml xml2 xmms xosd xprint xv yahoo zlib userland_GNU kernel_linux elibc_glibc"
USER="root"
USERLAND="GNU"
USE_EXPAND="FRITZCAPI_CARDS FCDSL_CARDS VIDEO_CARDS INPUT_DEVICES LINGUAS USERLAND KERNEL ELIBC"
XARGS="xargs -r"
XAUTHORITY="/root/.xauth1pfqYk"
XINITRC="/etc/X11/xinit/xinitrc"
_="/usr/bin/emerge"
Comment 2 Seemant Kulleen (RETIRED) gentoo-dev 2005-09-12 14:32:57 UTC
*** Bug 102699 has been marked as a duplicate of this bug. ***
Comment 3 Kevin F. Quinn (RETIRED) gentoo-dev 2005-09-29 05:32:22 UTC
*** Bug 101071 has been marked as a duplicate of this bug. ***
Comment 4 Kevin F. Quinn (RETIRED) gentoo-dev 2005-09-29 05:33:59 UTC
*** Bug 99785 has been marked as a duplicate of this bug. ***
Comment 5 Kevin F. Quinn (RETIRED) gentoo-dev 2005-09-29 23:10:36 UTC
This failure happens for me with hardened gcc 3.4.4, but not with vanilla gcc 3.4.4.
Comment 6 Kevin F. Quinn (RETIRED) gentoo-dev 2005-09-30 15:12:45 UTC
Puzzled me for a while; discovered that adding '-fno-PIE' worked around the
failure.  It occurred to me that PIE consumes a register, and on
register-starved x86 perhaps this caused data to be flushed out of floating
point registers into memory.  Turned out indeed to be the case for the 'ifloat'
tests which use in-line code.  Adding '-ffloat-store' to the compilation command
forces floats to be written out to memory, thus preventing extra accuracy being
retained 'by accident' (see gcc info).  Adding '-ffloat-store' makes the test
fail consistently, regardless of -fPIE or -fno-PIE (and would also cause
'test-float' to fail as well, for what it's worth).

Upshot is that I think that the test is wrong.  A compound floating point
operation like 'hypotf' can't be expected to retain the kind of accuracy being
tested for.  Anyone care to confirm/refute?
Comment 7 Kevin F. Quinn (RETIRED) gentoo-dev 2005-10-01 08:36:59 UTC
*** Bug 59558 has been marked as a duplicate of this bug. ***
Comment 8 Kevin F. Quinn (RETIRED) gentoo-dev 2005-10-01 13:20:11 UTC
Created attachment 69655 [details, diff]
Add '-fno-PIE' to the compilation of test-float.c and test-ifloat.c

OK; the simplest way to get stuff working the way it does vanilla (and
presumably upstream) is to append '-fno-PIE' to the compilation of test-float.c
and test-ifloat.c - the attached patch does this (and only this).

Further analysis on my system shows the test is a bit pants, and that my
previous worries about -ffloat-store were not relevant.  I checked the
assembler generated for this test, to find that the compiler cunningly works
out the result itself, accurate to 23 bits, and hard-codes it so naturally the
test manages to pass.  Any time the compiler doesn't hard-code it (like when
you specify -fPIE or -ffloat-store, why the optimisation doesn't occur I don't
know) the test fails as the result has accumulated a fair amount of error as
one would expect.  Whether this hard-coding of the result has always been a
problem or not, I don't know.
Comment 9 Kevin F. Quinn (RETIRED) gentoo-dev 2005-10-07 07:57:43 UTC
*** Bug 108381 has been marked as a duplicate of this bug. ***
Comment 10 Kevin F. Quinn (RETIRED) gentoo-dev 2005-10-07 08:02:34 UTC
Just to note; fixing this failure just highlights a failure further down the
line for hardened.  I'm working to resolve all such failures, so don't bother
with the fno-PIE patch (that in particular will probably be fixed elsewhere).
Comment 11 Jakub Moc (RETIRED) gentoo-dev 2006-01-07 05:11:04 UTC
*** Bug 118164 has been marked as a duplicate of this bug. ***
Comment 12 Mike Auty (RETIRED) gentoo-dev 2006-01-07 07:56:33 UTC
Has there been any resolution made on this problem?  This hasn't every previously affected me, but apparently now does.  Since this bug was openned 9 months ago and there is a patch, if there any chance we could apply it until the full fix that Kevin hinted at in comment 10 is complete?  Thanks...
Comment 13 Lars Strojny 2006-09-11 01:51:13 UTC
It's an weird old version. Let's close it.