Glibc-2.3.3 Ch. 6 make check errors - math & dlfcn

Jan Mattila jan.mattila at helsinki.fi
Sun Aug 8 03:57:49 PDT 2004


Hello.


I'm running a:

# cat /proc/cpuinfo 
processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 5
model           : 13
model name      : AMD-K6(tm)-III Processor
stepping        : 4
cpu MHz         : 501.155
cache size      : 128 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu vme de pse tsc msr mce cx8 pge mmx syscall 3dnowext
3dnow k6_mtrr
bogomips        : 999.42

And I got three math test errors (test-ldouble, test-ildoubl
and test-ifloat) in Ch. 6 Glibc-2.3.3 build, but from reading 
the archives that should be ok. Am I right? I've pasted the
contents of the .out files in the end of this message, just
in case they help someone.

Figuring that I was safe I continued with the make checks
and then ran into a dlfcn error:

gcc -nostdlib -nostartfiles -o /src/builds/glibc-final/dlfcn/default 
-Wl,-dynamic-linker=/lib/ld-linux.so.2  -rdynamic -Wl,-z,combreloc
/src/builds/glibc-final/csu/crt1.o /src/builds/glibc-final/csu/crti.o `gcc
--print-file-name=crtbegin.o` /src/builds/glibc-final/dlfcn/default.o
/src/builds/glibc-final/dlfcn/libdl.so.2
/src/builds/glibc-final/dlfcn/defaultmod1.so
/src/builds/glibc-final/dlfcn/defaultmod2.so 
-Wl,-rpath-link=/src/builds/glibc-final:/src/builds/glibc-final/math:/src/builds/glibc-final/elf:/src/builds/glibc-final/dlfcn:/src/builds/glibc-final/nss:/src/builds/glibc-final/nis:/src/builds/glibc-final/rt:/src/builds/glibc-final/resolv:/src/builds/glibc-final/crypt:/src/builds/glibc-final/linuxthreads
/src/builds/glibc-final/libc.so.6 /src/builds/glibc-final/libc_nonshared.a
-lgcc -lgcc_eh `gcc --print-file-name=crtend.o`
/src/builds/glibc-final/csu/crtn.o
GCONV_PATH=/src/builds/glibc-final/iconvdata LC_ALL=C  
/src/builds/glibc-final/elf/ld-linux.so.2 --library-path
/src/builds/glibc-final:/src/builds/glibc-final/math:/src/builds/glibc-final/elf:/src/builds/glibc-final/dlfcn:/src/builds/glibc-final/nss:/src/builds/glibc-final/nis:/src/builds/glibc-final/rt:/src/builds/glibc-final/resolv:/src/builds/glibc-final/crypt:/src/builds/glibc-final/linuxthreads
/src/builds/glibc-final/dlfcn/default  >
/src/builds/glibc-final/dlfcn/default.out
make[2]: *** [/src/builds/glibc-final/dlfcn/default.out] Error 1
make[2]: Leaving directory `/src/g/glibc-2.3.3/dlfcn'
make[1]: *** [dlfcn/tests] Error 2
make[1]: Leaving directory `/src/g/glibc-2.3.3'
make: *** [check] Error 2

But reading the default.out I see no errors:

# cat /mnt/hlfs/src/builds/glibc-final/dlfcn/default.out 
default.c: dladdr returned '' as dli_fname
default.c: main correctly found
default.c: found_in_mod1 correctly found
default.c: found_in_mod2 correctly found
defaultmod1.c: main correctly found
defaultmod1.c: found_in_mod1 correctly found
defaultmod1.c: found_in_mod2 correctly found
defaultmod2.c: main correctly found
defaultmod2.c: found_in_mod1 correctly found
defaultmod2.c: found_in_mod2 correctly found

I've gone by the book at:

http://linuxfromscratch.org/~robert/hlfs/downloads/cvs/hlfs-book-cvs-html-2004-06-07

except for a couple of packages, which I've downloaded
from other locations or for which I've taken a newer
version, since I've thought it wouldn't matter. One
of the packages I got from another location was 
unfortunately Glibc, which I got from:

http://ftp.gnu.org/gnu/glibc/glibc-2.3.3.tar.bz2

I had to add the linuxthreads into that from:

http://ftp.gnu.org/gnu/glibc/glibc-linuxthreads-2.3.3.tar.bz2

and then fix the pt_pax patch, since it wouldn't patch
(the #define PT_GNU_RELRO  wasn't in the elf/elf.h and 
since the pt_pax patch by Robert at:
http://www.linuxfromscratch.org/patches/downloads/glibc/glibc-2.3.3-pt_pax-1.patch
didn't have this as +#define, the patch failed), but other 
than that I've had no major problems with the Glibc until
now.

The other packages used thusfar, which are not by the book:

Tcl-8.4.7
Expect-5.42 (the 5.40.1 patch worked)
Grep 2.5 (2.5.1 not available)
Sed 4.1.1
Perl 5.8.5

Googling I found one post about the dlfcn tests in the 
hlfs-archives:

http://linuxfromscratch.org/pipermail/hlfs-dev/2004-July/001136.html

but the problem gets forgotten due to other things.

I have no CFLAGS or CXXFLAGS.

I have run out ideas. But I'm open to suggestions. 
I also continued with the make checks but just ran into 
more errors, so I thought I'd try to tackle these one 
at a time.


Here are the contents of the math tests that had errors 
(I'm reading them from outside the chroot jail, but I've 
been building inside it):

# cat /mnt/hlfs/src/builds/glibc-final/math/test-ldouble.out 
testing long double (without inline functions)
Failure: Test: atan2 (1.390625, 0.9296875) ==
0.981498387184244311516296577615519772
Result:
 is:          9.81498387184244311561e-01   0xf.b437a72087797d000000p-4
 should be:   9.81498387184244311507e-01   0xf.b437a72087797cf00000p-4
 difference:  5.42101086242752217004e-20   0x8.00000000000000000000p-67
 ulp       :  1.0000
 max.ulp   :  0.0000
Maximal error of `atan2'
 is      : 1 ulp
 accepted: 0 ulp
Failure: Test: tan (0.75) == 0.931596459944072461165202756573936428
Result:
 is:          9.31596459944072461106e-01   0xe.e7d1b0887775f0500000p-4
 should be:   9.31596459944072461160e-01   0xe.e7d1b0887775f0600000p-4
 difference:  5.42101086242752217004e-20   0x8.00000000000000000000p-67
 ulp       :  1.0000
 max.ulp   :  0.0000
Maximal error of `tan'
 is      : 1 ulp
 accepted: 0 ulp
Failure: Test: acosh (7) == 2.63391579384963341725009269461593689
Result:
 is:          2.63391579384963341742e+00   0xa.892138cc021a4e000000p-2
 should be:   2.63391579384963341721e+00   0xa.892138cc021a4df00000p-2
 difference:  2.16840434497100886801e-19   0x8.00000000000000000000p-65
 ulp       :  1.0000
 max.ulp   :  0.0000
Maximal error of `acosh'
 is      : 1 ulp
 accepted: 0 ulp
Failure: Test: sinh (0x8p-32) == 1.86264514923095703232705808926175479e-9
Result:
 is:          1.86264514923095703246e-09   0x8.00000000000000600000p-32
 should be:   1.86264514923095703226e-09   0x8.00000000000000500000p-32
 difference:  2.01948391736579022185e-28   0x8.00000000000000000000p-95
 ulp       :  1.0000
 max.ulp   :  0.0000
Maximal error of `sinh'
 is      : 1 ulp
 accepted: 0 ulp
Failure: Test: log2 (0.75) == -.415037499278843818546261056052183492
Result:
 is:         -4.15037499278843818526e-01  -0xd.47fcb8c0852f0c000000p-5
 should be:  -4.15037499278843818553e-01  -0xd.47fcb8c0852f0c100000p-5
 difference:  2.71050543121376108502e-20   0x8.00000000000000000000p-68
 ulp       :  1.0000
 max.ulp   :  0.0000
Maximal error of `log2'
 is      : 1 ulp
 accepted: 0 ulp
Failure: Test: Imaginary part of: catan (0.75 + 1.25 i) ==
1.10714871779409050301706546017853704 + 0.549306144334054845697622618461262852 i
Result:
 is:          5.49306144334054845734e-01   0x8.c9f53d5681854bc00000p-4
 should be:   5.49306144334054845680e-01   0x8.c9f53d5681854bb00000p-4
 difference:  5.42101086242752217004e-20   0x8.00000000000000000000p-67
 ulp       :  1.0000
 max.ulp   :  0.0000
Maximal error of real part of: catan
 is      : 0 ulp
 accepted: 0 ulp
Maximal error of imaginary part of: catan
 is      : 1 ulp
 accepted: 0 ulp
Failure: Test: Real part of: catanh (-2 - 3 i) ==
-0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i
Result:
 is:         -1.46946666225529752083e-01  -0x9.6792fd6c78e1c4000000p-6
 should be:  -1.46946666225529752042e-01  -0x9.6792fd6c78e1c3d00000p-6
 difference:  4.06575814682064162753e-20   0xc.00000000000000000000p-68
 ulp       :  3.0000
 max.ulp   :  1.0000
Maximal error of real part of: catanh
 is      : 3 ulp
 accepted: 1 ulp
Maximal error of imaginary part of: catanh
 is      : 0 ulp
 accepted: 0 ulp
Failure: Test: Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i
Result:
 is:         -1.19999999999999999972e+02  -0xe.ffffffffffffffc00000p+3
 should be:  -1.20000000000000000000e+02  -0xf.00000000000000000000p+3
 difference:  2.77555756156289135106e-17   0x8.00000000000000000000p-58
 ulp       :  4.0000
 max.ulp   :  2.0000
Failure: Test: Imaginary part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75
+ 1.25 i
Result:
 is:          1.25000000000000000011e+00   0xa.00000000000000100000p-3
 should be:   1.25000000000000000000e+00   0xa.00000000000000000000p-3
 difference:  1.08420217248550443401e-19   0x8.00000000000000000000p-66
 ulp       :  1.0000
 max.ulp   :  0.0000
Maximal error of real part of: cpow
 is      : 6 ulp
 accepted: 763 ulp
Maximal error of imaginary part of: cpow
 is      : 4 ulp
 accepted: 2 ulp

Test suite completed:
  2529 test cases plus 2316 tests for exception flags executed.
  17 errors occurred.


# cat /mnt/hlfs/src/builds/glibc-final/math/test-ildoubl.out 
testing long double (inline functions)
Failure: Test: atan2 (1.390625, 0.9296875) ==
0.981498387184244311516296577615519772
Result:
 is:          9.81498387184244311561e-01   0xf.b437a72087797d000000p-4
 should be:   9.81498387184244311507e-01   0xf.b437a72087797cf00000p-4
 difference:  5.42101086242752217004e-20   0x8.00000000000000000000p-67
 ulp       :  1.0000
 max.ulp   :  0.0000
Maximal error of `atan2'
 is      : 1 ulp
 accepted: 0 ulp
Failure: Test: tan (0.75) == 0.931596459944072461165202756573936428
Result:
 is:          9.31596459944072461106e-01   0xe.e7d1b0887775f0500000p-4
 should be:   9.31596459944072461160e-01   0xe.e7d1b0887775f0600000p-4
 difference:  5.42101086242752217004e-20   0x8.00000000000000000000p-67
 ulp       :  1.0000
 max.ulp   :  0.0000
Maximal error of `tan'
 is      : 1 ulp
 accepted: 0 ulp
Failure: Test: sinh (0x8p-32) == 1.86264514923095703232705808926175479e-9
Result:
 is:          1.86264514923095703246e-09   0x8.00000000000000600000p-32
 should be:   1.86264514923095703226e-09   0x8.00000000000000500000p-32
 difference:  2.01948391736579022185e-28   0x8.00000000000000000000p-95
 ulp       :  1.0000
 max.ulp   :  0.0000
Failure: Test: log2 (0.75) == -.415037499278843818546261056052183492
Result:
 is:         -4.15037499278843818526e-01  -0xd.47fcb8c0852f0c000000p-5
 should be:  -4.15037499278843818553e-01  -0xd.47fcb8c0852f0c100000p-5
 difference:  2.71050543121376108502e-20   0x8.00000000000000000000p-68
 ulp       :  1.0000
 max.ulp   :  0.0000
Maximal error of `log2'
 is      : 1 ulp
 accepted: 0 ulp
Failure: Test: Imaginary part of: catan (0.75 + 1.25 i) ==
1.10714871779409050301706546017853704 + 0.549306144334054845697622618461262852 i
Result:
 is:          5.49306144334054845734e-01   0x8.c9f53d5681854bc00000p-4
 should be:   5.49306144334054845680e-01   0x8.c9f53d5681854bb00000p-4
 difference:  5.42101086242752217004e-20   0x8.00000000000000000000p-67
 ulp       :  1.0000
 max.ulp   :  0.0000
Maximal error of real part of: catan
 is      : 0 ulp
 accepted: 0 ulp
Maximal error of imaginary part of: catan
 is      : 1 ulp
 accepted: 0 ulp
Failure: Test: Real part of: catanh (-2 - 3 i) ==
-0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i
Result:
 is:         -1.46946666225529752083e-01  -0x9.6792fd6c78e1c4000000p-6
 should be:  -1.46946666225529752042e-01  -0x9.6792fd6c78e1c3d00000p-6
 difference:  4.06575814682064162753e-20   0xc.00000000000000000000p-68
 ulp       :  3.0000
 max.ulp   :  1.0000
Maximal error of real part of: catanh
 is      : 3 ulp
 accepted: 1 ulp
Maximal error of imaginary part of: catanh
 is      : 0 ulp
 accepted: 0 ulp
Failure: Test: Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i
Result:
 is:         -1.19999999999999999972e+02  -0xe.ffffffffffffffc00000p+3
 should be:  -1.20000000000000000000e+02  -0xf.00000000000000000000p+3
 difference:  2.77555756156289135106e-17   0x8.00000000000000000000p-58
 ulp       :  4.0000
 max.ulp   :  2.0000
Failure: Test: Imaginary part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75
+ 1.25 i
Result:
 is:          1.25000000000000000011e+00   0xa.00000000000000100000p-3
 should be:   1.25000000000000000000e+00   0xa.00000000000000000000p-3
 difference:  1.08420217248550443401e-19   0x8.00000000000000000000p-66
 ulp       :  1.0000
 max.ulp   :  0.0000
Maximal error of real part of: cpow
 is      : 6 ulp
 accepted: 763 ulp
Maximal error of imaginary part of: cpow
 is      : 4 ulp
 accepted: 2 ulp

Test suite completed:
  2467 test cases plus 2254 tests for exception flags executed.
  14 errors occurred.


# cat /mnt/hlfs/src/builds/glibc-final/math/test-ifloat.out 
testing float (inline functions)
Failure: Test: hypot (0.7, 12.4) == 12.419742348374220601176836866763271
Result:
 is:          1.24197416305541992188e+01   0x1.8d6e8600000000000000p+3
 should be:   1.24197425842285156250e+01   0x1.8d6e8800000000000000p+3
 difference:  9.53674316406250000000e-07   0x1.00000000000000000000p-20
 ulp       :  1.0000
 max.ulp   :  0.0000
Failure: Test: hypot (-0.7, 12.4) == 12.419742348374220601176836866763271
Result:
 is:          1.24197416305541992188e+01   0x1.8d6e8600000000000000p+3
 should be:   1.24197425842285156250e+01   0x1.8d6e8800000000000000p+3
 difference:  9.53674316406250000000e-07   0x1.00000000000000000000p-20
 ulp       :  1.0000
 max.ulp   :  0.0000
Failure: Test: hypot (0.7, -12.4) == 12.419742348374220601176836866763271
Result:
 is:          1.24197416305541992188e+01   0x1.8d6e8600000000000000p+3
 should be:   1.24197425842285156250e+01   0x1.8d6e8800000000000000p+3
 difference:  9.53674316406250000000e-07   0x1.00000000000000000000p-20
 ulp       :  1.0000
 max.ulp   :  0.0000
Failure: Test: hypot (-0.7, -12.4) == 12.419742348374220601176836866763271
Result:
 is:          1.24197416305541992188e+01   0x1.8d6e8600000000000000p+3
 should be:   1.24197425842285156250e+01   0x1.8d6e8800000000000000p+3
 difference:  9.53674316406250000000e-07   0x1.00000000000000000000p-20
 ulp       :  1.0000
 max.ulp   :  0.0000
Failure: Test: hypot (12.4, 0.7) == 12.419742348374220601176836866763271
Result:
 is:          1.24197416305541992188e+01   0x1.8d6e8600000000000000p+3
 should be:   1.24197425842285156250e+01   0x1.8d6e8800000000000000p+3
 difference:  9.53674316406250000000e-07   0x1.00000000000000000000p-20
 ulp       :  1.0000
 max.ulp   :  0.0000
Failure: Test: hypot (-12.4, 0.7) == 12.419742348374220601176836866763271
Result:
 is:          1.24197416305541992188e+01   0x1.8d6e8600000000000000p+3
 should be:   1.24197425842285156250e+01   0x1.8d6e8800000000000000p+3
 difference:  9.53674316406250000000e-07   0x1.00000000000000000000p-20
 ulp       :  1.0000
 max.ulp   :  0.0000
Failure: Test: hypot (12.4, -0.7) == 12.419742348374220601176836866763271
Result:
 is:          1.24197416305541992188e+01   0x1.8d6e8600000000000000p+3
 should be:   1.24197425842285156250e+01   0x1.8d6e8800000000000000p+3
 difference:  9.53674316406250000000e-07   0x1.00000000000000000000p-20
 ulp       :  1.0000
 max.ulp   :  0.0000
Failure: Test: hypot (-12.4, -0.7) == 12.419742348374220601176836866763271
Result:
 is:          1.24197416305541992188e+01   0x1.8d6e8600000000000000p+3
 should be:   1.24197425842285156250e+01   0x1.8d6e8800000000000000p+3
 difference:  9.53674316406250000000e-07   0x1.00000000000000000000p-20
 ulp       :  1.0000
 max.ulp   :  0.0000
Maximal error of `hypot'
 is      : 1 ulp
 accepted: 0 ulp

Test suite completed:
  2448 test cases plus 2243 tests for exception flags executed.
  9 errors occurred.


PaX.
-- 

 Jan Mattila <jan.mattila at helsinki.fi>

 "Finland, Finland, Finland, Finland has it all."
                             - Michael Palin



More information about the hlfs-dev mailing list