[ltt-dev] Trying to compile lttng-tools

Daniel U. Thibault daniel.thibault at drdc-rddc.gc.ca
Thu May 5 12:32:42 EDT 2011


I'm trying to compile the latest lttng-tools (lttng-tools-9624336, 2011-05-04)
and keep running into a weird error.

So far, ltt-control (cdfcd01, 2011-04-13), userspace-rcu 0.5.4 and ust 0.12 are
downloaded from git.lttng.org, compiled and installed.  I download
lttng-tools-9624336 from the same source, run ./bootstrap without any unusual
results, but ./configure fails with:

checking for ustctl_connect_pid in -lustctl... no
configure: error: Cannot find libustctl. Use LDFLAGS=-Ldir to specify its
location.

The config.log hints at the problem's source:

configure:4421: checking for ustctl_connect_pid in -lustctl
configure:4446: gcc -o conftest -g -O2   conftest.c -lustctl  -luuid -lpopt
-lpthread  >&5
//usr/local/lib/libustctl.so: undefined reference to `ust_safe_snprintf'
collect2: ld returned 1 exit status

libustctl (.so.0.0.0, .so.0, .so, .a, .la) is in /usr/local/lib/ and contains
'ust_safe_snprintf' in its hex code.  Recall that UST 0.12 compiled without a
hitch ('ust_safe_snprintf' appears in usterr.h, ust_snprintf.h, snprintf.c, and
tests/snprintf/prog.c, as fas as source goes).  Well, not completely true: for
some weird reason, /usr/local/lib/libust.so ended up containing these four
lines:

/* GNU ld script
   Use the shared library, but the link with initializer too */
OUTPUT_FORMAT(elf64-x86-64)
GROUP ( libust.so.0 libust-initializer.o )

I replaced it with the expected symbolic link to /usr/local/lib/libust.so.0.0.0
(the lttng-tools problem is the same before and after this fix)

If it matters, I'm running a virtual Ubuntu 10.10 64-bits machine.

I'm at a loss as to how to fix this, and there's nothing on the Web about this
configure error (except a short thread on this very mailing list).





More information about the lttng-dev mailing list