Fix: don't accept configure --disable-shared
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 25 Mar 2014 14:00:28 +0000 (10:00 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 25 Mar 2014 14:04:03 +0000 (10:04 -0400)
Building LTTng-UST with --disable-shared compiles fine, but the
resulting installed static libraries silently fails to trace, because
tracepoint fails to dlopen liblttng-ust-tracepoint.so. So don't allow
this unsupported configure option.

Also document this requirement in the README.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
README
configure.ac

diff --git a/README b/README
index e449576accb764f8b5f6f5e0992aaba9b200c404..1d731ab76c4d8d8ab1fe787f12d51d4adda7bc8a 100644 (file)
--- a/README
+++ b/README
@@ -56,7 +56,9 @@ INSTALLATION INSTRUCTIONS:
   installs. However, this path is not part of most distributions' default
   library path which will cause builds depending on liblttng-ust to fail unless
   '-L/usr/local/lib' is added to LDFLAGS. You may provide a custom prefix to
-  configure by using the --prefix switch.
+  configure by using the --prefix switch. Note that LTTng-UST needs to
+  be a shared library, even if the tracepoint probe provider is statically
+  linked into the application.
 
 USAGE:
 
index f3bce8daf6a369f733de76ff239353c3473465e1..feee4e17054530c29e8c550a11874ef6419f44f5 100644 (file)
@@ -266,6 +266,16 @@ AS_IF([test "x$with_sdt" = "xyes"],[
        ])
 ])
 
+AC_MSG_CHECKING([whether shared libraries are enabled])
+AS_IF([test "x$enable_shared" = "xyes"],
+       [
+               AC_MSG_RESULT([yes])
+       ],
+       [
+               AC_MSG_RESULT([no])
+               AC_MSG_ERROR([LTTng-UST requires shared libraries to be enabled])
+       ])
+
 AC_ARG_WITH([lttng-system-rundir],
        AS_HELP_STRING([--with-lttng-system-rundir],
        [Location of the system directory where LTTng-UST expects the system-wide lttng-sessiond runtime files. The default is "/var/run/lttng".]),
This page took 0.025492 seconds and 4 git commands to generate.