[lttng-dev] Statically linking LTTng to an application built with MUSL toolchain
yehuday at amazon.com
Thu Jan 19 06:48:59 EST 2023
Appreciate your comments on this
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 : 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,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the lttng-dev