From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id G7uQAQQYUWCHZgAAWB0awg (envelope-from ) for ; Tue, 16 Mar 2021 16:41:40 -0400 Received: by simark.ca (Postfix, from userid 112) id ECCBA1EF78; Tue, 16 Mar 2021 16:41:39 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HTML_MESSAGE,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.lttng.org (lists.lttng.org [167.114.26.123]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 460EF1E590 for ; Tue, 16 Mar 2021 16:41:39 -0400 (EDT) Received: from lists-lttng01.efficios.com (localhost [IPv6:::1]) by lists.lttng.org (Postfix) with ESMTP id 4F0QDy4ZPGzHvZ; Tue, 16 Mar 2021 16:41:38 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.lttng.org; s=default; t=1615927298; bh=BFtP/rZj42SnQCn2VywNME5+emQKJsdv9MhCNYqSUXM=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=wI3VRTCpqTcBGnbzQLpcip8UtJRc7PFqpGnWLljkR4XxFTL5xRlYk2lBBpFAUNBhm HOuBI9fbm/HXXiw/S6U5ryUX2bkHdLG1MK09A0sJX3aCyowO0Mj0YaNYLWUjSAKgoC 4zBw4ckJLOcalDLb7ayj53jhAUHtv19bGQIQ5jfc5DQGF40LwIA+cVQlPcmQnO170/ Gwp9OXUXMoZX71oUpW/Y/lxUe89/XI2mOsYux3KsAGM9+/pDLNQro6T1G3G5fIgF/o eL6Cq0ka/lq5bwWpzG2XIbicYwtY94w9QgiYR8OL8Jo99VEgkQCh8ZnilsY/xhntAC mOavmEy0o2Jjw== Received: from mail-ot1-x32c.google.com (mail-ot1-x32c.google.com [IPv6:2607:f8b0:4864:20::32c]) by lists.lttng.org (Postfix) with ESMTPS id 4F0QDx1fTBzHrx for ; Tue, 16 Mar 2021 16:41:37 -0400 (EDT) Received: by mail-ot1-x32c.google.com with SMTP id 31-20020a9d00220000b02901b64b9b50b1so7582018ota.9 for ; Tue, 16 Mar 2021 13:41:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=2R23isGxvlpl5urq8GpzTUnM94l/xJJCDJx/lNT+ObY=; b=m0xlihjqugd0CxVzF21DRcOKwhTdO9Ex9th7XLcCzlaI/8cuGmvJO8K7onc6DrcFMq xB3QcQJkBqOmdELIOs5Ela22eHfbSCM7Zvn2WDlZMWQxn5eBjQxABAsID8UQYAqQtTYb oouE2be1UCQer3lCgM8EVOaW66I2HD9Ik98LXqWrVTizR0Aptk/2aHhNLLJiZ/OIumAH SeFi82vJfm2CvobJ5dy56uxclBT6UMozs5BD9qT8/N0Se4/VUxeeSlylOcp6spqsApj7 yHeVV5OpMzpNac2EpyN24cIMPeoZhGZumfBjV8qNXWQU/vcM6Xb8Nh63iPd3Kp+P5JZo 5iNA== X-Gm-Message-State: AOAM5329JRfZ16OB5E5BjR13iGvvgNMncXA5zYxqptlFOkuIE30YhKAE PyFCL3IQtgVyopALj4A8CL7GHAV1D6w0MAzGUcZsIBlt X-Google-Smtp-Source: ABdhPJxPT2kULWPZ5MQyZ+IG2Ktqe5c7gjNi6ISfadUZgGXE+ylptxqEzj8hXE6mf+GIfOOKvPEFrXu4cmDkyfVD8A8= X-Received: by 2002:a9d:12c6:: with SMTP id g64mr525417otg.226.1615927296103; Tue, 16 Mar 2021 13:41:36 -0700 (PDT) MIME-Version: 1.0 Date: Tue, 16 Mar 2021 13:41:25 -0700 Message-ID: To: "lttng-dev@lists.lttng.org" Subject: [lttng-dev] Statically linking babeltrace and lttng col X-BeenThere: lttng-dev@lists.lttng.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: LTTng development list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Eqbal via lttng-dev Reply-To: Eqbal Content-Type: multipart/mixed; boundary="===============2267538925142715081==" Errors-To: lttng-dev-bounces@lists.lttng.org Sender: "lttng-dev" --===============2267538925142715081== Content-Type: multipart/alternative; boundary="000000000000779ad705bdad6440" --000000000000779ad705bdad6440 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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=E2=80=99t find much documentation regarding that. I know you can con= figure babeltrace with =E2=80=94enable-built-in-plugins but that seems to just lin= k the eventual binary tool with the plugins. I tried to statically link the individual plugin archives (ctf, text, utils) using =E2=80=94whole-archive but I am getting an error message sayin= g some of the functions have multiple definitions in liblttng-ctl archive. E.g., =E2=80=9Cbabeltrace-plugin-ctf.a (libctf_parser_la-lexer.o) : in function =E2=80=98yyrestart=E2=80=99: lexer.c:1875: multiple definition of =E2=80=98= yyrestart=E2=80=99 liblttng-ctl.a (libfilter_la-filter-lexer.o):filter-lexer.c:(.text+0x17e5): first defined here. Without =E2=80=94whole-archive the build succeeds (I am using cmake) but th= e 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 --000000000000779ad705bdad6440 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
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=E2=80=99t find much document= ation regarding that. I know you can configure babeltrace with =E2=80=94ena= ble-built-in-plugins but that seems to just link the eventual binary tool w= ith the plugins.
=C2=A0
I tried to statically link the individual plugin archives (ctf, text, util= s) using =E2=80=94whole-archive but I am getting an error=C2=A0message sayi= ng some of the functions have multiple definitions in liblttng-ctl archive.= E.g.,=C2=A0

=E2=80=9Cbabeltrace-plugin-ctf.a (lib= ctf_parser_la-lexer.o) : in function =E2=80=98yyrestart=E2=80=99: lexer.c:1= 875: multiple definition of =E2=80=98yyrestart=E2=80=99 liblttng-ctl.a (lib= filter_la-filter-lexer.o):filter-lexer.c:(.text+0x17e5): first defined here= .

Without =E2=80=94whole-archive the build succeed= s (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.

<= /div>
What do I need to do to properly link lttng-ctl, babeltrace2 and = the built in plugins?

Thanks,
Eqbal


--000000000000779ad705bdad6440-- --===============2267538925142715081== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ lttng-dev mailing list lttng-dev@lists.lttng.org https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev --===============2267538925142715081==--