Subject: bug#7698: aclocal generates too strict a check for name-lister

From: Peter Rosin <[email-masked]>
Date: Wed, 22 Dec 2010 01:55:59 +0100

Den 2010-12-21 14:36 skrev Stefano Lattarini:
> Hello Ximin
> 
> [I hope this will work; I'm answering by cut & pasting from the
>  debbugs web interface, since the bug report didn't make it to me
>  through mail.]
> 
>> 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, and once in aclocal.m4, so
>> the source seems to be automake's aclocal program.
>>
> There's a misunderstanding here.  While aclocal indeed generates aclocal.m4,
> it does so by copying macro definitions provided either by automake or by
> third-parts packages.

FWIW, It smells exactly like a bug that was fixed in libtool 2.2.8 related
to this NEWS entry:

  - Fix 2.1b regression that caused nm to not be the default name lister.
    The regression affected mainly (arguably broken) cross compiles.

Cheers,
Peter