[lttng-dev] [LTTng-UST] Linking question with minimum example

Sebastien Boisvert sboisvert at gydle.com
Wed Jun 15 20:20:12 UTC 2016


Hi,

I am not able to link lttng-ust with one of my executable.
I prepared a mini example (103 lines) to help you understand my question.

The case has 2 .so shared libraries:

libaligner.so
libtester.so

and 2 executable:

aligner
tester

aligner is linked with libaligner.so
tester is linked with libaligner.so and libtester.so

If I only instrument libaligner.so, I have no problem. I have been using this for a while now.

If I also instrument libtester.so, then I get a linking problem.


I am not sure what is the best solution for this.






$ git clone https://github.com/sebhtml/lttng-ust-tracepoint_dlopen_ptr.git
$ mkdir lttng-ust-tracepoint_dlopen_ptr.build
$ cd lttng-ust-tracepoint_dlopen_ptr.build
$ cmake ../lttng-ust-tracepoint_dlopen_ptr
$ make
[ 40%] Built target aligner-lib
[ 60%] Built target aligner
[ 80%] Built target tester-lib
Linking CXX executable tester
libtester-lib.so: undefined reference to `tracepoint_dlopen_ptr'
collect2: error: ld returned 1 exit status
make[2]: *** [tester] Error 1
make[1]: *** [CMakeFiles/tester.dir/all] Error 2
make: *** [all] Error 2


More information about the lttng-dev mailing list