Skip to contentSkip to conversation

Fix: Conditionally disable overlap app test requiring shared libs support

PATCH Mathieu Desnoyers 1 participant 1 message May 7, 2013 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

For the records, this patch was merged into lttng-tools a while ago as:

commit ccf7af6c78ba7a206baa9d0b9578468a1af734e1

Author: Christian Babeux <[email protected]>
Date:   Thu Feb 7 22:47:04 2013 -0500

Fix: Conditionally disable test requiring shared libs

When building lttng-tools with shared library support explicitly disabled (e.g.: ./configure --disable-shared), libtool fail with a fatal error:

Making all in demo
CC tp.lo
CC tp2.lo
CC tp3.lo
CC demo.o
CCLD demo
CCLD liblttng-ust-provider-ust-tests-demo.la
CCLD liblttng-ust-provider-ust-tests-demo3.la
libtool: link: can not build a shared library
libtool: link: See the libtool documentation for more information.
libtool: link: Fatal configuration error.

The build should not fail because some tests require explicit shared library support, instead they should be skipped. This can be accomplished by detecting builds with no shared libs support with the NO_SHARED Automake variable.

Quoted 55 lines · * Christian Babeux ([email protected]) wrote:

When building lttng-tools with shared library support explicitly disabled (e.g.: ./configure --disable-shared), libtool fail with a fatal error:

Making all in demo

  CC       tp.lo
  CC       tp2.lo
  CC       tp3.lo
  CC       demo.o
  CCLD     demo
  CCLD     liblttng-ust-provider-ust-tests-demo.la
  CCLD     liblttng-ust-provider-ust-tests-demo3.la

libtool: link: can not build a shared library
libtool: link: See the libtool documentation for more information.
libtool: link: Fatal configuration error.

The build should not fail because some tests require explicit shared library support, instead they should be skipped. This can be accomplished by detecting builds with no shared libs support with the NO_SHARED Automake variable.

---
 tests/ust/overlap/demo/Makefile.am | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
tests/ust/overlap/demo/Makefile.am +7 -1
index e354636..68b6e08 100644
@@ -1,5 +1,10 @@
 AM_CFLAGS=-I$(srcdir)
-
+if NO_SHARED
+# Do not build this test if shared libraries support was
+# explicitly disabled.
+else
+# Force the shared flag on the noinst libraries since they are
+# only built static by default
 FORCE_SHARED_LIB_OPTIONS = -module -shared -avoid-version \
 						   -rpath $(abs_builddir)
 
@@ -30,3 +35,4 @@ endif
 
 noinst_SCRIPTS = demo-trace
 EXTRA_DIST = demo-trace
+endif
Signature · 7 lines
1.8.1.2


_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
Signature · 3 lines
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com