bug-libtool
[Top][All Lists]
Advanced

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

Re: [libtool 2.2.4] testsuite: 10 41 failed


From: Ralf Wildenhues
Subject: Re: [libtool 2.2.4] testsuite: 10 41 failed
Date: Tue, 19 May 2009 23:57:06 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

Hello Patrice,

thank you for the bug report.

* Patrice Fromy wrote on Tue, May 19, 2009 at 10:57:06AM CEST:
> ## ------------------------- ##
> ## libtool 2.2.4 test suite. ##
> ## ------------------------- ##

The current version of Libtool is 2.2.6a.  Upgrading to that will fix
the failure of test 10:

> 10. libtoolize.at:651: testing ...
> ./libtoolize.at:685: /home/pfromy/libtool-2.2.4/libtoolize --copy
> 
> 
> ./libtoolize.at:692: $ACLOCAL -I$abs_top_srcdir/libltdl/m4
> stderr:
> aclocal: unrecognized option -- `-I/home/pfromy/libtool-2.2.4/libltdl/m4'
> Try `aclocal --help' for more information.
> stdout:
> ./libtoolize.at:692: exit code was 1, expected 0

However, I suspect that it will not fix the failure of test 41:

> 41. old-m4-iface.at:107: testing ...
> libtoolize: putting auxiliary files in `.'.
[...]
> ./old-m4-iface.at:154: CONFIG_SHELL=$SHELL $SHELL ./configure 
> $configure_options 
> stderr:
> stdout:
[...]
> checking for ltdl.h... yes
> checking whether lt_dlinterface_register is declared... yes
> checking for lt_dlinterface_register in -lltdl... yes
> checking where to find libltdl headers... 
> checking where to find libltdl library... -lltdl
> checking for unistd.h... (cached) yes
[...]
> ./old-m4-iface.at:154: $MAKE  
[...]
> /bin/sh ./libtool --mode=link gcc -no-undefined -g -O2  -o ltdldemo main.o 
> -dlopen module.la -lltdl
> libtool: link: rm -f .libs/ltdldemo.nm .libs/ltdldemo.nmS .libs/ltdldemo.nmT
> libtool: link: (cd .libs && gcc -g -O2 -c -fno-builtin "ltdldemoS.c")
> libtool: link: rm -f ".libs/ltdldemoS.c" ".libs/ltdldemo.nm" 
> ".libs/ltdldemo.nmS" ".libs/ltdldemo.nmT"
> libtool: link: gcc -g -O2 -o ltdldemo main.o .libs/ltdldemoS.o  -lltdl
> libtool: link: rm -f ".libs/ltdldemoS.o"
> make[4]: Leaving directory `/home/pfromy/libtool-2.2.4/tests/testsuite.dir/41'
> ./old-m4-iface.at:156: ./ltdldemo; lt_status=$?; if test $lt_status -eq 0; 
> then :;
>          elif test "X$host" != "X$build" && \
>               { test -x "./ltdldemo" || test -x "./ltdldemo"$EXEEXT; }
>          then (exit 77); else (exit $lt_status); fi
> Not enabling shell tracing (command contains an embedded newline)
> --- /dev/null 2009-02-18 17:54:26.316267119 +0100
> +++ /home/pfromy/libtool-2.2.4/tests/testsuite.dir/at-stderr  2009-05-19 
> 10:35:08.000000000 +0200
> @@ -0,0 +1 @@
> +./ltdldemo: error while loading shared libraries: libltdl.so.7: cannot open 
> shared object file: No such file or directory
> stdout:
> ./old-m4-iface.at:156: exit code was 127, expected 0
> 41. old-m4-iface.at:107: 41. AC_WITH_LTDL (old-m4-iface.at:107): FAILED 
> (old-m4-iface.at:156)

My guess at what happens here:

You have a recent libltdl.so (from a Libtool 2.2.x release) installed
somewhere where the link editor can find it by default (/usr/local/lib?)
but the runtime linker (ld.so) will not search by default.  Furthermore,
the libltdl.la file has been removed from the installation location.
The lack of the .la file will cause libtool to not consider adding a run
path to the installed location of the .so file.  Thus at run time, the
program fails to load the library.  I can reproduce a similar-looking
failure with such a setup.

Can you confirm this to be the case on your system?

Then, can you try out the patch below and confirm that it fixes the
failure with
  make check-local TESTSUITEFLAGS='-v -d -x -k AC_WITH_LTDL'

OK to add you to THANKS and commit the patch?

Thanks,
Ralf

    testsuite: cope when some installed libltdl.la file has been removed.
    
    * tests/old-m4-iface.at (AC_WITH_LTDL): Pass --with-included-ltdl
    to configure, to ensure we do not accidentally link against a
    previously installed libltdl.so where the corresponding .la
    file has been removed, thus we do not add a run path, and the
    runtime linker then fails to find libltdl.so.7.
    * THANKS: Update.
    Report by Patrice Fromy.

diff --git a/tests/old-m4-iface.at b/tests/old-m4-iface.at
index 1e374d4..64f7e60 100644
--- a/tests/old-m4-iface.at
+++ b/tests/old-m4-iface.at
@@ -1,6 +1,6 @@
 # old-m4-iface.at -- exercise old m4 interface to libtool     -*- Autotest -*-
 #
-#   Copyright (C) 2005, 2008 Free Software Foundation, Inc.
+#   Copyright (C) 2005, 2008, 2009 Free Software Foundation, Inc.
 #   Written by Gary V. Vaughan, 2005
 #
 #   This file is part of GNU Libtool.
@@ -155,8 +155,10 @@ address@hidden@: address@hidden@ module.la 
libltdl/libltdlc.la
        $(LTCOMPILE) -c -o $@ $<
 ]])
 
+# Be sure to use the in-tree libltdl, somebody might have removed
+# an installed libltdl.la file.
 LT_AT_BOOTSTRAP([--ltdl --install], [-I libltdl/m4], [ignore], [ignore],
-       [--force])
+       [--force], [--with-included-ltdl])
 
 LT_AT_EXEC_CHECK([./ltdldemo], 0, [ignore])
 




reply via email to

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