Hi Gary, * Gary V. Vaughan wrote on Tue, May 06, 2008 at 07:24:46PM CEST: > * libltdl/m4/ltdl.m4 (LTDL_INIT): Check for a libltdl that > provides lt_dladvise_preopen when deciding if installed libltdl > is 'new enough'. > * libltdl/libltdl/lt__private.h (lt__advise): Add a new > is_preload flag. > * libltdl/ltdl.c (lt_dladvise_preload): New api call to set it. > (try_dlopen): If it is set, and the search of preloaded modules > didn't return a match, don't bother searching the filesystem. > * libltdl/ltdl.h (lt_dladvise_preload): Declare it. > * doc/libtool.texi (Libltdl Interface): Document it. > * tests/lt_dladvise.at: Test it (and incidentally add some test > coverage for `libtool -dlpreopen'). > * NEWS: Announce it.
This patch causes a testsuite failure on GNU/Linux. Also note the repeated file in the 'rm' call hints to two nits: it should be 'rm -f', and there is some uniquification needed in func_mode_clean. I haven't had time to review this patch otherwise yet, sorry. Cheers, Ralf # -*- compilation -*- 45. lt_dladvise.at:28: testing ... ../../libtool/tests/lt_dladvise.at:305: case $LIBLTDL in #( */_inst/lib/*) test -f $LIBLTDL || (exit 77) ;; esac Not enabling shell tracing (command contains an embedded newline) stdout: libtool: compile: gcc -I/home/ralf/libtool/build/../libtool/libltdl -DHAVE_UNDEFINED_SYMBOLS=1 -g -O2 -c moddepend.c -fPIC -DPIC -o .libs/moddepend.o libtool: compile: gcc -I/home/ralf/libtool/build/../libtool/libltdl -DHAVE_UNDEFINED_SYMBOLS=1 -g -O2 -c moddepend.c -o moddepend.o >/dev/null 2>&1 ../../libtool/tests/lt_dladvise.at:330: $LIBTOOL --mode=link $CC -module $CFLAGS $LDFLAGS -o libdepend.la \ moddepend.lo -rpath /foo -avoid-version Not enabling shell tracing (command contains an embedded newline) stderr: stdout: libtool: link: gcc -shared .libs/moddepend.o -Wl,-soname -Wl,libdepend.so -o .libs/libdepend.so libtool: link: ar cru .libs/libdepend.a moddepend.o libtool: link: ranlib .libs/libdepend.a libtool: link: ( cd ".libs" && rm -f "libdepend.la" && ln -s "../libdepend.la" "libdepend.la" ) libtool: compile: gcc -I/home/ralf/libtool/build/../libtool/libltdl -DHAVE_UNDEFINED_SYMBOLS=1 -g -O2 -c modresident.c -fPIC -DPIC -o .libs/modresident.o libtool: compile: gcc -I/home/ralf/libtool/build/../libtool/libltdl -DHAVE_UNDEFINED_SYMBOLS=1 -g -O2 -c modresident.c -o modresident.o >/dev/null 2>&1 ../../libtool/tests/lt_dladvise.at:344: $LIBTOOL --mode=link $CC -module $CFLAGS $LDFLAGS -o lib$name.la \ mod$name.lo -rpath /foo -avoid-version Not enabling shell tracing (command contains an embedded newline) stderr: stdout: libtool: link: gcc -shared .libs/modresident.o -Wl,-soname -Wl,libresident.so -o .libs/libresident.so libtool: link: ar cru .libs/libresident.a modresident.o libtool: link: ranlib .libs/libresident.a libtool: link: ( cd ".libs" && rm -f "libresident.la" && ln -s "../libresident.la" "libresident.la" ) libtool: compile: gcc -I/home/ralf/libtool/build/../libtool/libltdl -DHAVE_UNDEFINED_SYMBOLS=1 -g -O2 -c modlocal.c -fPIC -DPIC -o .libs/modlocal.o libtool: compile: gcc -I/home/ralf/libtool/build/../libtool/libltdl -DHAVE_UNDEFINED_SYMBOLS=1 -g -O2 -c modlocal.c -o modlocal.o >/dev/null 2>&1 ../../libtool/tests/lt_dladvise.at:344: $LIBTOOL --mode=link $CC -module $CFLAGS $LDFLAGS -o lib$name.la \ mod$name.lo -rpath /foo -avoid-version Not enabling shell tracing (command contains an embedded newline) stderr: stdout: libtool: link: gcc -shared .libs/modlocal.o -Wl,-soname -Wl,liblocal.so -o .libs/liblocal.so libtool: link: ar cru .libs/liblocal.a modlocal.o libtool: link: ranlib .libs/liblocal.a libtool: link: ( cd ".libs" && rm -f "liblocal.la" && ln -s "../liblocal.la" "liblocal.la" ) libtool: compile: gcc -I/home/ralf/libtool/build/../libtool/libltdl -DHAVE_UNDEFINED_SYMBOLS=1 -g -O2 -c modglobal.c -fPIC -DPIC -o .libs/modglobal.o libtool: compile: gcc -I/home/ralf/libtool/build/../libtool/libltdl -DHAVE_UNDEFINED_SYMBOLS=1 -g -O2 -c modglobal.c -o modglobal.o >/dev/null 2>&1 ../../libtool/tests/lt_dladvise.at:344: $LIBTOOL --mode=link $CC -module $CFLAGS $LDFLAGS -o lib$name.la \ mod$name.lo -rpath /foo -avoid-version Not enabling shell tracing (command contains an embedded newline) stderr: stdout: libtool: link: gcc -shared .libs/modglobal.o -Wl,-soname -Wl,libglobal.so -o .libs/libglobal.so libtool: link: ar cru .libs/libglobal.a modglobal.o libtool: link: ranlib .libs/libglobal.a libtool: link: ( cd ".libs" && rm -f "libglobal.la" && ln -s "../libglobal.la" "libglobal.la" ) libtool: compile: gcc -I/home/ralf/libtool/build/../libtool/libltdl -DHAVE_UNDEFINED_SYMBOLS=1 -g -O2 -c modpreload.c -fPIC -DPIC -o .libs/modpreload.o libtool: compile: gcc -I/home/ralf/libtool/build/../libtool/libltdl -DHAVE_UNDEFINED_SYMBOLS=1 -g -O2 -c modpreload.c -o modpreload.o >/dev/null 2>&1 ../../libtool/tests/lt_dladvise.at:344: $LIBTOOL --mode=link $CC -module $CFLAGS $LDFLAGS -o lib$name.la \ mod$name.lo -rpath /foo -avoid-version Not enabling shell tracing (command contains an embedded newline) stderr: stdout: libtool: link: gcc -shared .libs/modpreload.o -Wl,-soname -Wl,libpreload.so -o .libs/libpreload.so libtool: link: ar cru .libs/libpreload.a modpreload.o libtool: link: ranlib .libs/libpreload.a libtool: link: ( cd ".libs" && rm -f "libpreload.la" && ln -s "../libpreload.la" "libpreload.la" ) ../../libtool/tests/lt_dladvise.at:358: $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT $preloaded $modules $LIBLTDL stderr: stdout: libtool: link: rm -f .libs/main.nm .libs/main.nmS .libs/main.nmT libtool: link: (cd .libs && gcc -g -O2 -c -fno-builtin "mainS.c") libtool: link: rm -f ".libs/mainS.c" ".libs/main.nm" ".libs/main.nmS" ".libs/main.nmT" libtool: link: gcc -g -O2 -o .libs/main main.o .libs/mainS.o ./.libs/libpreload.so /home/ralf/libtool/build/libltdl/.libs/dlopen.a /home/ralf/libtool/build/tests/../libltdl/.libs/libltdlc.a -ldl -Wl,-rpath -Wl,/foo libtool: clean: rm libpreload.la .libs/libpreload.so .libs/libpreload.so .libs/libpreload.so .libs/libpreload.a .libs/libpreload.la .libs/libpreload.lai rm: cannot remove `.libs/libpreload.so': No such file or directory rm: cannot remove `.libs/libpreload.so': No such file or directory libtool: clean: rmdir .libs >/dev/null 2>&1 ../../libtool/tests/lt_dladvise.at:365: $LIBTOOL --mode=execute $modules ./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) --- /dev/null 2008-07-27 13:47:23.200041014 +0200 +++ /home/ralf/libtool/build/tests/testsuite.dir/at-stderr 2008-08-02 12:42:11.000000000 +0200 @@ -0,0 +1 @@ +gcc: ./.libs/libpreload.so: No such file or directory --- expout 2008-08-02 12:42:10.000000000 +0200 +++ /home/ralf/libtool/build/tests/testsuite.dir/at-stdout 2008-08-02 12:42:11.000000000 +0200 @@ -1,5 +0,0 @@ -resident: 2 -local: 3 -global: 4 -depend: 5 -preload: 6 ../../libtool/tests/lt_dladvise.at:365: exit code was 1, expected 0 45. lt_dladvise.at:28: 45. lt_dlopenadvise library loading (lt_dladvise.at:28): FAILED (lt_dladvise.at:365)