From: Mathieu Desnoyers Date: Tue, 25 Mar 2014 14:00:28 +0000 (-0400) Subject: Fix: don't accept configure --disable-shared X-Git-Tag: v2.4.1~6 X-Git-Url: https://git.lttng.org/?p=lttng-ust.git;a=commitdiff_plain;h=95be90cdad85110399b1db94be77a7e76497fa1f Fix: don't accept configure --disable-shared 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 --- diff --git a/README b/README index e449576a..1d731ab7 100644 --- 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: diff --git a/configure.ac b/configure.ac index f3bce8da..feee4e17 100644 --- a/configure.ac +++ b/configure.ac @@ -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".]),