Skip to content

Can not build with legacy toolchain and type traits are not the same when enable/disable C++11's STL. #3273

@owent

Description

@owent

Describe your environment

OS: Linux
Compiler: gcc 4.8

What is the actual behavior?

Problem 1:

[ 52%] Building CXX object ext/src/http/client/curl/CMakeFiles/opentelemetry_http_client_curl.dir/http_client_curl.cc.o
cd /home/runner/work/cmake-toolset/cmake-toolset/test/build_jobs_dir/_deps/opentelemetry_cpp-v1.19.0/linux-x86_64-gnu-4/ext/src/http/client/curl && /usr/bin/g++-4.8 -DCURL_STATICLIB -DENABLE_ASYNC_EXPORT -DENABLE_METRICS_EXEMPLAR_PREVIEW -DENABLE_OTLP_COMPRESSION_PREVIEW -DENABLE_OTLP_GRPC_SSL_MTLS_PREVIEW -DHAVE_ABSEIL -DOPENTELEMETRY_ABI_VERSION_NO=1 -D__CLANG_SUPPORT_DYN_ANNOTATION__ -I/home/runner/work/cmake-toolset/cmake-toolset/test/build_jobs_dir/_deps/opentelemetry_cpp-v1.19.0/linux-x86_64-gnu-4/generated/third_party/opentelemetry-proto -I/home/runner/work/cmake-toolset/cmake-toolset/test/third_party/packages/opentelemetry-cpp-v1.19.0/api/include -I/home/runner/work/cmake-toolset/cmake-toolset/test/third_party/packages/opentelemetry-cpp-v1.19.0/sdk/include -I/home/runner/work/cmake-toolset/cmake-toolset/test/third_party/packages/opentelemetry-cpp-v1.19.0/sdk -I/home/runner/work/cmake-toolset/cmake-toolset/test/third_party/packages/opentelemetry-cpp-v1.19.0/ext/include -isystem /home/runner/work/cmake-toolset/cmake-toolset/test/third_party/install/linux-x86_64-gnu-4/include -fexceptions -frtti -pthread -O2 -g -DNDEBUG -ggdb -std=gnu++1y -fPIC -Wno-error=deprecated-declarations -MD -MT ext/src/http/client/curl/CMakeFiles/opentelemetry_http_client_curl.dir/http_client_curl.cc.o -MF CMakeFiles/opentelemetry_http_client_curl.dir/http_client_curl.cc.o.d -o CMakeFiles/opentelemetry_http_client_curl.dir/http_client_curl.cc.o -c /home/runner/work/cmake-toolset/cmake-toolset/test/third_party/packages/opentelemetry-cpp-v1.19.0/ext/src/http/client/curl/http_client_curl.cc
/home/runner/work/cmake-toolset/cmake-toolset/test/third_party/packages/opentelemetry-cpp-v1.19.0/ext/src/http/client/curl/http_client_curl.cc: In function ‘int opentelemetry::v1::ext::http::client::curl::deflateInPlace(z_stream*, unsigned char*, uint32_t, uint32_t*)’:
/home/runner/work/cmake-toolset/cmake-toolset/test/third_party/packages/opentelemetry-cpp-v1.19.0/ext/src/http/client/curl/http_client_curl.cc:119:27: error: expected type-specifier
   auto hold = static_cast<std::remove_const_t<decltype(z_stream::next_in)>>(
                           ^
/home/runner/work/cmake-toolset/cmake-toolset/test/third_party/packages/opentelemetry-cpp-v1.19.0/ext/src/http/client/curl/http_client_curl.cc:119:27: error: expected ‘>’
/home/runner/work/cmake-toolset/cmake-toolset/test/third_party/packages/opentelemetry-cpp-v1.19.0/ext/src/http/client/curl/http_client_curl.cc:119:27: error: expected ‘(’
/home/runner/work/cmake-toolset/cmake-toolset/test/third_party/packages/opentelemetry-cpp-v1.19.0/ext/src/http/client/curl/http_client_curl.cc:119:27: error: ‘remove_const_t’ is not a member of ‘std’
/home/runner/work/cmake-toolset/cmake-toolset/test/third_party/packages/opentelemetry-cpp-v1.19.0/ext/src/http/client/curl/http_client_curl.cc:119:47: error: expected primary-expression before ‘decltype’
   auto hold = static_cast<std::remove_const_t<decltype(z_stream::next_in)>>(

Problem 2:

[ 96%] Building CXX object exporters/elasticsearch/CMakeFiles/opentelemetry_exporter_elasticsearch_logs.dir/src/es_log_recordable.cc.o
cd /home/runner/work/cmake-toolset/cmake-toolset/test/build_jobs_dir/_deps/opentelemetry_cpp-v1.19.0/linux-x86_64-gnu-4/exporters/elasticsearch && /usr/bin/g++-4.8 -DENABLE_ASYNC_EXPORT -DENABLE_METRICS_EXEMPLAR_PREVIEW -DENABLE_OTLP_COMPRESSION_PREVIEW -DENABLE_OTLP_GRPC_SSL_MTLS_PREVIEW -DHAVE_ABSEIL -DOPENTELEMETRY_ABI_VERSION_NO=1 -D__CLANG_SUPPORT_DYN_ANNOTATION__ -I/home/runner/work/cmake-toolset/cmake-toolset/test/build_jobs_dir/_deps/opentelemetry_cpp-v1.19.0/linux-x86_64-gnu-4/generated/third_party/opentelemetry-proto -I/home/runner/work/cmake-toolset/cmake-toolset/test/third_party/packages/opentelemetry-cpp-v1.19.0/api/include -I/home/runner/work/cmake-toolset/cmake-toolset/test/third_party/packages/opentelemetry-cpp-v1.19.0/sdk/include -I/home/runner/work/cmake-toolset/cmake-toolset/test/third_party/packages/opentelemetry-cpp-v1.19.0/sdk -I/home/runner/work/cmake-toolset/cmake-toolset/test/third_party/packages/opentelemetry-cpp-v1.19.0/ext/include -I/home/runner/work/cmake-toolset/cmake-toolset/test/third_party/packages/opentelemetry-cpp-v1.19.0/exporters/elasticsearch/include -isystem /home/runner/work/cmake-toolset/cmake-toolset/test/third_party/install/linux-x86_64-gnu-4/include -fexceptions -frtti -pthread -O2 -g -DNDEBUG -ggdb -std=gnu++1y -fPIC -Wno-error=deprecated-declarations -MD -MT exporters/elasticsearch/CMakeFiles/opentelemetry_exporter_elasticsearch_logs.dir/src/es_log_recordable.cc.o -MF CMakeFiles/opentelemetry_exporter_elasticsearch_logs.dir/src/es_log_recordable.cc.o.d -o CMakeFiles/opentelemetry_exporter_elasticsearch_logs.dir/src/es_log_recordable.cc.o -c /home/runner/work/cmake-toolset/cmake-toolset/test/third_party/packages/opentelemetry-cpp-v1.19.0/exporters/elasticsearch/src/es_log_recordable.cc
/home/runner/work/cmake-toolset/cmake-toolset/test/third_party/packages/opentelemetry-cpp-v1.19.0/exporters/elasticsearch/src/es_log_recordable.cc: In static member function ‘static void nlohmann::json_abi_v3_11_3::adl_serializer<absl::lts_2020_02_25::variant<bool, int, unsigned int, long int, double, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<bool, std::allocator<bool> >, std::vector<int, std::allocator<int> >, std::vector<unsigned int, std::allocator<unsigned int> >, std::vector<long int, std::allocator<long int> >, std::vector<double, std::allocator<double> >, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, long unsigned int, std::vector<long unsigned int, std::allocator<long unsigned int> >, std::vector<unsigned char, std::allocator<unsigned char> > > >::to_json(nlohmann::json_abi_v3_11_3::json&, const OwnedAttributeValue&)’:
/home/runner/work/cmake-toolset/cmake-toolset/test/third_party/packages/opentelemetry-cpp-v1.19.0/exporters/elasticsearch/src/es_log_recordable.cc:31:50: error: parameter declared ‘auto’
     opentelemetry::nostd::visit([&j](const auto &value) { j = value; }, v);
                                                  ^
/home/runner/work/cmake-toolset/cmake-toolset/test/third_party/packages/opentelemetry-cpp-v1.19.0/exporters/elasticsearch/src/es_log_recordable.cc: In lambda function:
/home/runner/work/cmake-toolset/cmake-toolset/test/third_party/packages/opentelemetry-cpp-v1.19.0/exporters/elasticsearch/src/es_log_recordable.cc:31:63: error: ‘value’ was not declared in this scope
     opentelemetry::nostd::visit([&j](const auto &value) { j = value; }, v);
                                                               ^
In file included from /home/runner/work/cmake-toolset/cmake-toolset/test/third_party/install/linux-x86_64-gnu-4/include/absl/base/internal/invoke.h:42:0,
                 from /home/runner/work/cmake-toolset/cmake-toolset/test/third_party/install/linux-x86_64-gnu-4/include/absl/utility/utility.h:50,
                 from /home/runner/work/cmake-toolset/cmake-toolset/test/third_party/install/linux-x86_64-gnu-4/include/absl/types/variant.h:46,
                 from /home/runner/work/cmake-toolset/cmake-toolset/test/third_party/packages/opentelemetry-cpp-v1.19.0/api/include/opentelemetry/nostd/variant.h:55,
                 from /home/runner/work/cmake-toolset/cmake-toolset/test/third_party/packages/opentelemetry-cpp-v1.19.0/api/include/opentelemetry/common/attribute_value.h:10,
                 from /home/runner/work/cmake-toolset/cmake-toolset/test/third_party/packages/opentelemetry-cpp-v1.19.0/sdk/include/opentelemetry/sdk/common/attribute_utils.h:14,
                 from /home/runner/work/cmake-toolset/cmake-toolset/test/third_party/packages/opentelemetry-cpp-v1.19.0/exporters/elasticsearch/include/opentelemetry/exporters/elasticsearch/es_log_recordable.h:13,
                 from /home/runner/work/cmake-toolset/cmake-toolset/test/third_party/packages/opentelemetry-cpp-v1.19.0/exporters/elasticsearch/src/es_log_recordable.cc:15:
/home/runner/work/cmake-toolset/cmake-toolset/test/third_party/install/linux-x86_64-gnu-4/include/absl/meta/type_traits.h: In substitution of ‘template<class T> using result_of_t = typename std::result_of::type [with T = nlohmann::json_abi_v3_11_3::adl_serializer<absl::lts_2020_02_25::variant<bool, int, unsigned int, long int, double, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<bool, std::allocator<bool> >, std::vector<int, std::allocator<int> >, std::vector<unsigned int, std::allocator<unsigned int> >, std::vector<long int, std::allocator<long int> >, std::vector<double, std::allocator<double> >, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, long unsigned int, std::vector<long unsigned int, std::allocator<long unsigned int> >, std::vector<unsigned char, std::allocator<unsigned char> > > >::to_json(nlohmann::json_abi_v3_11_3::json&, const OwnedAttributeValue&)::__lambda29(absl::lts_2020_02_25::variant_internal::VariantAccessResult<0ul, const absl::lts_2020_02_25::variant<bool, int, unsigned int, long int, double, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<bool, std::allocator<bool> >, std::vector<int, std::allocator<int> >, std::vector<unsigned int, std::allocator<unsigned int> >, std::vector<long int, std::allocator<long int> >, std::vector<double, std::allocator<double> >, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, long unsigned int, std::vector<long unsigned int, std::allocator<long unsigned int> >, std::vector<unsigned char, std::allocator<unsigned char> > >&>)]’:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriage/acceptedIndicates an issue or PR is ready to be actively worked on.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions