[lttng-dev] [PATCH lttng-tools] Link test utilities against urcu-bp
Jon Bernard
jbernard at debian.org
Mon Dec 10 14:23:23 EST 2012
* Mathieu Desnoyers <mathieu.desnoyers at efficios.com> wrote:
> * Jon Bernard (jbernard at debian.org) wrote:
> > * David Goulet <dgoulet at efficios.com> wrote:
> > > Hi Jon,
> > >
> > > Can you enlighten us on what setup are you using?
> > >
> > > This symbol is used by lttng-ust which is linked with -lurcu-bp so
> > > lttng-tools should not have an issue here.
> > >
> > > Are you cross-compiling ?
> >
> > Nothing unusual, I'm building lttng-tools (version 2.1.8~rc8) from source
> > against URCU version 0.7.5 and UST version 2.1.0~rc2. During compilation
> > (configure with no additional parameters), I see the following:
> >
> > make[3]: Entering directory `tests/tools/streaming'
> > CC unit_tests.o
> > CCLD unit_tests
> > CC gen-ust-events.o
> > CC tp.o
> > CCLD gen-ust-events
> > /usr/bin/ld: tp.o: undefined reference to symbol 'rcu_dereference_sym'
> >
> > This link error occurs on each of the gen-events targets as there is no explicit
> > link against urcu-bp. I must have something different, as I'm sure you'd have
> > noticed this earlier. What additional information might you need?
>
> Hi Jon,
>
> It looks like something we already fixed in lttng-ust, but maybe the fix
> needs to be ported to tools also.
>
> See lttng-ust:
>
> commit faebb41808b9deda5ef5dfea0c035077407e7f9f
> Author: Christian Babeux <christian.babeux at efficios.com>
> Date: Thu Aug 2 18:55:11 2012 -0400
>
> Fix: Libtool fails to find dependent libraries when cross-compiling lttng-ust
>
> This problem arise when cross compiling and linking libraries with
> indirect libraries dependencies (such as liblttng-ust). This "bug" is
> caused by an upstream modification in the libtool package on Debian
> system. The libtool "link_all_deplibs" flag is set to "no" by default
> on linux targets (AFAIK, other distros set it to "unknown").
>
> The chosen solution is to detect such cases via the configure script
> and automagically patch the libtool.m4 by forcing the "link_all_deplibs"
> to "unknown".
>
> This fixup can be disabled with the appropriate configure flag:
>
> ./configure --disable-libtool-linkdep-fixup
>
> Sample configure output on affected systems:
>
> checking for occurence(s) of link_all_deplibs = no in
> ./config/libtool.m4... 3
> configure: WARNING: the detected libtool will not link all
> dependencies, forcing link_all_deplibs = unknown
>
> Fixes: #321
>
> Signed-off-by: Christian Babeux <christian.babeux at efficios.com>
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
>
> Thoughts ?
Yep, it seems to be an issue with Debian's libtool, I think cross-compiling is
coincidental. I'll prepare a port of this to tools, if someone doesn't beat me
to it.
Cheers,
--
Jon
More information about the lttng-dev
mailing list