Link test utilities against urcu-bp
A message that is not in the archive (sent off-list or not yet received): 20121128151359.GA2051@quintessa
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 ?
Thanks a lot!
David
Jon Bernard:
Quoted 92 lines
The gen-ust-events utility used in several of the tests references the '
rcu_dereference_sym' symbol contained in urcu-bp. It is necessary to link against urcu-bp so that this symbol is resolved.Signed-off-by Jon Bernard <[email protected]>--- tests/tools/filtering/Makefile.am | 2 +- tests/tools/streaming/Makefile.am | 2 +- tests/ust/before-after/Makefile.am | 2 +- tests/ust/high-throughput/Makefile.am | 2 +- tests/ust/multi-session/Makefile.am | 2 +- tests/ust/nprocesses/Makefile.am | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-)tests/tools/filtering/Makefile.am +1
-1@@ -11,7 +11,7 @@ endif if HAVE_LIBLTTNG_UST_CTL noinst_PROGRAMS = gen-ust-events gen_ust_events_SOURCES = gen-ust-events.c tp.c tp.h -gen_ust_events_LDADD = -llttng-ust +gen_ust_events_LDADD = -llttng-ust -lurcu-bp endif noinst_SCRIPTS = runall unsupported-ops invalid-filters valid-filters babelstats.pltests/tools/streaming/Makefile.am +1
-1@@ -20,7 +20,7 @@ unit_tests_LDADD = $(LIBCOMMON) if HAVE_LIBLTTNG_UST_CTL noinst_PROGRAMS += gen-ust-events gen_ust_events_SOURCES = gen-ust-events.c tp.c tp.h -gen_ust_events_LDADD = -llttng-ust +gen_ust_events_LDADD = -llttng-ust -lurcu-bp endif noinst_SCRIPTS = runall run-ust run-kernel uri_switchtests/ust/before-after/Makefile.am +1
-1@@ -10,7 +10,7 @@ endif noinst_PROGRAMS = gen-nevents gen_nevents_SOURCES = gen-nevents.c tp.c ust_gen_nevents.h -gen_nevents_LDADD = -llttng-ust +gen_nevents_LDADD = -llttng-ust -lurcu-bp noinst_SCRIPTS = run EXTRA_DIST = runtests/ust/high-throughput/Makefile.am +1
-1@@ -10,7 +10,7 @@ endif noinst_PROGRAMS = gen-events gen_events_SOURCES = main.c tp.c tp.h -gen_events_LDADD = -llttng-ust +gen_events_LDADD = -llttng-ust -lurcu-bp noinst_SCRIPTS = run EXTRA_DIST = runtests/ust/multi-session/Makefile.am +1
-1@@ -10,7 +10,7 @@ endif noinst_PROGRAMS = gen-nevents gen_nevents_SOURCES = gen-nevents.c tp.c ust_gen_nevents.h -gen_nevents_LDADD = -llttng-ust +gen_nevents_LDADD = -llttng-ust -lurcu-bp noinst_SCRIPTS = run EXTRA_DIST = runtests/ust/nprocesses/Makefile.am +1
-1@@ -10,7 +10,7 @@ endif noinst_PROGRAMS = gen-events-time gen_events_time_SOURCES = gen-events-time.c tp.c ust_gen_event.h -gen_events_time_LDADD = -llttng-ust +gen_events_time_LDADD = -llttng-ust -lurcu-bp noinst_SCRIPTS = run EXTRA_DIST = run
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 8 lines · David Goulet
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?
Cheers
Signature · 1 line
Jon
A message that is not in the archive (sent off-list or not yet received): 20121128210845.GA30284@quintessa
Quoted 22 lines · * Jon Bernard ([email protected]) wrote:
Quoted 8 lines · David Goulet
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
CCLDunit_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'
Quoted 3 lines
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 <[email protected]> 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
Thoughts ?
Thanks,
Mathieu
Quoted 10 lines
Cheers
Signature · 6 lines
Jon _______________________________________________ lttng-dev mailing list [email protected] http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
Signature · 4 lines
Mathieu Desnoyers Operating System Efficiency R&D Consultant EfficiOS Inc. http://www.efficios.com
A message that is not in the archive (sent off-list or not yet received): 20121203140304.GA3546@Krystal
Quoted 61 lines · Mathieu Desnoyers
Quoted 22 lines · * Jon Bernard ([email protected]) wrote:
Quoted 8 lines · David Goulet
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
CCLDunit_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'Quoted 3 lines
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
faebb41808b9deda5ef5dfea0c035077407e7f9fAuthor: Christian Babeux <[email protected]> Date: Thu Aug 2 18:55:11 2012 -0400Fix: 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, forcinglink_all_deplibs= unknown
Quoted 6 lines
Fixes #321Signed-off-by Christian Babeux <[email protected]>Signed-off-by Mathieu Desnoyers <[email protected]>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,
Signature · 1 line
Jon