From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.lttng.org (lists.lttng.org [167.114.26.123]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6FEDAC5479D for ; Wed, 11 Jan 2023 13:08:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.lttng.org; s=default; t=1673442506; bh=hE2LLuvEbcUy4MMTNJacPoGapmub0yLsV43FmQvM4iQ=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=rm1VETim4I1+XpBOhy8wEWmTrWZ79mAMfiNGm3K2ArSEV5kQLoBzwUpr2EthoHzgN HPpJ5QTu+/KwPoAZC/oyxh4gQ7cTdI1hvQlJry/kaEvlM7584Zc4PcSN4Q48vbjNdi bzO0k8x4pKYpZmWHXyq3ZAS/+pxqfnSxC/uaZZ3acH8d3uM9o31K18p0NKuuOziVqe zKonhPN68Zdah3pMlRDfEPxrmz/49l5a3cO8h0jeb1elcYcSRiyB4pUkyqJyns2x0R 3U911wPoxeKqQCU6m1rTVOapydNJXHk45rsLEVaI3xEoUaG9EctMT2AgfPTrPNeqxd T+rzlSm6SgTyw== Received: from lists-lttng01.efficios.com (localhost [IPv6:::1]) by lists.lttng.org (Postfix) with ESMTP id 4NsSfd3yG7z1Pt1; Wed, 11 Jan 2023 08:08:25 -0500 (EST) Received: from smtp-fw-2101.amazon.com (smtp-fw-2101.amazon.com [72.21.196.25]) by lists.lttng.org (Postfix) with ESMTPS id 4NsSfb1HWpz1Pqb for ; Wed, 11 Jan 2023 08:08:23 -0500 (EST) X-IronPort-AV: E=Sophos;i="5.96,317,1665446400"; d="scan'208,217";a="281697419" Received: from iad12-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-iad-1d-m6i4x-00fceed5.us-east-1.amazon.com) ([10.43.8.6]) by smtp-border-fw-2101.iad2.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jan 2023 13:08:20 +0000 Received: from EX13D40EUB002.ant.amazon.com (iad12-ws-svc-p26-lb9-vlan3.iad.amazon.com [10.40.163.38]) by email-inbound-relay-iad-1d-m6i4x-00fceed5.us-east-1.amazon.com (Postfix) with ESMTPS id E023AA2B5B for ; Wed, 11 Jan 2023 13:08:19 +0000 (UTC) Received: from EX19D007EUB002.ant.amazon.com (10.252.51.117) by EX13D40EUB002.ant.amazon.com (10.43.166.32) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 11 Jan 2023 13:08:18 +0000 Received: from EX19D008EUC001.ant.amazon.com (10.252.51.165) by EX19D007EUB002.ant.amazon.com (10.252.51.117) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.7; Wed, 11 Jan 2023 13:08:18 +0000 Received: from EX19D008EUC001.ant.amazon.com ([fe80::9611:c62b:a7ba:aee1]) by EX19D008EUC001.ant.amazon.com ([fe80::9611:c62b:a7ba:aee1%3]) with mapi id 15.02.1118.020; Wed, 11 Jan 2023 13:08:18 +0000 To: "lttng-dev@lists.lttng.org" Thread-Topic: Statically linking LTTng to an application built with MUSL toolchain Thread-Index: AQHZJb1SQ/KpNoSeJ0qRplAhqvR1CA== Date: Wed, 11 Jan 2023 13:08:18 +0000 Message-ID: <7293b52e1e0d41dbbca7af1ab26fac0e@amazon.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.43.160.120] MIME-Version: 1.0 Subject: [lttng-dev] Statically linking LTTng to an application built with MUSL toolchain X-BeenThere: lttng-dev@lists.lttng.org X-Mailman-Version: 2.1.39 Precedence: list List-Id: LTTng development list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: "Mousa, Anas via lttng-dev" Reply-To: "Mousa, Anas" Content-Type: multipart/mixed; boundary="===============3544479305575570078==" Errors-To: lttng-dev-bounces@lists.lttng.org Sender: "lttng-dev" --===============3544479305575570078== Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_7293b52e1e0d41dbbca7af1ab26fac0eamazoncom_" --_000_7293b52e1e0d41dbbca7af1ab26fac0eamazoncom_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello, I've built the urcu, lttng-ust and lttng-tools with the musl toolchain, and= upon statically linking the application with the lttng-ust archive (just as documented here: https://lttng.org/docs/v2.13/#doc-buildin= g-tracepoint-providers-and-user-application), the trace-point constructors attempting to dlopen() of liblttng-ust-tracepo= int.so.1 fail as the debug logs show: lttng-ust-tracepoint [1581544]: dlopen() failed to find 'liblttng-ust-trace= point.so.1', tracepoints in this binary won't be registered. (at addr=3D0x4= 00490 in lttng_ust_tracepoints_print_disabled_message() at /usr/aarch64-unk= nown-linux-musl/sys-root//include/lttng/tracepoint.h:426) although that shared object does exist in the system, and dlerror() returne= d Dynamic loading not supported (Note: When linking dynamically, the dlopen() succeeds but other platform-d= ependent issues arise). I need to link statically rather than dynamically, do statically linked pro= grams using musl libc support dlopen()? if there's no such support, is there any way around? Would appreciate any input, Best Regards, Anas. --_000_7293b52e1e0d41dbbca7af1ab26fac0eamazoncom_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

Hello,


I've built the urcu, lttng-ust and lttng-tools with the musl toolchain, and= upon statically linking the application with the lttng-ust

archive (just as documented here: https://lttng.org/docs/v2.13/#doc-buildin= g-tracepoint-providers-and-user-application),

the trace-point constructors attempting to dlopen() of liblttng-ust= -tracepoint.so.1  fail as the debug logs show:

lttng-ust-tracepoint [1581544]: dlopen() failed =
to find 'liblttng-ust-tracepoint.so.1', tracepoints in this binary won't be=
 registered. (at addr=3D0x400490 in lttng_ust_tracepoints_print_disabled_me=
ssage() at /usr/aarch64-unknown-linux-musl/sys-root//include/lttng/tracepoi=
nt.h:426)

although that shared object does exist in the system, and dlerror() re= turned Dynamic loading not supported 

(Note: When linking dynamically, the dlopen() succeeds bu= t other platform-dependent issues arise).

I need to link statically rather than dynamically, do statically linked pro= grams using musl libc support dlopen()?

if there's no such support, is there any way around?


Would appreciate any input,

Best Regards,

Anas.


--_000_7293b52e1e0d41dbbca7af1ab26fac0eamazoncom_-- --===============3544479305575570078== 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 --===============3544479305575570078==--