Skip to content
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

opentelemetry-cpp 1.8.3 build failure #2038

Closed
chenrui333 opened this issue Mar 9, 2023 · 8 comments
Closed

opentelemetry-cpp 1.8.3 build failure #2038

chenrui333 opened this issue Mar 9, 2023 · 8 comments

Comments

@chenrui333
Copy link

👋 trying to build the latest release, but run into some build issue. The error log is as below:

error build log
/tmp/opentelemetry-cpp-20230307-2861-1rrh1cf/opentelemetry-cpp-1.8.3/exporters/jaeger/src/TUDPTransport.cc:71:7: error: no type named 'close' in the global namespace
    ::THRIFT_CLOSESOCKET(socket_);
    ~~^
/opt/homebrew/include/thrift/transport/PlatformSocket.h:102:30: note: expanded from macro 'THRIFT_CLOSESOCKET'
#  define THRIFT_CLOSESOCKET close
                             ^

full build log, https://github.com/Homebrew/homebrew-core/actions/runs/4361014430/jobs/7624558826
relates to Homebrew/homebrew-core#125073

@lalitb
Copy link
Member

lalitb commented Mar 10, 2023

@chenrui333 - Looks like the thrift library version has got upgraded in homebrew, and it is messing up with the Jaeger exporter build for opentelemetry-cpp. The thrift version used by the opentelemetry-cpp CI pipeline is 0.14.1, while the version present in homebrew is 0.18.1.

Also, the Jaeger exporter has been deprecated in opentelemetry-cpp, and no new changes (including supporting the latest version of dependencies) would be entertained. The fix would be switch off the Jaeger exporter build from the opentelemetry-cpp by setting
"-DWITH_JAEGER=OFF",

here -
https://github.com/Homebrew/homebrew-core/blob/2e189b802bfacfadfc227fd7ce6f3d4748b54452/Formula/opentelemetry-cpp.rb#L35

The Jaeger exporter would be eventually removed from the opentelemetry-cpp, and there is already a active PR for it - #2031

@chenrui333
Copy link
Author

Also, the Jaeger exporter has been deprecated in opentelemetry-cpp, and no new changes (including supporting the latest version of dependencies) would be entertained. The fix would be switch off the Jaeger exporter build from the opentelemetry-cpp by setting
"-DWITH_JAEGER=OFF",

thanks for the pointer, gonna try it now. 👍

@chenrui333
Copy link
Author

Also the absel used by the project is outdated as well and needs to update the min c++ version to c++14 (per abseil support policy)

@lalitb
Copy link
Member

lalitb commented Mar 12, 2023

Also the absel used by the project is outdated as well and needs to update the min c++ version to c++14 (per abseil support policy)

Yes, it is planned - #1830

@valliscooper
Copy link

I also ran into a build issue when trying to move to 1.8.3:

opentelemetry-cpp/exporters/otlp/src/otlp_recordable_utils.cc: In static member function ‘static void opentelemetry::v1::exporter::otlp::OtlpRecordableUtils::PopulateRequest(opentelemetry::v1::nostd::span<std::unique_ptropentelemetry::v1::sdk::logs::Recordable >&, opentelemetry::proto::collector::logs::v1::ExportLogsServiceRequest*)’:
3pp/opentelemetry-cpp/exporters/otlp/src/otlp_recordable_utils.cc:129:32: error: ‘class opentelemetry::proto::common::v1::InstrumentationScope’ has no member named ‘add_attributes’
129 | proto_scope->add_attributes(), scope_attribute.first, scope_attribute.second);

cmake configured with WITH_LOGS_PREVIEW, WITH_METRICS_EXEMPLAR_PREVIEW and WITH_OTLP WITH_OTLP_GRPC because that's what I'm using currently.

@lalitb
Copy link
Member

lalitb commented Mar 15, 2023

I also ran into a build issue when trying to move to 1.8.3:

Can you check if you are using the latest version of otel-proto (v0.19.0). This should be the latest if you are using it from otel-cpp submodule.

@valliscooper
Copy link

opentelemetry-cpp/exporters/otlp/src/otlp_recordable_utils.cc:

I've updated the sub-modules and that seems to have fixed it. thanks a lot for the tip.

@marcalff
Copy link
Member

Closing as the issue is resolved.

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

No branches or pull requests

4 participants