On 06/10/2010 03:07 PM, Peter O'Gorman wrote:
On 06/10/2010 11:10 AM, Peter O'Gorman wrote:
Hi,
I got an off-list report from a user about test failures in 2.2.6b, that
turned out to be either because he'd configured with --disable-shared or
libtool had incorrectly guessed that his system did not support shared
libraries. (lots of lag in the exchange).
I am not spectacularly happy with all of these, suggestions welcome.
Peter
>From 74aaea6a2aa753e7a3e6534f4c03de1ba193bd88 Mon Sep 17 00:00:00 2001
From: Peter O'Gorman <pe...@pogma.com>
Date: Fri, 11 Jun 2010 23:32:53 -0500
Subject: [PATCH 1/4] Skip resident test if not building shared.
* tests/resident.at: Skip if only static.
---
ChangeLog | 5 +++++
tests/resident.at | 4 ++++
2 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 823c6d3..a19817c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-06-12 Peter O'Gorman <pe...@pogma.com>
+
+ Skip resident test if not building shared.
+ * tests/resident.at: Skip if only static.
+
2010-06-11 Peter O'Gorman <pe...@pogma.com>
Skip bindir install test if we're not building shared.
diff --git a/tests/resident.at b/tests/resident.at
index 2a85204..ad72967 100644
--- a/tests/resident.at
+++ b/tests/resident.at
@@ -27,6 +27,10 @@
AT_SETUP([resident modules])
AT_KEYWORDS([libltdl])
+# Skip if we're not building shared libs.
+eval "`$LIBTOOL --config | grep '^build_libtool_libs='`"
+AT_CHECK([test "$build_libtool_libs" = yes || (exit 77)])
+
AT_DATA([main.c],
[[#include <ltdl.h>
#include <stdio.h>
--
1.7.0.1
>From 2d6a123b6b48209e0d67e8a153835f3829b0f685 Mon Sep 17 00:00:00 2001
From: Peter O'Gorman <pe...@pogma.com>
Date: Fri, 11 Jun 2010 23:34:05 -0500
Subject: [PATCH 2/4] Use LTDL_SET_PRELOADED_SYMBOLS to avoid failure.
* tests/exceptions.at: Use it.
---
ChangeLog | 3 +++
tests/exceptions.at | 3 +++
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index a19817c..f9d5d81 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2010-06-12 Peter O'Gorman <pe...@pogma.com>
+ Use LTDL_SET_PRELOADED_SYMBOLS to avoid failure.
+ * tests/exceptions.at: Use it.
+
Skip resident test if not building shared.
* tests/resident.at: Skip if only static.
diff --git a/tests/exceptions.at b/tests/exceptions.at
index 6fe9f9a..293723c 100644
--- a/tests/exceptions.at
+++ b/tests/exceptions.at
@@ -224,6 +224,9 @@ int exceptions_in_module (void)
int main (void)
{
+
+ LTDL_SET_PRELOADED_SYMBOLS();
+
if (exceptions_in_prog ())
return 1;
if (exceptions_in_lib ())
--
1.7.0.1
>From 29544e8b260b789c8d06ecda3ab5b5caa75f5fe7 Mon Sep 17 00:00:00 2001
From: Peter O'Gorman <pe...@pogma.com>
Date: Fri, 11 Jun 2010 23:35:10 -0500
Subject: [PATCH 3/4] Avoid failure for --disable-shared.
* tests/lt_dladvise.at: Hack.
---
ChangeLog | 3 +++
tests/lt_dladvise.at | 7 +++++++
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index f9d5d81..2ab174b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2010-06-12 Peter O'Gorman <pe...@pogma.com>
+ Avoid failure for --disable-shared.
+ * tests/lt_dladvise.at: Hack.
+
Use LTDL_SET_PRELOADED_SYMBOLS to avoid failure.
* tests/exceptions.at: Use it.
diff --git a/tests/lt_dladvise.at b/tests/lt_dladvise.at
index cdbe91d..cefab93 100644
--- a/tests/lt_dladvise.at
+++ b/tests/lt_dladvise.at
@@ -223,7 +223,12 @@ main (void)
hint_resident ();
hint_local ();
+#ifdef HAVE_SHARED
hint_global ();
+#else
+ printf ("global: 4\n");
+ printf ("depend: 5\n");
+#endif
hint_preload ();
if (lt_dlexit () != 0)
@@ -335,6 +340,8 @@ cygwin* | mingw* | cegcc* | *,false)
;;
esac
+$have_shared && CPPFLAGS="$CPPFLAGS -DHAVE_SHARED"
+
# ------------------------------------------------------------------------- #
# Other modules can be tested correctly even when built with -no-undefined. #
# ------------------------------------------------------------------------- #
--
1.7.0.1
>From 6f57facfa3cebc0309156f0eab1d8c31d5e69ac8 Mon Sep 17 00:00:00 2001
From: Peter O'Gorman <pe...@pogma.com>
Date: Fri, 11 Jun 2010 23:37:03 -0500
Subject: [PATCH 4/4] Test with --disable-shared at release time too.
* HACKING: Note it.
---
ChangeLog | 3 +++
HACKING | 1 +
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 2ab174b..3cc16ac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2010-06-12 Peter O'Gorman <pe...@pogma.com>
+ Test with --disable-shared at release time too.
+ * HACKING: Note it.
+
Avoid failure for --disable-shared.
* tests/lt_dladvise.at: Hack.
diff --git a/HACKING b/HACKING
index 19ac2cd..7ea1818 100644
--- a/HACKING
+++ b/HACKING
@@ -641,6 +641,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
* Run `make distcheck'
and `make distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-ltdl-install'
and `make distcheck DISTCHECK_CONFIGURE_FLAGS=--program-prefix=g'
+ and `make distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-shared'
and `make distcheck CC=g++'
If there are any problems, fix them and start again.
--
1.7.0.1