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

Internal abseil code compile error on gcc 14 #2723

Open
kpvdr opened this issue Jun 27, 2024 · 2 comments
Open

Internal abseil code compile error on gcc 14 #2723

kpvdr opened this issue Jun 27, 2024 · 2 comments
Labels
bug Something isn't working Stale triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@kpvdr
Copy link

kpvdr commented Jun 27, 2024

This issue is Compile errors occur when using gcc 14 #2591 reopened. This issue has been observed on opentelemetry-cpp versions 1.15.0 and 1.16.0.

A cmake build in which internal abseil code is used generates compile errors on gcc 14. Using an external abseil devel package avoids the problem. Using the internal abseil code on the previous version of gcc (13) works ok.

OS: Fedora 40 or Fedora rawhide. Most likely any OS which supports gcc 14 will show this issue. Ensure that the abseil and abseil-devel packages are NOT installed.

Run cmake with WITH_ABSEIL:BOOL=OFF or WITH_ABSEIL omitted as an option.
Run make. This will eventually fail with compile errors (the following is the first of many):

In file included from /home/jenkins/workspace/opentelemetry-cpp/opentelemetry-cpp-dist-rawhide-lr/build/BUILD/opentelemetry-cpp-1.16.0-build/opentelemetry-cpp-1.16.0/api/include/opentelemetry/nostd/./internal/absl/types/../utility/../base/internal/invoke.h:42,
                 from /home/jenkins/workspace/opentelemetry-cpp/opentelemetry-cpp-dist-rawhide-lr/build/BUILD/opentelemetry-cpp-1.16.0-build/opentelemetry-cpp-1.16.0/api/include/opentelemetry/nostd/./internal/absl/types/../utility/utility.h:50,
                 from /home/jenkins/workspace/opentelemetry-cpp/opentelemetry-cpp-dist-rawhide-lr/build/BUILD/opentelemetry-cpp-1.16.0-build/opentelemetry-cpp-1.16.0/api/include/opentelemetry/nostd/./internal/absl/types/variant.h:46,
                 from /home/jenkins/workspace/opentelemetry-cpp/opentelemetry-cpp-dist-rawhide-lr/build/BUILD/opentelemetry-cpp-1.16.0-build/opentelemetry-cpp-1.16.0/api/include/opentelemetry/nostd/variant.h:57,
                 from /home/jenkins/workspace/opentelemetry-cpp/opentelemetry-cpp-dist-rawhide-lr/build/BUILD/opentelemetry-cpp-1.16.0-build/opentelemetry-cpp-1.16.0/api/include/opentelemetry/common/attribute_value.h:10,
                 from /home/jenkins/workspace/opentelemetry-cpp/opentelemetry-cpp-dist-rawhide-lr/build/BUILD/opentelemetry-cpp-1.16.0-build/opentelemetry-cpp-1.16.0/api/include/opentelemetry/common/key_value_iterable.h:6,
                 from /home/jenkins/workspace/opentelemetry-cpp/opentelemetry-cpp-dist-rawhide-lr/build/BUILD/opentelemetry-cpp-1.16.0-build/opentelemetry-cpp-1.16.0/api/include/opentelemetry/common/key_value_iterable_view.h:9,
                 from /home/jenkins/workspace/opentelemetry-cpp/opentelemetry-cpp-dist-rawhide-lr/build/BUILD/opentelemetry-cpp-1.16.0-build/opentelemetry-cpp-1.16.0/api/include/opentelemetry/common/kv_properties.h:6,
                 from /home/jenkins/workspace/opentelemetry-cpp/opentelemetry-cpp-dist-rawhide-lr/build/BUILD/opentelemetry-cpp-1.16.0-build/opentelemetry-cpp-1.16.0/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_environment.h:6,
                 from /home/jenkins/workspace/opentelemetry-cpp/opentelemetry-cpp-dist-rawhide-lr/build/BUILD/opentelemetry-cpp-1.16.0-build/opentelemetry-cpp-1.16.0/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_grpc_client_options.h:6,
                 from /home/jenkins/workspace/opentelemetry-cpp/opentelemetry-cpp-dist-rawhide-lr/build/BUILD/opentelemetry-cpp-1.16.0-build/opentelemetry-cpp-1.16.0/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_grpc_client.h:14,
                 from /home/jenkins/workspace/opentelemetry-cpp/opentelemetry-cpp-dist-rawhide-lr/build/BUILD/opentelemetry-cpp-1.16.0-build/opentelemetry-cpp-1.16.0/exporters/otlp/src/otlp_grpc_client.cc:4:
/home/jenkins/workspace/opentelemetry-cpp/opentelemetry-cpp-dist-rawhide-lr/build/BUILD/opentelemetry-cpp-1.16.0-build/opentelemetry-cpp-1.16.0/api/include/opentelemetry/nostd/./internal/absl/types/../utility/../base/internal/../../meta/type_traits.h:81:12: error: parse error in template argument list
   81 |     : std::integral_constant<
      |            ^~~~~~~~~~~~~~~~~~
   82 |           bool, std::is_move_constructible<
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   83 |                     type_traits_internal::SingleMemberUnion<T>>::value &&
      |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   84 |                     absl::is_trivially_destructible<T>::value> {};
      |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/jenkins/workspace/opentelemetry-cpp/opentelemetry-cpp-dist-rawhide-lr/build/BUILD/opentelemetry-cpp-1.16.0-build/opentelemetry-cpp-1.16.0/api/include/opentelemetry/nostd/./internal/absl/types/../utility/../base/internal/../../meta/type_traits.h:84:55: error: expected ‘{’ before ‘::’ token
   84 |                     absl::is_trivially_destructible<T>::value> {};
      |                                                       ^~

Image: registry.fedoraproject.org/fedora:rawhide
Packages installed: git cmake make gcc-c++ rpm-build rpmlint createrepo_c tree zlib-static python3-requests libcurl-devel protobuf-devel protobuf-lite-devel json-devel c-ares-devel grpc-devel
cmake command:

%cmake \
    -DBUILD_TESTING:BOOL=OFF \
    -DBUILD_SHARED_LIBS:BOOL=ON \
    -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON \
    -DWITH_JAEGER:BOOL=OFF \
    -DWITH_OTLP_HTTP:BOOL=ON \
    -DWITH_OTLP_GRPC:BOOL=ON \
    -DWITH_PROMETHEUS:BOOL=OFF \
    -DWITH_ZIPKIN:BOOL=ON \
    -DWITH_EXAMPLES:BOOL=OFF \
    -DOTELCPP_PROTO_PATH:PATH=%{_builddir}/%{name}-%{version}/third_party/opentelemetry-proto \
    -DOTELCPP_VERSIONED_LIBS:BOOL=ON

@kpvdr kpvdr added the bug Something isn't working label Jun 27, 2024
@github-actions github-actions bot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Jun 27, 2024
@kpvdr
Copy link
Author

kpvdr commented Jun 27, 2024

Dockerfile.tar.gz
Dockerfile for build environment:

@marcalff marcalff added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jul 1, 2024
Copy link

github-actions bot commented Sep 2, 2024

This issue was marked as stale due to lack of activity.

@github-actions github-actions bot added the Stale label Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Stale triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

2 participants