From: Eqbal via lttng-dev <lttng-dev@lists.lttng.org>
To: "lttng-dev@lists.lttng.org" <lttng-dev@lists.lttng.org>
Subject: [lttng-dev] Statically linking babeltrace and lttng col
Date: Tue, 16 Mar 2021 13:41:25 -0700 [thread overview]
Message-ID: <CAPj=Wkj51Cg6OT2XOBHJB+zYei30NMML7ek8FGJ+EUsKiyecww@mail.gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 1151 bytes --]
Hi,
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
static).
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?
Thanks,
Eqbal
[-- Attachment #1.2: Type: text/html, Size: 2414 bytes --]
[-- Attachment #2: Type: text/plain, Size: 156 bytes --]
_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
reply other threads:[~2021-03-16 20:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAPj=Wkj51Cg6OT2XOBHJB+zYei30NMML7ek8FGJ+EUsKiyecww@mail.gmail.com' \
--to=lttng-dev@lists.lttng.org \
--cc=eqbalzee@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).