GNU bug report logs -
#14911
automake-1.14 t/ccnoco-lt failure on OS X
Previous Next
Full log
Message #18 received at 14911 <at> debbugs.gnu.org (full text, mbox):
On 7/21/2013 11:49 AM, Stefano Lattarini wrote:
> tags 14911 + patch
> severity 14911 minor
> thanks
>
> On 07/19/2013 10:24 PM, Nick Bowler wrote:
>> On 2013-07-19 11:48 -0400, Hanspeter Niederstrasser wrote:
>>> On OS X 10.7, t/ccnoco-lt fails with the following error (from
>>> test-suite.log). For completeness sake, t/depcomp2 also failed, but I
>>> applied the patch from #14706 and that allowed depcomp2 to pass.
>>>
>>> ------- 8< ------- 8< ------- 8< -------
>>>
>>> FAIL: t/ccnoco-lt
>>> =================
>> [...]
>>> libtool: link:
>>> /sw/build.build/automake1.14-1.14-1/automake-1.14/t/ccnoco-lt.dir/compile /sw/build.build/automake1.14-1.14-1/automake-1.14/t/ax/cc-no-c-o
>>> -dynamiclib -Wl,-undefined -Wl,dynamic_lookup -o .libs/libwish.0.dylib
>>> .libs/libwish.o -L/sw/lib -O2 -install_name
>>> /usr/local/lib/libwish.0.dylib -compatibility_version 1 -current_version
>>> 1.0 -Wl,-single_module
>>> /sw/build.build/automake1.14-1.14-1/automake-1.14/t/ax/cc-no-c-o: both
>>> '-o' and '-c' seen on the command line
>>> make: *** [libwish.la] Error 2
>>
>> Looks like a false negative to me.
>>
>> Automake uses a deliberately-crippled compiler wrapper which is designed
>> to reject command-lines with -c and -o for testing purposes, found in
>> automake/t/ax/cc-no-c-o. The problem appears to be that the wrapper's
>> test of the command line arguments is too simplistic, and incorrectly
>> considers the above command line as a using both -c and -o, when it
>> clearly does not.
>>
>> So the test will need to be made more robust.
>>
> Agreed. Could anybody test the patch below?
>
> Thanks,
> Stefano
>
> ---- 8< --- 8< ---- 8< --- 8< ---- 8< --- 8< ---- 8< --- 8< ----
>
> From 4d7dcafc0f419378cd80e46f9390950c6fbaffa0 Mon Sep 17 00:00:00 2001
> Message-Id: <4d7dcafc0f419378cd80e46f9390950c6fbaffa0.1374421729.git.stefano.lattarini <at> gmail.com>
> From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
> Date: Sun, 21 Jul 2013 13:46:48 +0100
> Subject: [PATCH] test: avoid false positives in 'cc-no-c-o' script
>
> Fixes automake bug#14991.
>
> * t/ax/cc-no-c-o.in: Be more careful in determining whether both the
> '-c' and '-o' options have been passed on the command line to the
> compiler. In particular, do not spuriously complain in the face of
> options like '-compatibility_version' or '-current_version' (seen on
> Mac OS X 10.7).
> * THANKS: Update.
>
> Signed-off-by: Stefano Lattarini <stefano.lattarini <at> gmail.com>
> ---
> THANKS | 1 +
> t/ax/cc-no-c-o.in | 20 ++++++++++++++++----
> 2 files changed, 17 insertions(+), 4 deletions(-)
>
> diff --git a/THANKS b/THANKS
> index b708943..1482da2 100644
> --- a/THANKS
> +++ b/THANKS
> @@ -145,6 +145,7 @@ Gwenole Beauchesne gbeauchesne <at> mandrakesoft.com
> H.J. Lu hjl <at> lucon.org
> H.Merijn Brand h.m.brand <at> hccnet.nl
> Hans Ulrich Niedermann hun <at> n-dimensional.de
> +Hanspeter Niederstrasser fink <at> snaggledworks.com
> Harald Dunkel harald <at> CoWare.com
> Harlan Stenn Harlan.Stenn <at> pfcs.com
> He Li tippa000 <at> yahoo.com
> diff --git a/t/ax/cc-no-c-o.in b/t/ax/cc-no-c-o.in
> index c18f9b9..bbc9ec9 100644
> --- a/t/ax/cc-no-c-o.in
> +++ b/t/ax/cc-no-c-o.in
> @@ -19,11 +19,23 @@
>
> am_CC=${AM_TESTSUITE_GNU_CC-'@GNU_CC@'}
>
> -case " $* " in
> - *\ -c*\ -o* | *\ -o*\ -c*)
> +seen_c=false
> +seen_o=false
> +
> +for arg
> +do
> + case $arg in
> + -c)
> + seen_c=true;;
> + # It is acceptable not to leave a space between the '-o' option
> + # and its argument, so we have to cater for that.
> + -o|-o*)
> + seen_o=true;;
> + esac
> + if $seen_c && $seen_o; then
> echo "$0: both '-o' and '-c' seen on the command line" >&2
> exit 2
> - ;;
> -esac
> + fi
> +done
>
> exec $am_CC "$@"
This patch allowed t/ccnoco-lt to PASS. One nit: It is for bug#14911,
not bug#14991 as mentioned in the comment.
Thank you for the quick solution.
Hanspeter
This bug report was last modified 10 years and 155 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.