bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FAIL: test-strtod


From: Dennis Clarke
Subject: Re: FAIL: test-strtod
Date: Wed, 30 Jul 2008 15:17:42 +0000

On Wed, Jul 30, 2008 at 4:26 AM, Eric Blake <address@hidden> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> [re-adding the list, and also adding bug-gnulib, since this particular
> problem is related to gnulib.  For bug-gnulib readers: this is a report of
> test-strtod failure on Solaris 10]
>
> According to Dennis Clarke on 7/29/2008 10:09 PM:
> | whoops
> |
> | builds fine .. and then make check gets ugly :
> |
> | source='test-strtod.c' object='test-strtod.o' libtool=no \
> |         DEPDIR=.deps depmode=none /bin/bash ../build-aux/depcomp \
> |         c99  -I. -I../lib  -I. -I. -I.. -I./.. -I../lib -I./../lib
> | -I/opt/build/dclarke/local/include -D_REENTRANT  -erroff=%all
> | -fsimple=0 -g -m64 -xO1 -Qy -Xa -xbuiltin=%none -xdebugformat=dwarf
> | -xmodel=medium -xnolibmil -xnolibmopt -xregs=no%frameptr -xs
> | -xstrconst -xtarget=opteron -xtemp=/tmp/dclarke -c test-strtod.c
> | c99  -erroff=%all -fsimple=0 -g -m64 -xO1 -Qy -Xa -xbuiltin=%none
> | -xdebugformat=dwarf -xmodel=medium -xnolibmil -xnolibmopt
> | -xregs=no%frameptr -xs -xstrconst -xtarget=opteron -xtemp=/tmp/dclarke
> |   -o test-strtod test-strtod.o libtests.a ../lib/libm4.a libtests.a
> | Undefined                       first referenced
> |  symbol                             in file
> | fabs                                test-strtod.o
>
> Ah.  So it looks like when you turn on all the C99 flags to your compiler,
> that strtod(3) no longer fails the configure test.  But then test-strtod
> fails to link, because it is lacking -lm on the command line.

yep

thus :

$ cc -xc99=all  -erroff=%all -fsimple=0 -g -m64 -xO1 -Qy -Xa
-xbuiltin=%none -xdebugformat=dwarf -xmodel=medium -xnolibmil \
> -xregs=no%frameptr -xs -xstrconst -xtarget=opteron -xtemp=/tmp/dclarke -H -o 
> test-strtod test-strtod.o libtests.a \
> ../lib/libm4.a libtests.a
Undefined                       first referenced
 symbol                             in file
fabs                                test-strtod.o
ld: fatal: Symbol referencing errors. No output written to test-strtod


is fixed with a simple -lm


$ cc -xc99=all  -erroff=%all -fsimple=0 -g -m64 -xO1 -Qy -Xa
-xbuiltin=%none -xdebugformat=dwarf -xmodel=medium -xnolibmil \
> -xregs=no%frameptr -xs -xstrconst -xtarget=opteron -xtemp=/tmp/dclarke -H -o 
> test-strtod test-strtod.o libtests.a \
> ../lib/libm4.a libtests.a -lm

$ file test-strtod
test-strtod: ELF 64-bit LSB executable AMD64 Version 1 [SSE2 SSE FXSR
CMOV FPU], dynamically linked, not stripped
$ ldd test-strtod
        libm.so.2 =>     /lib/64/libm.so.2
        libc.so.1 =>     /lib/64/libc.so.1


>  You're the first person

whee .. lucky me.  :-\

> to report this particular failure of a missing library in the
> test link line; most platforms (including Solaris 10 without the proper
> C99 compliance flags) have already failed the configure test, such that
> POW_LIB is defined as -lm when needed, or provide fabs as part of libc
> instead of libm.
>
> Somehow, the test needs to be made more robust; we either need more m4
> magic to determine if -lm is necessary for fabs, or a gnulib replacement
> for fabs that works without requiring libm, or a way to rewrite that test
> to not need fabs.  In the meantime, feel free to manually add -lm to the
> link line for that particular test program.

did that ... but don't know what to do with it.

In reality I need a stable release grade package and 1.5.89a.31-d9538d
is not it. I'll go back to looking at m4-1.4.11 and see what there is
that I can do to get it to pass its testsuite on Solaris 10.  Perhaps
gl_cv_func_strtod_works=no is the only way to go.

Which feels like a hack somehow.

Maybe I need to think about this and see what the *real* issue is with
libc and then see if that can be fixed. Not a small task.

Dennis




reply via email to

[Prev in Thread] Current Thread [Next in Thread]