libtool-patches
[Top][All Lists]
Advanced

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

Fix darwin fat archive mode test failure


From: Ralf Wildenhues
Subject: Fix darwin fat archive mode test failure
Date: Thu, 16 Sep 2010 22:03:50 +0200
User-agent: Mutt/1.5.20 (2010-08-04)

http://autobuild.josefsson.org/libtool/log-201009131952560019000.txt

The patch below fixes this failure:

../../libtool-master/tests/localization.at:43: (LANG=de_DE LANGUAGE=de_DE 
LC_ALL=de_DE $CC $CPPFLAGS $CFLAGS -c a.c) || exit 1
stderr:
a.c:1: error: size of array 'x' is negative
a.c:1: error: size of array 'x' is negative
lipo: can't figure out the architecture type of: /var/tmp//cc9hpZmr.out
stdout:
../../libtool-master/tests/localization.at:47: (LANG=de_DE LANGUAGE=de_DE 
LC_ALL=de_DE $LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c a.c) || 
exit 1
stderr:
a.c:1: error: size of array 'x' is negative
a.c:1: error: size of array 'x' is negative
lipo: can't figure out the architecture type of: /var/tmp//ccQUXblx.out
stdout:
libtool: compile:  gcc -arch i386 -arch x86_64 -c a.c  -fno-common -DPIC -o 
.libs/a.o
../../libtool-master/tests/localization.at:60: grep locale stdout stderr && 
exit 77
../../libtool-master/tests/localization.at:61: diff expected-stderr 
libtool-stderr
--- /dev/null   2010-09-13 12:29:43.000000000 -0700
+++ /tmp/build-fat/tests/testsuite.dir/at-groups/62/stdout      2010-09-13 
12:29:44.000000000 -0700
@@ -0,0 +1,4 @@
+3c3
+< lipo: can't figure out the architecture type of: /var/tmp//cc9hpZmr.out
+---
+> lipo: can't figure out the architecture type of: /var/tmp//ccQUXblx.out
../../libtool-master/tests/localization.at:61: exit code was 1, expected 0
62. localization.at:24: 62. localized compiler messages (localization.at:24): 
FAILED (localization.at:61)



I think somebody more experienced with darwin needs to look at the other
remaining failure in above log:

../../libtool-master/tests/need_lib_prefix.at:167: $LIBTOOL --mode=link $CC 
$CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT -dlpreopen foo1.la -dlpreopen 
libfoo2.la $LIBLTDL
stderr:
ld: in ./.libs/libfoo1.so, can't link with bundle (MH_BUNDLE) only dylibs 
(MH_DYLIB) for architecture i386
collect2: ld returned 1 exit status
ld: in ./.libs/libfoo1.so, can't link with bundle (MH_BUNDLE) only dylibs 
(MH_DYLIB) for architecture x86_64
collect2: ld returned 1 exit status
lipo: can't open input file: /var/tmp//ccrFxVr6.out (No such file or directory)
stdout:
libtool: link: rm -f .libs/main.nm .libs/main.nmS .libs/main.nmT
libtool: link: (cd .libs && gcc -arch i386 -arch x86_64 -c -fno-builtin 
"mainS.c")
libtool: link: rm -f ".libs/mainS.c" ".libs/main.nm" ".libs/main.nmS" 
".libs/main.nmT"
libtool: link: gcc -arch i386 -arch x86_64 -arch i386 -arch x86_64 -o 
.libs/main main.o .libs/mainS.o  ./.libs/libfoo1.so ./.libs/libfoo2.so 
/tmp/build-fat/libltdl/.libs/dlopen.a 
/tmp/build-fat/tests/../libltdl/.libs/libltdlc.a
../../libtool-master/tests/need_lib_prefix.at:167: exit code was 1, expected 0
84. need_lib_prefix.at:25: 84. enforced lib prefix (need_lib_prefix.at:25): 
FAILED (need_lib_prefix.at:167)


Thanks,
Ralf

    tests: avoid localization failure due to unstable compiler messages.

    * tests/testsuite.at (LT_AT_NORMALIZE_COMPILER_OUTPUT):
    Attempt to normalize temporary file names in error messages.
    Fixes 'localized compiler messages' test failure on Darwin when
    creating fat (multi-ABI) libraries.

diff --git a/tests/testsuite.at b/tests/testsuite.at
index b253980..a63cf64 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -240,10 +240,13 @@ esac])
 # - distcc process numbers,
 # - ccache file location,
 # - newline encoding,
-# - location of the libtool script.
+# - location of the libtool script,
+# - error messages involving unstable temporary file names.
 m4_define([LT_AT_NORMALIZE_COMPILER_OUTPUT],
 [_ltbase=`$ECHO "$LIBTOOL" | sed 's,^.*/,,'`
-[sed "/^distcc\[[0-9]*\]/d; /^$_ltbase: compile/d" < $1 > $1.t]
+[sed "/^distcc\[[0-9]*\]/d
+      /^$_ltbase: compile/d
+      s/\(tmp\/\{1,\}cc\)\([a-zA-Z0-9_]\{1,\}\)/\1-normalized-tmpname/g" < $1 
> $1.t]
 LT_AT_UNIFY_NL([$1.t], [m4_default([$2], [$1])])[]dnl
 ])
 



reply via email to

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