[lttng-dev] statically linking liblttng

pedro pinto pedro.e.pinto at gmail.com
Mon Jan 29 17:14:26 UTC 2018


Thank you Mathieu.

On Mon, Jan 29, 2018 at 12:00 PM, Mathieu Desnoyers <
mathieu.desnoyers at efficios.com> wrote:

> ----- On Jan 29, 2018, at 8:56 AM, pedro pinto <pedro.e.pinto at gmail.com>
> wrote:
>
> Hi there. I would like to instrument a C++ statically linked application
> using the lttng static libraries (i.e. libllttng-ust.a, etc). To try to get
> this working I took the quick start example and changed it to use the
> following link command line:
>
> gcc -o hello hello.o hello-tp.o -Wl,-Bstatic -llttng-ust
> -llttng-ust-tracepoint -lurcu-bp -lurcu-cds -Wl,-Bdynamic -lrt -ldl
> -pthread
>
> This does not return any errors but the resulting trace is empty. I was
> able to get a trace using the liblttng shared object though.
>
> Is it possible to statically link liblttng ? I am using v2.9.5 of lttng
>
> Static linking of lttng-ust is not supported. For a start, the library
> constructors are not
> executed in a statically linked library.
>
> Thanks,
>
> Mathieu
>
>
>
>
> Thanks in advance!
>
> -pp
>
>
>
>
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>
>
> --
> Mathieu Desnoyers
> EfficiOS Inc.
> http://www.efficios.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.lttng.org/pipermail/lttng-dev/attachments/20180129/bc8be9a4/attachment-0001.html>


More information about the lttng-dev mailing list