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> {};
| ^~
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):
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: