archive mirror
 help / color / mirror / Atom feed
* [lttng-dev] Statically linking babeltrace and lttng col
@ 2021-03-16 20:41 Eqbal via lttng-dev
  0 siblings, 0 replies; only message in thread
From: Eqbal via lttng-dev @ 2021-03-16 20:41 UTC (permalink / raw)
  To: lttng-dev

[-- Attachment #1.1: Type: text/plain, Size: 1151 bytes --]


I have an application where I want to statically link both babeltrace2
library including the built in plugins as well as lttng ctl library. I
couldn’t find much documentation regarding that. I know you can configure
babeltrace with —enable-built-in-plugins but that seems to just link the
eventual binary tool with the plugins.

I tried to statically link the individual plugin archives (ctf, text,
utils) using —whole-archive but I am getting an error message saying some
of the functions have multiple definitions in liblttng-ctl archive. E.g.,

“babeltrace-plugin-ctf.a (libctf_parser_la-lexer.o) : in function
‘yyrestart’: lexer.c:1875: multiple definition of ‘yyrestart’
liblttng-ctl.a (libfilter_la-filter-lexer.o):filter-lexer.c:(.text+0x17e5):
first defined here.

Without —whole-archive the build succeeds (I am using cmake) but the
plugins are missing in my app (when trying to use bt_plugin_find with

I am using lttng-tools stable-2.12 and babeltrace2 stable-2.0 from GitHub.

What do I need to do to properly link lttng-ctl, babeltrace2 and the built
in plugins?


[-- Attachment #1.2: Type: text/html, Size: 2414 bytes --]

[-- Attachment #2: Type: text/plain, Size: 156 bytes --]

lttng-dev mailing list

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-03-16 20:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-16 20:41 [lttng-dev] Statically linking babeltrace and lttng col Eqbal via lttng-dev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).