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

[BUILD] Opentelemetry C++20 extension causes Envoy build issue #32660

Closed
shiponcs opened this issue Mar 1, 2024 · 4 comments
Closed

[BUILD] Opentelemetry C++20 extension causes Envoy build issue #32660

shiponcs opened this issue Mar 1, 2024 · 4 comments
Labels
area/build stale stalebot believes this issue/PR has not been touched recently

Comments

@shiponcs
Copy link
Contributor

shiponcs commented Mar 1, 2024

Title: [BUILD] Opentelemetry C++20 extension causes Envoy build issue

Description:
Envoy build failed because of Opentelemetry C++20 requirement.

$ bazel build envoy
ERROR: /source/source/extensions/tracers/opentelemetry/BUILD:14:19: Compiling source/extensions/tracers/opentelemetry/config.cc failed: (Exit 1): clang-14 failed: error executing command (from target //source/extensions/tracers/opentelemetry:config) /opt/llvm/bin/clang-14 -U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -Wunused-but-set-parameter -Wno-free-nonheap-object -fcolor-diagnostics -fno-omit-frame-pointer ... (remaining 239 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
In file included from source/extensions/tracers/opentelemetry/config.cc:8:
In file included from ./source/extensions/tracers/opentelemetry/opentelemetry_tracer_impl.h:17:
In file included from bazel-out/k8-fastbuild/bin/external/io_opentelemetry_cpp/api/_virtual_includes/api/opentelemetry/logs/provider.h:10:
In file included from bazel-out/k8-fastbuild/bin/external/io_opentelemetry_cpp/api/_virtual_includes/api/opentelemetry/logs/noop.h:11:
In file included from bazel-out/k8-fastbuild/bin/external/io_opentelemetry_cpp/api/_virtual_includes/api/opentelemetry/logs/event_logger.h:7:
bazel-out/k8-fastbuild/bin/external/io_opentelemetry_cpp/api/_virtual_includes/api/opentelemetry/logs/logger.h:261:5: error: use of the 'likely' attribute is a C++20 extension [-Werror,-Wc++20-attribute-extensions]
    OPENTELEMETRY_LIKELY_IF(Enabled(severity) == false) { return false; }
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bazel-out/k8-fastbuild/bin/external/io_opentelemetry_cpp/api/_virtual_includes/api/opentelemetry/common/macros.h:12:11: note: expanded from macro 'OPENTELEMETRY_LIKELY_IF'
        [[likely]]
        ~~^~~~~~~~
In file included from source/extensions/tracers/opentelemetry/config.cc:8:
In file included from ./source/extensions/tracers/opentelemetry/opentelemetry_tracer_impl.h:17:
In file included from bazel-out/k8-fastbuild/bin/external/io_opentelemetry_cpp/api/_virtual_includes/api/opentelemetry/logs/provider.h:10:
In file included from bazel-out/k8-fastbuild/bin/external/io_opentelemetry_cpp/api/_virtual_includes/api/opentelemetry/logs/noop.h:11:
In file included from bazel-out/k8-fastbuild/bin/external/io_opentelemetry_cpp/api/_virtual_includes/api/opentelemetry/logs/event_logger.h:7:
bazel-out/k8-fastbuild/bin/external/io_opentelemetry_cpp/api/_virtual_includes/api/opentelemetry/logs/logger.h:267:5: error: use of the 'likely' attribute is a C++20 extension [-Werror,-Wc++20-attribute-extensions]
    OPENTELEMETRY_LIKELY_IF(Enabled(severity) == false) { return false; }
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bazel-out/k8-fastbuild/bin/external/io_opentelemetry_cpp/api/_virtual_includes/api/opentelemetry/common/macros.h:12:11: note: expanded from macro 'OPENTELEMETRY_LIKELY_IF'
        [[likely]]
        ~~^~~~~~~~
2 errors generated.
Target //source/exe:envoy-static failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 2625.963s, Critical Path: 76.06s
INFO: 14619 processes: 6232 internal, 1 local, 8385 processwrapper-sandbox, 1 worker.
FAILED: Build did NOT complete successfully

Upstream issue: open-telemetry/opentelemetry-cpp#2572

@shiponcs shiponcs added the triage Issue requires triage label Mar 1, 2024
@mattklein123 mattklein123 added area/build and removed triage Issue requires triage labels Mar 1, 2024
@mattklein123
Copy link
Member

cc @kyessenov who is looking into C++20 issues.

@kyessenov
Copy link
Contributor

We just switched to C++20 for most builds. Can you try again?

@shiponcs
Copy link
Contributor Author

shiponcs commented Mar 5, 2024

@kyessenov thanks. It worked.

Copy link

github-actions bot commented Apr 4, 2024

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale stalebot believes this issue/PR has not been touched recently label Apr 4, 2024
@shiponcs shiponcs closed this as completed Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build stale stalebot believes this issue/PR has not been touched recently
Projects
None yet
Development

No branches or pull requests

3 participants