libtool-patches
[Top][All Lists]
Advanced

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

Re: versioning test


From: Ralf Wildenhues
Subject: Re: versioning test
Date: Mon, 26 Jan 2009 23:43:46 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

Hello Mike,

please keep the mailing list in Cc:, thanks.

* Mike Gorchak wrote on Mon, Jan 26, 2009 at 11:11:30AM CET:
> RW> Here is a testsuite addition to get some exposure to versioning.
> RW> OK to push (and add Mike to THANKS)?  It'd be good if somebody
> RW> proof-read it so there are no silly typos or thinkos.
>
> Versioning test (with my patch regarding QNX versioning applied) has been 
> failed for me in strange way - couldn't find liba.so.0 library error at 
> the end of test during cleanup procedure (rm -f as far as I can 
> understand from logs).

See below, it is a bug in the test.

> As far as I can see in my previous letter all old tests are passed well. 
> In this letter in the attachment, verbosed log of stdout/stderr and  
> testsuite.log as for new tests, some of them are failed on QNX.

Thank you.  I see three distinct issues, and I'll quote the respective
logs for other readers:

1) The duplicate_member test:

| libtool: link: ar cru .libs/libc0.a 6/.libs/a.o 
| libtool: link: ranlib .libs/libc0.a
| libtool: link: ( cd ".libs" && rm -f "libc0.la" && ln -s "../libc0.la" 
"libc0.la" )
| libtool: link: (cd .libs/libconv.lax/libc0.a && ar x 
"/ports/temp/libtool-2.2.6-qnx/tests/testsuite.dir/15/./.libs/libc0.a")
| libtool: link: ar cru .libs/libconv.a 1/.libs/a.o 2/.libs/a.o 3/.libs/a.o 
4/.libs/a.o 5/.libs/a.o   .libs/libconv.lax/libc0.a/a.o 
| libtool: link: ranlib .libs/libconv.a
| libtool: link: rm -fr .libs/libconv.lax
| libtool: link: ( cd ".libs" && rm -f "libconv.la" && ln -s "../libconv.la" 
"libconv.la" )
| libtool: compile:  qcc -V3.3.5,gcc_ntox86 -O3 -funroll-all-loops 
-I/usr/include -c bar.c  -fPIC -shared -DPIC -o .libs/bar.o
| libtool: compile:  qcc -V3.3.5,gcc_ntox86 -O3 -funroll-all-loops 
-I/usr/include -c bar.c -o bar.o >/dev/null 2>&1
| libtool: link: (cd .libs/libbar.lax/libconv.a && ar x 
"/ports/temp/libtool-2.2.6-qnx/tests/testsuite.dir/15/./.libs/libconv.a")
| libtool: link: qcc -V3.3.5,gcc_ntox86 -shared  .libs/bar.o   
.libs/libbar.lax/libconv.a/a.o   -L/usr/lib    -Wl,-soname -Wl,libbar.so.0 -o 
.libs/libbar.so.0
| libtool: link: (cd ".libs" && rm -f "libbar.so" && ln -s "libbar.so.0" 
"libbar.so")
| libtool: link: (cd .libs/libbar.lax/lt1-libconv.a && ar x 
"/ports/temp/libtool-2.2.6-qnx/tests/testsuite.dir/15/./.libs/libconv.a")
| libtool: link: ar cru .libs/libbar.a  bar.o  
.libs/libbar.lax/lt1-libconv.a/a.o 
| libtool: link: ranlib .libs/libbar.a
| libtool: link: rm -fr .libs/libbar.lax .libs/libbar.lax
| libtool: link: ( cd ".libs" && rm -f "libbar.la" && ln -s "../libbar.la" 
"libbar.la" )
| libtool: compile:  qcc -V3.3.5,gcc_ntox86 -O3 -funroll-all-loops 
-I/usr/include -c main.c  -fPIC -shared -DPIC -o .libs/main.o
| libtool: compile:  qcc -V3.3.5,gcc_ntox86 -O3 -funroll-all-loops 
-I/usr/include -c main.c -o main.o >/dev/null 2>&1
| libtool: link: qcc -V3.3.5,gcc_ntox86 -O3 -funroll-all-loops -I/usr/include 
-o .libs/main .libs/main.o  -L/usr/lib ./.libs/libbar.so  -Wl,-rpath -Wl,/notexi
| ./.libs/libbar.so: undefined reference to `foo2'
| ./.libs/libbar.so: undefined reference to `foo3'
| ./.libs/libbar.so: undefined reference to `foo1'
| ./.libs/libbar.so: undefined reference to `foo4'
| ./.libs/libbar.so: undefined reference to `foo5'
| cc: /usr/qnx630/host/qnx6/x86/usr/bin/i386-pc-nto-qnx6.3.0-ld error 1
| ./duplicate_members.at:73: ./main; lt_status=$?; if test $lt_status -eq 0; 
then :;
|            elif test "X$host" != "X$build" && \
|                 { test -x "./main" || test -x "./main"$EXEEXT; }
|            then (exit 77); else (exit $lt_status); fi
| Not enabling shell tracing (command contains an embedded newline)
| stderr:
| /ports/temp/libtool-2.2.6-qnx/tests/testsuite: 
/ports/temp/libtool-2.2.6-qnx/tests/testsuite.dir/at-test-source[95]: ./main: 
not found
| stdout:
| ./duplicate_members.at:73: exit code was 127, expected 0


libtool does not take care to rename duplicate object members in
archives on your system.  Let's find out whether this is due to a
deficient "sort" binary or func_basename on QNX:  please cd into your
build tree in which you ran the testsuite.  Then enter these commands
and post all their output (gzip large output):

  cd tests/testsuite.dir/16
  ./libtool --debug --mode=link --tag=CC qcc -V3.3.5,gcc_ntox86 -O3 \
            -funroll-all-loops -o libconv.la \
            1/a.lo 2/a.lo 3/a.lo 4/a.lo 5/a.lo libc0.la

The duplicate_conv failure within the "low max_cmd_len" test is of the
same nature:
| > /duplicate_conv.at:51: $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS 
-o libcee.la c.lo a/liba.la b/liba.la
| > stderr:
| > stdout:
| > libtool: link: (cd .libs/libcee.lax/liba.a && ar x 
"/ports/temp/libtool-2.2.6-qnx/tests/testsuite.dir/74/tests/testsuite.dir/16/a/.libs/liba.a")
| > libtool: link: (cd .libs/libcee.lax/lt1-liba.a && ar x 
"/ports/temp/libtool-2.2.6-qnx/tests/testsuite.dir/74/tests/testsuite.dir/16/b/.libs/liba.a")
| > libtool: link: ar cru .libs/libcee.a .libs/c.o
| > libtool: link: : .libs/libcee.a
| > libtool: link: ar cru .libs/libcee.a .libs/libcee.lax/liba.a/a.o
| > libtool: link: : .libs/libcee.a
| > libtool: link: ar cru .libs/libcee.a .libs/libcee.lax/lt1-liba.a/a.o
| > libtool: link: : .libs/libcee.a
| > libtool: link: ar cru .libs/libcee.a .libs/libcee.lax/lt1-liba.a/b.o
| > libtool: link: ranlib .libs/libcee.a
| > libtool: link: rm -fr .libs/libcee.lax
| > libtool: link: ( cd ".libs" && rm -f "libcee.la" && ln -s "../libcee.la" 
"libcee.la" )
| > /duplicate_conv.at:53: $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main 
main.$OBJEXT ./libcee.la
| > stderr:
| > ./.libs/libcee.a(c.o): In function `c':
| > c.o(.text+0x12): undefined reference to `a'
| > cc: /usr/qnx630/host/qnx6/x86/usr/bin/i386-pc-nto-qnx6.3.0-ld error 1
| > stdout:
| > libtool: link: qcc -V3.3.5,gcc_ntox86 -O3 -funroll-all-loops -I/usr/include 
-o main main.o  -L/usr/lib ./.libs/libcee.a
| > /duplicate_conv.at:53: exit code was 1, expected 0



2) Failure test:

| ./fail.at:61: test -f a.lo
| ./fail.at:70: if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o a a.$OBJEXT; 
then (exit 1); else :; fi
| stderr:
| stdout:
| libtool: link: qcc -V3.3.5,gcc_ntox86 -O3 -funroll-all-loops -I/usr/include 
-o a a.o  -L/usr/lib
| ./fail.at:70: exit code was 1, expected 0
| 26. fail.at:27: 26. Failure tests (fail.at:27): FAILED (fail.at:70)

does this work on your system?

  echo 'int not_main () { return 0; }' > a.c
  qcc -V3.3.5,gcc_ntox86 -O3 -funroll-all-loops -c a.c
  qcc -V3.3.5,gcc_ntox86 -O3 -funroll-all-loops -o a a.o
  echo $?
  ls -l a

3) The failure of the new versioning test.  This is interesting:

| ./versioning.at:199: $LIBTOOL --mode=clean rm -f liba.la
| stderr:
| stdout:
| libtool: clean: rm -f liba.la .libs/liba.so.0 .libs/liba.so.0 .libs/liba.so 
.libs/liba.a .libs/liba.la .libs/liba.lai
| libtool: clean: rmdir .libs >/dev/null 2>&1
| ./versioning.at:169: $bindir/prog1; lt_status=$?; if test $lt_status -eq 0; 
then :;
|            elif test "X$host" != "X$build" && \
|                 { test -x "$bindir/prog1" || test -x "$bindir/prog1"$EXEEXT; }
|            then (exit 77); else (exit $lt_status); fi
| Not enabling shell tracing (command contains an embedded newline)
| ./versioning.at:170: $bindir/prog2; lt_status=$?; if test $lt_status -eq 0; 
then :;
|            elif test "X$host" != "X$build" && \
|                 { test -x "$bindir/prog2" || test -x "$bindir/prog2"$EXEEXT; }
|            then (exit 77); else (exit $lt_status); fi
| Not enabling shell tracing (command contains an embedded newline)
| ./versioning.at:201: $LIBTOOL --mode=uninstall rm -f $libdir/liba.la
| stderr:
| stdout:
| libtool: uninstall: rm -f 
/ports/temp/libtool-2.2.6-qnx/tests/testsuite.dir/38/inst/lib/liba.la 
/ports/temp/libtool-2.2.6-qnx/tests/testsuite.dir/38/inst/li
| ./versioning.at:206: $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la 
liba3.lo       -version-info 1:0:1 -rpath $libdir
| stderr:
| stdout:
| libtool: link: qcc -V3.3.5,gcc_ntox86 -shared  .libs/liba3.o   -L/usr/lib    
-Wl,-soname -Wl,liba.so.1 -o .libs/liba.so.1
| libtool: link: (cd ".libs" && rm -f "liba.so" && ln -s "liba.so.1" "liba.so")
| libtool: link: ar cru .libs/liba.a  liba3.o
| libtool: link: ranlib .libs/liba.a
| libtool: link: ( cd ".libs" && rm -f "liba.la" && ln -s "../liba.la" 
"liba.la" )
| ./versioning.at:159: ./prog1; lt_status=$?; if test $lt_status -eq 0; then :;
|            elif test "X$host" != "X$build" && \
|                 { test -x "./prog1" || test -x "./prog1"$EXEEXT; }
|            then (exit 77); else (exit $lt_status); fi
| Not enabling shell tracing (command contains an embedded newline)
| --- /dev/null   2009-01-26 10:18:38.000000000 +0200
| +++ /ports/temp/libtool-2.2.6-qnx/tests/testsuite.dir/at-stderr 2009-01-26 
10:18:38.000000000 +0200
| @@ -0,0 +1 @@
| +Could not find library liba.so.0
| ./versioning.at:159: exit code was 1, expected 0
| 38. versioning.at:24: 38. versioning (versioning.at:24): FAILED 
(versioning.at:159)

This was a thinko on my part.  If the encoded version is $current, not
$current - $age, then the uninstalled program cannot continue to work,
as its library was just removed from .libs.  However, an installed
program should continue to work, if we don't uninstall the old library
before also installing a new one.

I'll come up with a better test group, and test it more before posting.

> P.S. Why tests which are marked at exit as "expected failure" did not  
> appeared in the testsuite.log file with 'ok' status ?

Well, they fail.  Each of them represents a bug we know about and should
fix sometime.  :-)

Cheers, and thanks,
Ralf




reply via email to

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