libtool-patches
[Top][All Lists]
Advanced

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

lt_dladvise.at failure


From: Ralf Wildenhues
Subject: lt_dladvise.at failure
Date: Sat, 16 Aug 2008 12:19:27 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

OK, I've looked at this a bit.  With the failure of the lt_dlopenadvise
test, Gary's patch does not introduce a regression: even branch-1-5
libtool already wrongly chose to link against ./.libs/libpreload.so.

So, since my aim ATM is to stabilize, not to fix all bugs, I propose to
punt.  This patch just creates a static (but installable) libpreload.
It notes that we're punting, but it gets the test to pass on GNU/Linux.
And since this issue is not a recent regression, I guess there is no
particular need to do better /right now/.  We can always go back and fix
this later.

One could also make the test XFAIL.  However, the test exercises many
useful bits, more than just the part that is failing, and most other
bits are more important.  This is why I think we should not go that way.

OK to apply?

Thanks,
Ralf

2008-08-16  Ralf Wildenhues  <address@hidden>

        Avoid test failure due to broken dlpreloading of shared library.
        * tests/lt_dladvise.at (lt_dlopenadvise library loading): Drop
        some newlines in AT_CHECK commands, for better 'testsuite -x'
        output.  Only create a static installable libpreload.la, to
        avoid exposing the bug libtool currently has with preloading of
        shared libraries.  Add a note to revisit this later.

diff --git a/tests/lt_dladvise.at b/tests/lt_dladvise.at
index c0cd768..dccb122 100644
--- a/tests/lt_dladvise.at
+++ b/tests/lt_dladvise.at
@@ -327,8 +327,8 @@ cygwin* | mingw*)
   CPPFLAGS="$CPPFLAGS -DHAVE_UNDEFINED_SYMBOLS=1"
   dlopenable="$dlopen depend"
   $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c moddepend.c
-  AT_CHECK([$LIBTOOL --mode=link $CC -module $CFLAGS $LDFLAGS -o libdepend.la \
-            moddepend.lo -rpath /foo -avoid-version], [], [ignore], [ignore])
+  AT_CHECK([$LIBTOOL --mode=link $CC -module $CFLAGS $LDFLAGS -o libdepend.la 
]dnl
+           [moddepend.lo -rpath /foo -avoid-version], [], [ignore], [ignore])
   ;;
 esac
 
@@ -340,9 +340,16 @@ LDFLAGS="$LDFLAGS -no-undefined"
 
 $CC $CPPFLAGS $CFLAGS -c main.c
 for name in resident local global preload; do
+  # FIXME: adding -static to libpreload shouldn't be necessary.
+  #        Fix this properly in ltmain, then remove this workaround.
+  if test $name = preload; then
+    st=-static
+  else
+    st=
+  fi
   $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c mod$name.c
-  AT_CHECK([$LIBTOOL --mode=link $CC -module $CFLAGS $LDFLAGS -o lib$name.la \
-            mod$name.lo -rpath /foo -avoid-version], [], [ignore], [ignore])
+  AT_CHECK([$LIBTOOL --mode=link $CC -module $CFLAGS $LDFLAGS -o lib$name.la 
]dnl
+           [mod$name.lo $st -rpath /foo -avoid-version], [], [ignore], 
[ignore])
 done
 
 preloaded=
@@ -360,7 +367,7 @@ AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main 
main.$OBJEXT $preloa
 
 # Remove loadable libpreload module, so we know it is the preloaded module
 # that is being executed by a successful test invocation:
-$LIBTOOL --mode=clean rm libpreload.la
+AT_CHECK([$LIBTOOL --mode=clean rm -f libpreload.la], [], [ignore], [ignore])
 
 LT_AT_NOINST_EXEC_CHECK([./main], [$modules], [], [expout], [])
 




reply via email to

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