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 A1E61C004D4 for ; Thu, 19 Jan 2023 11:49:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.lttng.org; s=default; t=1674128947; bh=FigV9sk2iJwxgOfOOxRr9Lfnrcsf3eDHu+rT+8x2WVw=; h=To:Date:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=sIEI6kthzvS3vRYpQg8pclfbR5ykM1CoomhJ+G+lAXgqNQoUij6TSKlKZCR+C09T/ YGtwM1EwIIuG7dz9Kwwkla8rhXHczMR8c/HlkLg3vD3rTvCFEG3LTK5UmbfWest2sv 9nPvmDtdQ4sIWLCceqn0xYKrmnTm6+hfyinLV0wmKA0roZ1MEPx+u73Ycd0CdHtKaH C0yhQzj9Jno9ZWGDSUAIRLYmlanB7XGMLnW1sAPzavxtnT5LxuoJ6dcKnK9YaV8cR9 gtmfXMqIaRE36NKsbrHrqVdvdlS0rw4pnRsM0Q9omuFzIISCRlCH9DYAYUs5533r1k pZ+qmTSOIJM7A== Received: from lists-lttng01.efficios.com (localhost [IPv6:::1]) by lists.lttng.org (Postfix) with ESMTP id 4NyLWQ5mxLz1Sfh; Thu, 19 Jan 2023 06:49:06 -0500 (EST) Received: from smtp-fw-6002.amazon.com (smtp-fw-6002.amazon.com [52.95.49.90]) by lists.lttng.org (Postfix) with ESMTPS id 4NyLWN6dHCz1SyT for ; Thu, 19 Jan 2023 06:49:04 -0500 (EST) X-IronPort-AV: E=Sophos;i="5.97,229,1669075200"; d="scan'208,217";a="288220607" Received: from iad12-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-pdx-2c-m6i4x-b1c0e1d0.us-west-2.amazon.com) ([10.43.8.6]) by smtp-border-fw-6002.iad6.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jan 2023 11:49:01 +0000 Received: from EX13D39EUA001.ant.amazon.com (pdx1-ws-svc-p6-lb9-vlan3.pdx.amazon.com [10.236.137.198]) by email-inbound-relay-pdx-2c-m6i4x-b1c0e1d0.us-west-2.amazon.com (Postfix) with ESMTPS id 9520F811AC for ; Thu, 19 Jan 2023 11:49:00 +0000 (UTC) Received: from EX19D008EUA001.ant.amazon.com (10.252.50.34) by EX13D39EUA001.ant.amazon.com (10.43.165.90) with Microsoft SMTP Server (TLS) id 15.0.1497.45; Thu, 19 Jan 2023 11:48:59 +0000 Received: from EX19D007EUA004.ant.amazon.com (10.252.50.76) by EX19D008EUA001.ant.amazon.com (10.252.50.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.7; Thu, 19 Jan 2023 11:48:59 +0000 Received: from EX19D007EUA004.ant.amazon.com ([fe80::d9f5:ab17:b5c0:4f4d]) by EX19D007EUA004.ant.amazon.com ([fe80::d9f5:ab17:b5c0:4f4d%3]) with mapi id 15.02.1118.020; Thu, 19 Jan 2023 11:48:59 +0000 To: "Mousa, Anas" , "lttng-dev@lists.lttng.org" Thread-Topic: Statically linking LTTng to an application built with MUSL toolchain Thread-Index: AQHZJb1SQ/KpNoSeJ0qRplAhqvR1CK6lq+pg Date: Thu, 19 Jan 2023 11:48:59 +0000 Message-ID: References: <7293b52e1e0d41dbbca7af1ab26fac0e@amazon.com> In-Reply-To: <7293b52e1e0d41dbbca7af1ab26fac0e@amazon.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.85.143.174] MIME-Version: 1.0 Subject: Re: [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: "Yitschak, Yehuda via lttng-dev" Reply-To: "Yitschak, Yehuda" Content-Type: multipart/mixed; boundary="===============7698054439622581158==" Errors-To: lttng-dev-bounces@lists.lttng.org Sender: "lttng-dev" --===============7698054439622581158== Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_a421e860877b4936be3ee718deac393aamazoncom_" --_000_a421e860877b4936be3ee718deac393aamazoncom_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Bumping. Appreciate your comments on this Yehuda 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_a421e860877b4936be3ee718deac393aamazoncom_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Bumping.

Appreciate your comments on this

Yehuda

 

 

Hello,

 

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

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

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

lttng-ust-tracepoint [1581544]: dlopen() failed to find 'libl=
ttng-ust-tracepoint.so.1', tracepoints in this binary won't be registered. =
(at addr=3D0x400490 in lttng_ust_tracepoints_print_disabled_message() at /u=
sr/aarch64-unknown-linux-musl/sys-root//include/lttng/tracepoint.h:426)

although that shared object= does exist in the system, and dlerror() returned Dynamic load= ing not supported 

(Note: When linking dy= namically, the dlopen() succeeds but other platform-dependent issues arise)= .

I need to link statically r= ather than dynamically, do statically linked programs using musl libc suppo= rt dlopen()?

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

 

Would appreciate any input,=

Best Regards,

Anas.

&n= bsp;

--_000_a421e860877b4936be3ee718deac393aamazoncom_-- --===============7698054439622581158== 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 --===============7698054439622581158==--