-
Notifications
You must be signed in to change notification settings - Fork 115
OpenTracing in Vcpkg #105
Comments
Did you try building with |
Yes, I tried that. Using this command:
That does this definitions in a modified portfile
I got this errors (same with BUILD_DYNAMIC_LOADING=ON):
Using Thanks, |
My guess is it has something to do with this OPENTRACING_API macro applied before the variable declarations. Could you investigate to see if it should be set to something else for static builds? I'm not very familiar with building for windows. cc @mdouaihy |
I will... |
Found the problem. The CMakeLists.txt in mocktracer/test needs OPENTRACING_MOCK_TRACER_STATIC. I will open an PR. |
I will wait for a OpenTracing release to modify the vcpkg portfile. If you don't mind I will keep this case open as a remainder :) |
sorry for my late comment. Note that linking statically OpenTracing can cause unexpected behavior: The Global Tracer will be defined in each library/binary linking statically with OpenTracing. |
The current settings in vcpkg allows the compilation of shared and shared and static versions. The changes in the PR was to solve a problem in the CMakefiles.txt that prevents the static building alone. But, if static has no sense, then better just disable it, either in this project or in the vcpkg repo. Just let me know... |
Static causes problems only for the Global Tracer only on Windows. Maybe the user isn't using the Global Tracer. @rnburn, do you think the static build should be prevented for that reason? |
More than an issue an announcement :)
I have added OpenTracing to vcpkg (C++ Library Manager) repository via this merged PR: microsoft/vcpkg#5974
It works in Windows and Linux (probably in macOS but vcpkg doesn't run in macOS yet).
During the porting I have found two problems:
Install the package with:
Then use it in cmake (dynamic version):
or (static version):
The text was updated successfully, but these errors were encountered: