Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.

Link dynamic_load-example against -pthread #125

Open
RValner opened this issue Jan 29, 2020 · 0 comments
Open

Link dynamic_load-example against -pthread #125

RValner opened this issue Jan 29, 2020 · 0 comments

Comments

@RValner
Copy link

RValner commented Jan 29, 2020

I was trying to test the dynamic_load-example with jaeger tracer in libjaegertracing.so and ended up with a segmentation fault. When I tested dynamic_load-example with libopentracing_mocktracer.so then everything worked as expected.

gdb indicated, that the segmentation fault occurs right when libjaegertracing.so tries to create a std::thread that is related to reporting the traces. The problem is solved if I link the dynamic_load-example against -pthread in the CMakeLists.txt:

target_link_libraries(dynamic_load-example opentracing -pthread)

This is likely a tracing library specific problem but it took a significant amount of time to realize the underlying issue, so would it be reasonable to add -pthread to the CMakeLists.txt
when building on unix?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant