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

Document WITH_STL=ON in details #1711

Closed
marcalff opened this issue Oct 25, 2022 · 3 comments
Closed

Document WITH_STL=ON in details #1711

marcalff opened this issue Oct 25, 2022 · 3 comments
Labels
bug Something isn't working build and test

Comments

@marcalff
Copy link
Member

marcalff commented Oct 25, 2022

Build failure on macos12-arm-64bit when using WITH_STL=ON

Darwin Kernel Version 21.1.0
-- The C compiler identification is AppleClang 13.0.0.13000029
-- The CXX compiler identification is AppleClang 13.0.0.13000029

Build failure:

/.../opentelemetry-cpp/opentelemetry-cpp-1.6.1/api/include/opentelemetry/std/utility.h:63:34: error: no template named 'make_index_sequence' in namespace 'std'
using make_index_sequence = std::make_index_sequence<N>;
                            ~~~~~^
/.../opentelemetry-cpp/opentelemetry-cpp-1.6.1/api/include/opentelemetry/std/utility.h:66:29: error: no template named 'index_sequence' in namespace 'std'
using index_sequence = std::index_sequence<Ints...>;
                       ~~~~~^

The issue is that WITH_STL is too broad, it assumes that:

  • std::unique_ptr is available (yes)
  • std::shared_ptr is available (yes)
  • std::make_index_sequence is available (no)

Please consider to:

  • either split HAVE_CPP_STDLIB into more granular defines
  • or make checks in CMakeList.txt to make sure WITH_STL can actually be used, that is std class used actually exists.

Invalid configurations, if WITH_STL is considered invalid on macos12, should be detected at configure (CMake) time, not later at compile time.

Please document expected usage and limitations of WITH_STL, in INSTALL.md

@marcalff marcalff added bug Something isn't working build and test labels Oct 25, 2022
@lalitb
Copy link
Member

lalitb commented Oct 28, 2022

related issue: #1071 . Also, we are missing clang build for CI with WITH_STL enabled.

Need to see more details, but is this some bug in the clang compiler if the std::make_index_sequence is missing ?

@marcalff marcalff changed the title Build failure on macos12-arm-64bit when using WITH_STL=ON Document WITH_STL=ON in details Oct 29, 2022
@marcalff
Copy link
Member Author

marcalff commented Oct 29, 2022

related issue: #1071 . Also, we are missing clang build for CI with WITH_STL enabled.

Need to see more details, but is this some bug in the clang compiler if the std::make_index_sequence is missing ?

Yes, I am aware of #1071. Not sure if find grained options are needed, this is a separate discussion.

CI build cmake.c++20.stl.test is using WITH_STL.

For this macos build, I need to investigate details, it could be a C++11/14/17/20 issue as well.

@marcalff
Copy link
Member Author

marcalff commented Nov 2, 2022

Closing as a duplicate of #1071.

To be usefull, WITH_STL needs to be broken down at the minimum by versions of the STL, otherwise it is impossible to use a C++11 feature unless a C++20 STL is available.

@marcalff marcalff closed this as completed Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working build and test
Projects
None yet
Development

No branches or pull requests

2 participants