[lttng-dev] Statically linking LTTng to an application built with MUSL toolchain
anasmous at amazon.com
Wed Jan 11 08:08:18 EST 2023
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