GNU bug report logs - #14911
automake-1.14 t/ccnoco-lt failure on OS X

Previous Next

Package: automake;

Reported by: Hanspeter Niederstrasser <fink <at> snaggledworks.com>

Date: Fri, 19 Jul 2013 16:02:02 UTC

Severity: minor

Tags: patch

Done: Stefano Lattarini <stefano.lattarini <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 14911 in the body.
You can then email your comments to 14911 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-automake <at> gnu.org:
bug#14911; Package automake. (Fri, 19 Jul 2013 16:02:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Hanspeter Niederstrasser <fink <at> snaggledworks.com>:
New bug report received and forwarded. Copy sent to bug-automake <at> gnu.org. (Fri, 19 Jul 2013 16:02:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Hanspeter Niederstrasser <fink <at> snaggledworks.com>
To: bug-automake <at> gnu.org
Subject: automake-1.14 t/ccnoco-lt failure on OS X
Date: Fri, 19 Jul 2013 11:48:35 -0400
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
=================

ccnoco-lt: running libtoolize --version
libtoolize (GNU libtool) 2.4.2
Written by Gary V. Vaughan <gary <at> gnu.org>, 2003

Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Running from installcheck: no
Test Protocol: none
PATH = 
/sw/build.build/automake1.14-1.14-1/automake-1.14/t/wrap:/sw/build.build/automake1.14-1.14-1/automake-1.14/t/ax:/sw/var/lib/fink/path-prefix-clang:/sw/lib/perl5/ExtUtils:/sw/bin:/sw/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin
++ pwd
/sw/build.build/automake1.14-1.14-1/automake-1.14/t/ccnoco-lt.dir
+ cat
+ cat
+ cat
+ CC=/sw/build.build/automake1.14-1.14-1/automake-1.14/t/ax/cc-no-c-o
+ export CC
+ libtoolize --verbose --install
libtoolize: putting auxiliary files in `.'.
libtoolize: linking file from `/sw/share/libtool/config/config.guess'
libtoolize: linking file from `/sw/share/libtool/config/config.sub'
libtoolize: `/sw/share/libtool/config/install-sh' is serial 
2011.01.19.21, less than 2011.11.20.07 in `./install-sh'
libtoolize: linking file from `/sw/share/libtool/config/ltmain.sh'
libtoolize: AC_CONFIG_MACRO_DIR not defined, not copying libtool macros.
libtoolize: You should add the contents of the following files to 
`aclocal.m4':
libtoolize:   `/sw/share/aclocal/libtool.m4'
libtoolize:   `/sw/share/aclocal/ltoptions.m4'
libtoolize:   `/sw/share/aclocal/ltversion.m4'
libtoolize:   `/sw/share/aclocal/ltsugar.m4'
libtoolize:   `/sw/share/aclocal/lt~obsolete.m4'
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros 
in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
+ aclocal-1.14 -Werror
+ autoconf
+ automake-1.14 --foreign -Werror -Wall --copy --add-missing
configure.ac:5: installing './ar-lib'
+ for vpath in : false
+ :
+ srcdir=..
+ mkdir build
+ cd build
+ ../configure
rm: conftest.dSYM: is a directory
Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)
Target: x86_64-apple-darwin11.4.2
Thread model: posix
+ cat stdout
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ../install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... 
/sw/build.build/automake1.14-1.14-1/automake-1.14/t/ax/cc-no-c-o
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether 
/sw/build.build/automake1.14-1.14-1/automake-1.14/t/ax/cc-no-c-o accepts 
-g... yes
checking for 
/sw/build.build/automake1.14-1.14-1/automake-1.14/t/ax/cc-no-c-o option 
to accept ISO C89... none needed
checking whether 
/sw/build.build/automake1.14-1.14-1/automake-1.14/t/ax/cc-no-c-o 
understands -c and -o together... no
checking for style of include used by make... GNU
checking dependency style of 
/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... 
gcc3
checking for ar... ar
checking the archiver (ar) interface... ar
checking build system type... x86_64-apple-darwin11.4.2
checking host system type... x86_64-apple-darwin11.4.2
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by 
/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... 
/usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm
checking the name lister (/usr/bin/nm) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 196608
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-apple-darwin11.4.2 file names to 
x86_64-apple-darwin11.4.2 format... func_convert_file_noop
checking how to convert x86_64-apple-darwin11.4.2 file names to 
toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for archiver @FILE support... no
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm output from 
/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 
object... ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking for -force_load linker flag... yes
checking how to run the C preprocessor... 
/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 
-E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if 
/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 
supports -fno-rtti -fno-exceptions... yes
checking for 
/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 
option to produce PIC... -fno-common -DPIC
checking if 
/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 
PIC flag -fno-common -DPIC works... yes
checking if 
/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 
static flag -static works... no
checking if 
/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 
supports -c -o file.o... yes
checking if 
/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 
supports -c -o file.o... (cached) yes
checking whether the 
/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 
linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin11.4.2 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)
Target: x86_64-apple-darwin11.4.2
Thread model: posix
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: executing depfiles commands
config.status: executing libtool commands
+ /usr/bin/grep -E 'understands? -c and -o together.* no$' stdout
checking whether 
/sw/build.build/automake1.14-1.14-1/automake-1.14/t/ax/cc-no-c-o 
understands -c and -o together... no
++ grep '.*-c['\''" ].*-o['\''" ]' stdout
++ /usr/bin/grep -F -v ' -c -o file.o'
++ wc -l
+ test 1 -eq 1
+ grep '^checking if .*/compile .*supports -c -o file\.o\.\.\. yes' stdout
checking if 
/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 
supports -c -o file.o... yes
+ make
/bin/sh ./libtool  --tag=CC   --mode=compile 
/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 
-DPACKAGE_NAME=\"ccnoco-lt\" -DPACKAGE_TARNAME=\"ccnoco-lt\" 
-DPACKAGE_VERSION=\"1.0\" -DPACKAGE_STRING=\"ccnoco-lt\ 1.0\" 
-DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"ccnoco-lt\" 
-DVERSION=\"1.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 
-DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 
-DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 
-DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 
-DLT_OBJDIR=\".libs/\" -I. -I..   -I/sw/include  -g -O2 -MT libwish.lo 
-MD -MP -MF .deps/libwish.Tpo -c -o libwish.lo ../libwish.c
libtool: compile: 
/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 
-DPACKAGE_NAME=\"ccnoco-lt\" -DPACKAGE_TARNAME=\"ccnoco-lt\" 
-DPACKAGE_VERSION=\"1.0\" "-DPACKAGE_STRING=\"ccnoco-lt 1.0\"" 
-DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"ccnoco-lt\" 
-DVERSION=\"1.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 
-DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 
-DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 
-DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 
-DLT_OBJDIR=\".libs/\" -I. -I.. -I/sw/include -g -O2 -MT libwish.lo -MD 
-MP -MF .deps/libwish.Tpo -c ../libwish.c  -fno-common -DPIC -o 
.libs/libwish.o
libtool: compile: 
/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 
-DPACKAGE_NAME=\"ccnoco-lt\" -DPACKAGE_TARNAME=\"ccnoco-lt\" 
-DPACKAGE_VERSION=\"1.0\" "-DPACKAGE_STRING=\"ccnoco-lt 1.0\"" 
-DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"ccnoco-lt\" 
-DVERSION=\"1.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 
-DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 
-DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 
-DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 
-DLT_OBJDIR=\".libs/\" -I. -I.. -I/sw/include -g -O2 -MT libwish.lo -MD 
-MP -MF .deps/libwish.Tpo -c ../libwish.c -o libwish.o >/dev/null 2>&1
mv -f .deps/libwish.Tpo .deps/libwish.Plo
/bin/sh ./libtool  --tag=CC   --mode=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 
 -g -O2  -L/sw/lib -o libwish.la -rpath /usr/local/lib libwish.lo
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
+ am_exit_trap 2
+ exit_status=2
+ set +e
+ cd /sw/build.build/automake1.14-1.14-1/automake-1.14
+ test none = tap
+ case $am_explicit_skips in
+ test 2 -eq 0
+ keep_testdirs=yes
+ am_keeping_testdirs
+ case $keep_testdirs in
+ return 0
+ set +x
ccnoco-lt: exit 2

------- 8< ------- 8< ------- 8< -------

Hanspeter




Information forwarded to bug-automake <at> gnu.org:
bug#14911; Package automake. (Fri, 19 Jul 2013 21:26:01 GMT) Full text and rfc822 format available.

Message #8 received at 14911 <at> debbugs.gnu.org (full text, mbox):

From: Nick Bowler <nbowler <at> elliptictech.com>
To: Hanspeter Niederstrasser <fink <at> snaggledworks.com>
Cc: 14911 <at> debbugs.gnu.org
Subject: Re: bug#14911: automake-1.14 t/ccnoco-lt failure on OS X
Date: Fri, 19 Jul 2013 17:24:58 -0400
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.

Cheers,
-- 
Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/)




Information forwarded to bug-automake <at> gnu.org:
bug#14911; Package automake. (Sun, 21 Jul 2013 15:51:02 GMT) Full text and rfc822 format available.

Message #11 received at 14911 <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: Nick Bowler <nbowler <at> elliptictech.com>
Cc: Hanspeter Niederstrasser <fink <at> snaggledworks.com>, 14911 <at> debbugs.gnu.org,
 "automake-patches <at> gnu.org" <automake-patches <at> gnu.org>
Subject: Re: bug#14911: automake-1.14 t/ccnoco-lt failure on OS X
Date: Sun, 21 Jul 2013 16:49:56 +0100
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 "$@"
-- 
1.8.3.1.605.g85318f5





Added tag(s) patch. Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Sun, 21 Jul 2013 15:51:03 GMT) Full text and rfc822 format available.

Severity set to 'minor' from 'normal' Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Sun, 21 Jul 2013 15:51:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-automake <at> gnu.org:
bug#14911; Package automake. (Mon, 22 Jul 2013 02:36:01 GMT) Full text and rfc822 format available.

Message #18 received at 14911 <at> debbugs.gnu.org (full text, mbox):

From: Hanspeter Niederstrasser <fink <at> snaggledworks.com>
To: Stefano Lattarini <stefano.lattarini <at> gmail.com>
Cc: 14911 <at> debbugs.gnu.org, Nick Bowler <nbowler <at> elliptictech.com>,
 "automake-patches <at> gnu.org" <automake-patches <at> gnu.org>
Subject: Re: bug#14911: automake-1.14 t/ccnoco-lt failure on OS X
Date: Sun, 21 Jul 2013 22:35:08 -0400
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





Information forwarded to bug-automake <at> gnu.org:
bug#14911; Package automake. (Tue, 23 Jul 2013 19:46:02 GMT) Full text and rfc822 format available.

Message #21 received at 14911 <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: Hanspeter Niederstrasser <fink <at> snaggledworks.com>
Cc: 14911 <at> debbugs.gnu.org, Nick Bowler <nbowler <at> elliptictech.com>,
 "automake-patches <at> gnu.org" <automake-patches <at> gnu.org>
Subject: Re: bug#14911: automake-1.14 t/ccnoco-lt failure on OS X
Date: Tue, 23 Jul 2013 20:45:03 +0100
On 07/22/2013 03:35 AM, Hanspeter Niederstrasser wrote:
> On 7/21/2013 11:49 AM, Stefano Lattarini wrote:
>> tags 14911 + patch
>> severity 14911 minor
>> thanks
> 
> This patch allowed t/ccnoco-lt to PASS.
>
Thanks for confirming, will push shortly.

> One nit: It is for bug#14911, not bug#14991 as mentioned
> in the comment.
> 
Good catch!  Will fix that before pushing.

> Thank you for the quick solution.
> 
> Hanspeter
> 

Thanks, and best regards,
  Stefano




bug closed, send any further explanations to 14911 <at> debbugs.gnu.org and Hanspeter Niederstrasser <fink <at> snaggledworks.com> Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Fri, 19 Dec 2014 20:53:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 17 Jan 2015 12:24:03 GMT) Full text and rfc822 format available.

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.