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

Can not compile when using WITH_STL=CXX11 with legacy toolchain #3099

Closed
owent opened this issue Oct 16, 2024 · 0 comments · Fixed by #3100
Closed

Can not compile when using WITH_STL=CXX11 with legacy toolchain #3099

owent opened this issue Oct 16, 2024 · 0 comments · Fixed by #3100
Labels
bug Something isn't working triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@owent
Copy link
Member

owent commented Oct 16, 2024

Describe your environment

Sorry but #3098 only fixes partly problems in #3096 . I will raise another PR to fix the left problems.

OS: Linux
Compiler: GCC 4.8.5
otel-cpp version: 1.17.0

Steps to reproduce
Building otel-cpp 1.17.0

What is the expected behavior?
Building success.

What is the actual behavior?

// ...
/home/runner/work/cmake-toolset/cmake-toolset/test/third_party/packages/opentelemetry-cpp-v1.17.0/exporters/memory/src/in_memory_metric_exporter_factory.cc:82:26: error: parameter declared ‘auto’
   return Create(data, [](auto) { return AggregationTemporality::kCumulative; });


// ...
/home/runner/work/cmake-toolset/cmake-toolset/test/third_party/packages/opentelemetry-cpp-v1.17.0/exporters/memory/src/in_memory_metric_data.cc: In member function ‘virtual void opentelemetry::v1::exporter::memory::SimpleAggregateInMemoryMetricData::Add(std::unique_ptr<opentelemetry::v1::sdk::metrics::ResourceMetrics>)’:
/home/runner/work/cmake-toolset/cmake-toolset/test/third_party/packages/opentelemetry-cpp-v1.17.0/exporters/memory/src/in_memory_metric_data.cc:34:30: error: converting to ‘std::map<std::tuple<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::map<opentelemetry::v1::sdk::common::OrderedAttributeMap, absl::lts_2020_02_25::variant<opentelemetry::v1::sdk::metrics::SumPointData, opentelemetry::v1::sdk::metrics::HistogramPointData, opentelemetry::v1::sdk::metrics::LastValuePointData, opentelemetry::v1::sdk::metrics::DropPointData> > >::key_type {aka std::tuple<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >}’ from initializer list would use explicit constructor ‘constexpr std::tuple<_T1, _T2>::tuple(const _T1&, const _T2&) [with _T1 = std::basic_string<char>; _T2 = std::basic_string<char>]’
         data_[{scope, metric}].insert({pda.attributes, pda.point_data});
                              ^
/home/runner/work/cmake-toolset/cmake-toolset/test/third_party/packages/opentelemetry-cpp-v1.17.0/exporters/memory/src/in_memory_metric_data.cc: In member function ‘const AttributeToPoint& opentelemetry::v1::exporter::memory::SimpleAggregateInMemoryMetricData::Get(const string&, const string&)’:
/home/runner/work/cmake-toolset/cmake-toolset/test/third_party/packages/opentelemetry-cpp-v1.17.0/exporters/memory/src/in_memory_metric_data.cc:44:31: error: converting to ‘std::map<std::tuple<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::map<opentelemetry::v1::sdk::common::OrderedAttributeMap, absl::lts_2020_02_25::variant<opentelemetry::v1::sdk::metrics::SumPointData, opentelemetry::v1::sdk::metrics::HistogramPointData, opentelemetry::v1::sdk::metrics::LastValuePointData, opentelemetry::v1::sdk::metrics::DropPointData> > >::key_type {aka std::tuple<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >}’ from initializer list would use explicit constructor ‘constexpr std::tuple<_T1, _T2>::tuple(const _T1&, const _T2&) [with _T1 = std::basic_string<char>; _T2 = std::basic_string<char>]’
   return data_[{scope, metric}];                    ^
@owent owent added the bug Something isn't working label Oct 16, 2024
@github-actions github-actions bot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Oct 16, 2024
@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 Oct 17, 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 triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants