Hi Ralf,

On Sat, 21 Feb 2009, Ralf Wildenhues wrote:

> Hi Tim,
> 
> * Tim Rice wrote on Fri, Feb 20, 2009 at 09:29:40PM CET:
> > 
> > I'm trying to understand the cmdline_wrap.at test.
> > I've added this patch to fix the 2 template tests that were failing
> > on UnixWare 7.1.4
> 
> Can you post the verbose output of the test both without and with the
> patch?  Thanks.
>   gmake check-local TESTSUITEFLAGS='-k "simple template test" -v -d -x'

Sure, attched as x.tst-without-patch & x.tst-with-patch
I've also attached the curent patch I'm using as uw-template.patch
It's just a s/CXX/CC/ of the old one.

> > so now the only failure is the "low max_cmd_len" test.
> 
> OK, cool.
> 
> > I guess I don't really know what cmdline_wrap.at is trying to acomplish.
> > And I'm puzzled why the "simple template test" fails inside cmdline_wrap
> > but not outside of it.
> 
> Well, it tries to simulate a very long command line, so long that its
> expansion by libtool will exceed the kernel command line length limit.
> It does this by setting the limit very low, which libtool internally
> compares against.  So then the wrapping code branches are exercised,
> which create intermediate libraries or objects.
> 
> How long is the actual command line length limit on your system?
> If it is >1MB or unlimited, then this is unlikely to ever be a problem
> in practice, and you can ignore the failure.  But some systems have
> pretty low limits.

On my system it is 131072 but it is a kernel tunable and the default
out of the box is 32k.
 
> The test case tries to re-run all kinds of other tests in our testsuite
> (exactly those that only exercise the $LIBTOOL script), for best
> possible code coverage.
> 
> The output of the failing/passing of the test above may help analyze the
> failure of the cmdline_wrap test.

John Wolfe was looking at this too (using 2.2.6) and here is what
he had to say
--------------------------
I know why test 73 (small command line) test fails on #62 (C++
templates).  

   - one of the link lines (second) linking against a .la, gets
broken up and .o's are collected in a relocatable object using.
 
             /bin/ld -r

     Ergo the problem, the prelink phase is skipped.  It is not a
problem with the archive being built, since $AR can accumulate
object files, 1 file at a time.
     So the CC -Tprelink_objects is accomplished as expected  - just
before the $AR.
     The prelinker command echo can be seen in the log.

     For shared objects, what is needed is to get a CC -Tprelink_objects
done on the libobjs before they are added to the relocatable object.

     The /bin/ld cannot be replaced with $CC since the C++ compiler
driver will link in startup modules also.....  Soon get a multiple
defined symbol.
--------------------------

Thanks.

> 
> Thanks!
> Ralf
> 

-- 
Tim Rice                                Multitalents    (707) 887-1469
[email protected]
--- libltdl/m4/libtool.m4.old   2009-02-18 18:54:38.000000000 -0800
+++ libltdl/m4/libtool.m4       2009-02-22 20:54:26.786787091 -0800
@@ -6219,6 +6219,8 @@
           CC*)
            _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib 
$libobjs $deplibs $compiler_flags'
            _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G 
${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs 
$compiler_flags'
+           _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
+               $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
            ;;
          *)
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib 
$libobjs $deplibs $compiler_flags'
abs_srcdir=`CDPATH="${ZSH_VERSION+.}:" && cd /home2/src/gnu/libtool-2.x && 
pwd`; cd tests; \
CONFIG_SHELL="/bin/ksh" /bin/ksh $abs_srcdir/tests/testsuite \
  MAKE="gmake" CC="cc" CFLAGS="-g" CPP="cc -E" CPPFLAGS="" LD="/usr/bin/ld" 
LDFLAGS="" LIBS="" LN_S="ln -s" NM="/usr/bin/nm -p" RANLIB=":" STRIP="strip" 
lt_INSTALL="/home2/src/gnu/libtool-2.x/libltdl/config/install-sh -c" OBJEXT="o" 
EXEEXT="" SHELL="/bin/ksh" CONFIG_SHELL="/bin/ksh" CXX="CC" CXXFLAGS="-g" 
CXXCPP="CC -E" F77="" FFLAGS="" FC="" FCFLAGS="" GCJ="" GCJFLAGS="-g -O2" 
_lt_pkgdatadir="/home2/src/gnu/libtool-2.x" 
LIBTOOLIZE="/usr/local/src/gnu/libtool-2.x/libtoolize" 
LIBTOOL="/usr/local/src/gnu/libtool-2.x/libtool" 
tst_aclocaldir="/home2/src/gnu/libtool-2.x/libltdl/m4" -k "simple template 
test" -v -d -x
## -------------------------- ##
## libtool 2.2.7a test suite. ##
## -------------------------- ##
73. template.at:27: testing ...
/home2/src/gnu/libtool-2.x/tests/template.at:28: { test -n "$CXX" && test 
"X$CXX" != Xno; } || (exit 77)
+ test -n CC
+ test XCC != Xno
/home2/src/gnu/libtool-2.x/tests/template.at:28: test "X$CXX" != Xg++ || (g++ 
-v >/dev/null 2>&1) || (exit 77)
+ test XCC != Xg++
+ cat
+ 1> aclib.h 0<<
+ cat
+ 1> aclib.cpp 0<<
+ cat
+ 1> alib.h 0<<
+ cat
+ 1> alib.cpp 0<<
+ cat
+ 1> prog.cpp 0<<
/home2/src/gnu/libtool-2.x/tests/template.at:79: $LIBTOOL --tag=CXX 
--mode=compile $CXX -I. $CPPFLAGS $CXXFLAGS -c -o alib.lo alib.cpp
+ /usr/local/src/gnu/libtool-2.x/libtool --tag=CXX --mode=compile CC -I. -g -c 
-o alib.lo alib.cpp
stderr:
stdout:
libtool: compile:  CC -I. -g -c alib.cpp  -KPIC -DPIC -o .libs/alib.o
libtool: compile:  CC -I. -g -c alib.cpp -o alib.o >/dev/null 2>&1
/home2/src/gnu/libtool-2.x/tests/template.at:81: $LIBTOOL --tag=CXX 
--mode=compile $CXX -I. $CPPFLAGS $CXXFLAGS -c -o aclib.lo aclib.cpp
+ /usr/local/src/gnu/libtool-2.x/libtool --tag=CXX --mode=compile CC -I. -g -c 
-o aclib.lo aclib.cpp
stderr:
stdout:
libtool: compile:  CC -I. -g -c aclib.cpp  -KPIC -DPIC -o .libs/aclib.o
libtool: compile:  CC -I. -g -c aclib.cpp -o aclib.o >/dev/null 2>&1
/home2/src/gnu/libtool-2.x/tests/template.at:83: $LIBTOOL --tag=CXX --mode=link 
$CXX $CPPFLAGS $CXXFLAGS $LDFLAGS -o libaclib.la aclib.lo
+ /usr/local/src/gnu/libtool-2.x/libtool --tag=CXX --mode=link CC -g -o 
libaclib.la aclib.lo
stderr:
stdout:
libtool: link: ar cru .libs/libaclib.a .libs/aclib.o 
libtool: link: : .libs/libaclib.a
libtool: link: ( cd ".libs" && rm -f "libaclib.la" && ln -s "../libaclib.la" 
"libaclib.la" )
/home2/src/gnu/libtool-2.x/tests/template.at:85: $LIBTOOL --tag=CXX --mode=link 
$CXX $CPPFLAGS $CXXFLAGS $LDFLAGS -o libalib.la -rpath /nonexistent alib.lo 
libaclib.la
+ /usr/local/src/gnu/libtool-2.x/libtool --tag=CXX --mode=link CC -g -o 
libalib.la -rpath /nonexistent alib.lo libaclib.la
stderr:
prelink: INFO: C++ prelinker: executing: CC  -c  -I.  -g  -KPIC  -DPIC  
-o.libs/alib.o alib.cpp
stdout:
libtool: link: (cd .libs/libalib.lax/libaclib.a && ar x 
"/usr/local/src/gnu/libtool-2.x/tests/testsuite.dir/73/./.libs/libaclib.a")
libtool: link: CC -G -Wl,-h,libalib.so.0 -o .libs/libalib.so.0  .libs/alib.o   
.libs/libalib.lax/libaclib.a/aclib.o     
libtool: link: (cd ".libs" && rm -f "libalib.so" && ln -s "libalib.so.0" 
"libalib.so")
libtool: link: (cd ".libs" && rm -f "libalib.so" && ln -s "libalib.so.0" 
"libalib.so")
libtool: link: (cd .libs/libalib.lax/lt1-libaclib.a && ar x 
"/usr/local/src/gnu/libtool-2.x/tests/testsuite.dir/73/./.libs/libaclib.a")
libtool: link: ar cru .libs/libalib.a  alib.o  
.libs/libalib.lax/lt1-libaclib.a/aclib.o 
libtool: link: : .libs/libalib.a
libtool: link: rm -fr .libs/libalib.lax .libs/libalib.lax
libtool: link: ( cd ".libs" && rm -f "libalib.la" && ln -s "../libalib.la" 
"libalib.la" )
/home2/src/gnu/libtool-2.x/tests/template.at:87: $CXX -I. $CPPFLAGS $CXXFLAGS 
-c prog.cpp
+ CC -I. -g -c prog.cpp
stderr:
stdout:
/home2/src/gnu/libtool-2.x/tests/template.at:89: $LIBTOOL --tag=CXX --mode=link 
$CXX $CPPFLAGS $CXXFLAGS $LDFLAGS -o prog$EXEEXT prog.$OBJEXT libalib.la
+ /usr/local/src/gnu/libtool-2.x/libtool --tag=CXX --mode=link CC -g -o prog 
prog.o libalib.la
stderr:
Undefined                       first referenced
symbol                              in file
cq<T1>(T1) [with T1=int, return type=T1]               ./.libs/libalib.so
UX:ld: ERROR: Symbol referencing errors. No output written to .libs/prog
stdout:
libtool: link: CC -g -o .libs/prog prog.o  ./.libs/libalib.so 
-Wl,-R,/nonexistent
/home2/src/gnu/libtool-2.x/tests/template.at:89: exit code was 1, expected 0
73. template.at:27:  FAILED (template.at:89)

## ------------- ##
## Test results. ##
## ------------- ##

ERROR: 1 test was run,
1 failed unexpectedly.
## -------------------------- ##
## testsuite.log was created. ##
## -------------------------- ##

Please send `tests/testsuite.log' and all information you think might help:

   To: <[email protected]>
   Subject: [libtool 2.2.7a] testsuite: 73 failed

gmake: *** [check-local] Error 1
abs_srcdir=`CDPATH="${ZSH_VERSION+.}:" && cd /home2/src/gnu/libtool-2.x && 
pwd`; cd tests; \
CONFIG_SHELL="/bin/ksh" /bin/ksh $abs_srcdir/tests/testsuite \
  MAKE="gmake" CC="cc" CFLAGS="-g" CPP="cc -E" CPPFLAGS="" LD="/usr/bin/ld" 
LDFLAGS="" LIBS="" LN_S="ln -s" NM="/usr/bin/nm -p" RANLIB=":" STRIP="strip" 
lt_INSTALL="/home2/src/gnu/libtool-2.x/libltdl/config/install-sh -c" OBJEXT="o" 
EXEEXT="" SHELL="/bin/ksh" CONFIG_SHELL="/bin/ksh" CXX="CC" CXXFLAGS="-g" 
CXXCPP="CC -E" F77="" FFLAGS="" FC="" FCFLAGS="" GCJ="" GCJFLAGS="-g -O2" 
_lt_pkgdatadir="/home2/src/gnu/libtool-2.x" 
LIBTOOLIZE="/usr/local/src/gnu/libtool-2.x/libtoolize" 
LIBTOOL="/usr/local/src/gnu/libtool-2.x/libtool" 
tst_aclocaldir="/home2/src/gnu/libtool-2.x/libltdl/m4" -k "simple template 
test" -v -d -x
## -------------------------- ##
## libtool 2.2.7a test suite. ##
## -------------------------- ##
73. template.at:27: testing ...
/home2/src/gnu/libtool-2.x/tests/template.at:28: { test -n "$CXX" && test 
"X$CXX" != Xno; } || (exit 77)
+ test -n CC
+ test XCC != Xno
/home2/src/gnu/libtool-2.x/tests/template.at:28: test "X$CXX" != Xg++ || (g++ 
-v >/dev/null 2>&1) || (exit 77)
+ test XCC != Xg++
+ cat
+ 1> aclib.h 0<<
+ cat
+ 1> aclib.cpp 0<<
+ cat
+ 1> alib.h 0<<
+ cat
+ 1> alib.cpp 0<<
+ cat
+ 1> prog.cpp 0<<
/home2/src/gnu/libtool-2.x/tests/template.at:79: $LIBTOOL --tag=CXX 
--mode=compile $CXX -I. $CPPFLAGS $CXXFLAGS -c -o alib.lo alib.cpp
+ /usr/local/src/gnu/libtool-2.x/libtool --tag=CXX --mode=compile CC -I. -g -c 
-o alib.lo alib.cpp
stderr:
stdout:
libtool: compile:  CC -I. -g -c alib.cpp  -KPIC -DPIC -o .libs/alib.o
libtool: compile:  CC -I. -g -c alib.cpp -o alib.o >/dev/null 2>&1
/home2/src/gnu/libtool-2.x/tests/template.at:81: $LIBTOOL --tag=CXX 
--mode=compile $CXX -I. $CPPFLAGS $CXXFLAGS -c -o aclib.lo aclib.cpp
+ /usr/local/src/gnu/libtool-2.x/libtool --tag=CXX --mode=compile CC -I. -g -c 
-o aclib.lo aclib.cpp
stderr:
stdout:
libtool: compile:  CC -I. -g -c aclib.cpp  -KPIC -DPIC -o .libs/aclib.o
libtool: compile:  CC -I. -g -c aclib.cpp -o aclib.o >/dev/null 2>&1
/home2/src/gnu/libtool-2.x/tests/template.at:83: $LIBTOOL --tag=CXX --mode=link 
$CXX $CPPFLAGS $CXXFLAGS $LDFLAGS -o libaclib.la aclib.lo
+ /usr/local/src/gnu/libtool-2.x/libtool --tag=CXX --mode=link CC -g -o 
libaclib.la aclib.lo
stderr:
prelink: INFO: C++ prelinker: executing: CC  -c  -I.  -g  -KPIC  -DPIC  
-o.libs/aclib.o aclib.cpp
stdout:
libtool: link: CC -Tprelink_objects  .libs/aclib.o 
libtool: link:  ar cru .libs/libaclib.a .libs/aclib.o 
libtool: link: ( cd ".libs" && rm -f "libaclib.la" && ln -s "../libaclib.la" 
"libaclib.la" )
/home2/src/gnu/libtool-2.x/tests/template.at:85: $LIBTOOL --tag=CXX --mode=link 
$CXX $CPPFLAGS $CXXFLAGS $LDFLAGS -o libalib.la -rpath /nonexistent alib.lo 
libaclib.la
+ /usr/local/src/gnu/libtool-2.x/libtool --tag=CXX --mode=link CC -g -o 
libalib.la -rpath /nonexistent alib.lo libaclib.la
stderr:
prelink: INFO: C++ prelinker: executing: CC  -c  -I.  -g  -KPIC  -DPIC  
-o.libs/alib.o alib.cpp
prelink: INFO: C++ prelinker: executing: CC  -c  -I.  -g  -oalib.o alib.cpp
stdout:
libtool: link: (cd .libs/libalib.lax/libaclib.a && ar x 
"/usr/local/src/gnu/libtool-2.x/tests/testsuite.dir/73/./.libs/libaclib.a")
libtool: link: CC -G -Wl,-h,libalib.so.0 -o .libs/libalib.so.0  .libs/alib.o   
.libs/libalib.lax/libaclib.a/aclib.o     
libtool: link: (cd ".libs" && rm -f "libalib.so" && ln -s "libalib.so.0" 
"libalib.so")
libtool: link: (cd ".libs" && rm -f "libalib.so" && ln -s "libalib.so.0" 
"libalib.so")
libtool: link: (cd .libs/libalib.lax/lt1-libaclib.a && ar x 
"/usr/local/src/gnu/libtool-2.x/tests/testsuite.dir/73/./.libs/libaclib.a")
libtool: link: CC -Tprelink_objects   alib.o  
.libs/libalib.lax/lt1-libaclib.a/aclib.o 
libtool: link:  ar cru .libs/libalib.a  alib.o  
.libs/libalib.lax/lt1-libaclib.a/aclib.o 
libtool: link: rm -fr .libs/libalib.lax .libs/libalib.lax
libtool: link: ( cd ".libs" && rm -f "libalib.la" && ln -s "../libalib.la" 
"libalib.la" )
/home2/src/gnu/libtool-2.x/tests/template.at:87: $CXX -I. $CPPFLAGS $CXXFLAGS 
-c prog.cpp
+ CC -I. -g -c prog.cpp
stderr:
stdout:
/home2/src/gnu/libtool-2.x/tests/template.at:89: $LIBTOOL --tag=CXX --mode=link 
$CXX $CPPFLAGS $CXXFLAGS $LDFLAGS -o prog$EXEEXT prog.$OBJEXT libalib.la
+ /usr/local/src/gnu/libtool-2.x/libtool --tag=CXX --mode=link CC -g -o prog 
prog.o libalib.la
stderr:
stdout:
libtool: link: CC -g -o .libs/prog prog.o  ./.libs/libalib.so 
-Wl,-R,/nonexistent
/home2/src/gnu/libtool-2.x/tests/template.at:92: if "$lt_exe" ; then :; else 
lt_status=$?;         test $lt_status != 0 &&         test "X$host" != 
"X$build" && test -x "$lt_exe" && exit 77;     exit $lt_status; fi
/home2/src/gnu/libtool-2.x/tests/template.at:92: + ./prog
+ :
stderr:
stdout:
73. template.at:27:  ok

## ------------- ##
## Test results. ##
## ------------- ##

1 test was successful.
_______________________________________________
http://lists.gnu.org/mailman/listinfo/libtool

Reply via email to