Skip to content

Not all compiler support all C++20's components when using -std=c++20 #3200

@owent

Description

@owent

Describe your environment

OS: Linux
Compiler: GCC 11

Steps to reproduce
Compiling otel-cpp with -std=c++20

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.18.0/exporters/elasticsearch/src/es_log_recordable.cc:181:36: error: ‘format’ is not a member of ‘std’
  181 |   const std::string dateStr = std::format("{:%FT%T%Ez}", timePoint);
      |                                    ^~~~~~
gmake[2]: *** [exporters/elasticsearch/CMakeFiles/opentelemetry_exporter_elasticsearch_logs.dir/build.make:93: exporters/elasticsearch/CMakeFiles/opentelemetry_exporter_elasticsearch_logs.dir/src/es_log_recordable.cc.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:1593: exporters/elasticsearch/CMakeFiles/opentelemetry_exporter_elasticsearch_logs.dir/all] Error 2

Additional context
https://github.com/owent/cmake-toolset/actions/runs/12311600885/job/34362063562

There may be other errors

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
[cmake] Please set them or make sure they are set and tested correctly in the CMake files:
[cmake] GMOCK_LIB
[cmake]     linked by target "url_parser_test" in directory D:/workspace/git/github/opentelemetry/opentelemetry-cpp/ext/test/http
[cmake]     linked by target "curl_http_test" in directory D:/workspace/git/github/opentelemetry/opentelemetry-cpp/ext/test/http
[cmake] 
[cmake] CMake Generate step failed.  Build files cannot be regenerated correctly.

Metadata

Metadata

Assignees

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