lttng-dev Archive mirror
 help / color / mirror / Atom feed
From: "Mousa, Anas via lttng-dev" <lttng-dev@lists.lttng.org>
To: "lttng-dev@lists.lttng.org" <lttng-dev@lists.lttng.org>
Subject: [lttng-dev] Statically linking LTTng to an application built with MUSL toolchain
Date: Wed, 11 Jan 2023 13:08:18 +0000	[thread overview]
Message-ID: <7293b52e1e0d41dbbca7af1ab26fac0e@amazon.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1120 bytes --]

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-building-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=0x400490 in lttng_ust_tracepoints_print_disabled_message() at /usr/aarch64-unknown-linux-musl/sys-root//include/lttng/tracepoint.h:426)

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

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

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

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


Would appreciate any input,

Best Regards,

Anas.


[-- Attachment #1.2: Type: text/html, Size: 3488 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:[~2023-01-11 13:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-11 13:08 Mousa, Anas via lttng-dev [this message]
2023-01-19 11:48 ` [lttng-dev] Statically linking LTTng to an application built with MUSL toolchain Yitschak, Yehuda via lttng-dev

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=7293b52e1e0d41dbbca7af1ab26fac0e@amazon.com \
    --to=lttng-dev@lists.lttng.org \
    --cc=anasmous@amazon.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 read-only IMAP folder(s) and NNTP newsgroup(s).