Skip to contentSkip to conversation

configure: fix LTTng UST tracing backend detection

PATCH Applied Francis Deslauriers 2 participants 2 messages Nov 28, 2016 – Nov 29, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configure: fix LTTng UST tracing backend detection

The detection program needs to be linked with -ldl to build succesfully with recent versions of LTTng-UST.

We also need to add -ldl to the libs required to build the LTTng-UST backend (lttng_ust_libs).

---
 configure | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
configure +2 -2
index 5e66828..89df5c4 100755
@@ -4305,11 +4305,11 @@ if have_backend "ust"; then
 #include <lttng/tracepoint.h>
 int main(void) { return 0; }
 EOF
-  if compile_prog "" "" ; then
+  if compile_prog "" "-Wl,--no-as-needed -ldl" ; then
     if $pkg_config lttng-ust --exists; then
       lttng_ust_libs=$($pkg_config --libs lttng-ust)
     else
-      lttng_ust_libs="-llttng-ust"
+      lttng_ust_libs="-llttng-ust -ldl"
     fi
     if $pkg_config liburcu-bp --exists; then
       urcu_bp_libs=$($pkg_config --libs liburcu-bp)
Signature · 1 line
2.7.4
#1 lore raw
Quoted 10 lines · Francis Deslauriers

The detection program needs to be linked with -ldl to build succesfully with recent versions of LTTng-UST.

We also need to add -ldl to the libs required to build the LTTng-UST backend (lttng_ust_libs).

---
 configure | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Thanks, applied to my tracing tree:
https://github.com/stefanha/qemu/commits/tracing

Stefan