From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id U5JALjMuyWMIQBoAWB0awg (envelope-from ) for ; Thu, 19 Jan 2023 06:49:07 -0500 Received: by simark.ca (Postfix, from userid 112) id B22AC1E128; Thu, 19 Jan 2023 06:49:07 -0500 (EST) Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=lists.lttng.org header.i=@lists.lttng.org header.a=rsa-sha256 header.s=default header.b=sh9twdhk; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-8.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 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 10B001E110 for ; Thu, 19 Jan 2023 06:49:07 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.lttng.org; s=default; t=1674128946; 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=sh9twdhkWQ+Yv3VO/EJXrCNDU3toQXRbUame+9bWhQ+lRzpeN9Llgy2DacmO6BAmn JIlAMKyLyvLlxt6YMcGHhyFuh9ucQkKFLHdOLK0eqZDIS9oqIS55CZffK6bpIeaOzw VSpQndxmDnmy0KPIVBZgrtiXMQqpqbDMQDG4aPPIXeHqPMua9+27nfd1W0qb5AMCJ3 iVHlLlllEJ3drWiit3s83ftwiwZTc7ZUe6e7b5CMpTExWQKnbBP8lNDq6eExD8Y5fy rMZRGPzIvQurpB4RFXxG00T8wj0rTA+10u3N/6vmOBoY9iFCZ6YQjo7leHo1ta/tRd onNhwehNz59Aw== Received: from lists-lttng01.efficios.com (localhost [IPv6:::1]) by lists.lttng.org (Postfix) with ESMTP id 4NyLWQ3Wrsz1SyV; 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==--