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

Fix clang-14 run in CI #1041

Merged
merged 1 commit into from
Oct 31, 2023
Merged

Fix clang-14 run in CI #1041

merged 1 commit into from
Oct 31, 2023

Conversation

mborland
Copy link
Member

The updated GHA runners broke Clang-14 in C++20 mode. G++12 in C++20 mode is covered in our drone runs which are fine..

@jzmaddock
Copy link
Collaborator

Just out of curiosity, what was the breakage, it seems a shame we can't run clang in C++20.

@mborland
Copy link
Member Author

Just out of curiosity, what was the breakage, it seems a shame we can't run clang in C++20.

There are two to watch for now. This will hit any Clang < 16 in 2b mode:

/usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_iterator.h:2618:35: error: missing 'typename' prior to dependent type name 'iterator_traits<_It>::iterator_category'
      { using iterator_category = iterator_traits<_It>::iterator_category; };
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

And this will happen in C++20 mode:

/usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/chrono:2320:48: error: call to consteval function 'std::chrono::hh_mm_ss::_S_fractional_width' is not a constant expression
        static constexpr unsigned fractional_width = {_S_fractional_width()};
                                                      ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/chrono:2320:48: note: undefined function '_S_fractional_width' cannot be used in a constant expression
/usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/chrono:2275:2: note: declared here
        _S_fractional_width()
        ^
1 error generated.

The GHA 22.04 image updated from GCC12 to 13 as the default version a few days ago.

@ckormanyos
Copy link
Member

ckormanyos commented Oct 31, 2023

The GHA 22.04 image updated from GCC12 to 13 as the default version a few days ago.

This seemingly harmless change actually broke parts of iterator_traits and parts of chrono. I spent all weekend working around in unrelated other opesn-source projects in order to keep those compilers. But you need to have super-simple uses of iterators and chrono-functions. I don't think Boost will have such simplistic cases...

Tough break on this one.

@mborland mborland merged commit 7bc2da4 into develop Oct 31, 2023
58 checks passed
@mborland mborland deleted the CI branch October 31, 2023 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants