-
Notifications
You must be signed in to change notification settings - Fork 410
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jaeger exporter fails to build with Thrift 0.14.1 as bswap_* is actually a macro #875
Comments
Interesting. It works fine in our CI with Thrift 0.14.1. Not sure, but maybe it's because of different version of $ dpkg -s libc6-dev:amd64 | grep Version
Version: 2.31-0ubuntu9.2 Your suggestion looks good - to create the bswap_64 function only if the macro is not defined. Or maybe rename the function to something unique. |
I'd prefer we rename it with some OpenTelemetry prefix, in case the system provided one doesn't provide the required semantics for us. I could take care of this. |
Ah, thanks, I was going to put up a PR with an #ifndef guard, but I realize that won't work since then you can't use it as |
And sorry, it's because my libc comes from conda
|
@lidavidm could you rename the function name to either I thought about it when adding it and put it under namespace which could avoid any potential link conflict, but missed the macro expansion. |
Describe your environment
Ubuntu 18.04 x86_64, OpenTelemetry main @ ae6d810
Thrift 0.14.1 from conda-forge
Steps to reproduce
Build with
-DWITH_JAEGER=ON
:What is the expected behavior?
OpenTelemetry should build.
What is the actual behavior?
OpenTelemetry fails to build since bswap_64 is actually a macro that gets expanded.
Additional context
From what I can see,
opentelemetry/exporters/jaeger/recordable.h
includesjaeger_types.h
. That includesthrift/TBase.h
, which in turn includesthrift/protocol/TProtocol.h
. At least on my system, this then includes byteswap.h which defines bswap_64 as a macro (note I am using a Conda environment). This then breaks the definition in OpenTelemetry's headers. Probably there should be an #ifdef guard (though it's rather unfortunate that Thrift leaks its definitions like this).The text was updated successfully, but these errors were encountered: