bug-libtool
[Top][All Lists]
Advanced

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

LT_PATH_NM uses too strict a check


From: Ximin Luo
Subject: LT_PATH_NM uses too strict a check
Date: Tue, 21 Dec 2010 22:31:17 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101030 Icedove/3.0.10

I have a core2 system, and have been trying to compile GMP 5.0.1 optimised for
other x86 CPUs, by doing (e.g.)

$ ./configure --host=pentium4-$(./config.guess | cut -d- -f2-)

However, these fail with an obscure error message about `link -dump -symbols`
(see snippet 1). After a convoluted path of debugging, I've worked out that the
cause is ./configure not detecting the presence of "/usr/bin/nm -B", in the
case where $build != $host.

The responsible code is the following snippet:
  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then

which occurs twice in GMP 5.0.1's ./configure, the ultimate source being the
LT_PATH_NM macro from libtool.m4. If you remove all occurrences of the second
test, the build works fine.

(I have some test code at [1]. Removing the WORKAROUND on line 232 will cause
builds such as `./build-all-multi.sh pentium4` to fail when run on a core2.)

I don't know much about how libtool works, but it seems to me that the check is
too strict - nm shouldn't change with the CPU. If really necessary, maybe only
the last part of $build/$host could be matched instead?

Ximin

[1]
https://github.com/freenet/contrib-staging/blob/master/NativeBigInteger/build-all-multi.sh

----> snippet 1 <----

checking if globals are prefixed by underscore... link: invalid option -- 'd'
Try `link --help' for more information.
unknown
configure: WARNING: +----------------------------------------------------------
configure: WARNING: | Cannot determine global symbol prefix.
configure: WARNING: | link -dump -symbols output doesn't contain a global data
symbol.
configure: WARNING: | Will proceed with no underscore.
configure: WARNING: | If this is wrong then you'll get link errors referring
configure: WARNING: | to ___gmpn_add_n (note three underscores).
configure: WARNING: | In this case do a fresh build with an override,
configure: WARNING: |     ./configure gmp_cv_asm_underscore=yes
configure: WARNING: +----------------------------------------------------------
checking how to switch to read-only data section...     .section        .rodata
checking for assembler .type directive... .type $1, <at> $2
checking for assembler .size directive... .size $1,$2
checking for assembler local label prefix... configure: WARNING: "link -dump
-symbols" failure
configure: WARNING: cannot determine local label, using default L
L
checking for assembler byte directive... .byte
checking how to define a 32-bit word... link: invalid option -- 'd'
Try `link --help' for more information.
link: invalid option -- 'd'
Try `link --help' for more information.
configure: error: cannot determine how to define a 32-bit word

Failed to configure for libjbigi-linux-pentium4; maybe it isn't supported on
your build environment.

Error building libjbigi-linux-pentium4!

-- 
GPG: 4096R/5FBBDBCE



reply via email to

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