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

ubuntu-latest runners have an incompatible combination of clang and libstdc++ #9641

Closed
2 of 10 tasks
Ozaq opened this issue Apr 5, 2024 · 2 comments
Closed
2 of 10 tasks

Comments

@Ozaq
Copy link

Ozaq commented Apr 5, 2024

NOTE

This is a copy of this issue (turned into a discussion w.o. any official response) #9446

This is an issue and converting this into a discussion is:
a) not acknowledging that there IS an issue
b) a dick move

Description

Some ubuntu-latest runners come with a newer version of libstdc++ and still have clang 14 which only has partial consteval support. As a result, trying to compile a file that does #include <chrono> fails like this:

In file included from /home/runner/work/Panda3DS/Panda3DS/src/config.cpp:8:
In file included from /home/runner/work/Panda3DS/Panda3DS/third_party/toml11/toml.hpp:32:
In file included from /home/runner/work/Panda3DS/Panda3DS/third_party/toml11/toml/parser.hpp:9:
In file included from /home/runner/work/Panda3DS/Panda3DS/third_party/toml11/toml/combinator.hpp:16:
In file included from /home/runner/work/Panda3DS/Panda3DS/third_party/toml11/toml/result.hpp:5:
In file included from /home/runner/work/Panda3DS/Panda3DS/third_party/toml11/toml/traits.hpp:10:
/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.
gmake[2]: *** [CMakeFiles/Alber.dir/build.make:104: CMakeFiles/Alber.dir/src/config.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:588: CMakeFiles/Alber.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2

Should be fixable by using clang 17.

Platforms affected

  • Azure DevOps
  • GitHub Actions - Standard Runners
  • GitHub Actions - Larger Runners

Runner images affected

  • Ubuntu 20.04
  • Ubuntu 22.04
  • macOS 11
  • macOS 12
  • macOS 13
  • Windows Server 2019
  • Windows Server 2022

Image version and build link

2.310.2

Link to a failing build: https://github.com/wheremyfoodat/Panda3DS/actions/runs/6640518979/job/18041094730
Ignore the "Setting up newer Clang" step in this run, the compilation step was still using the stock ubuntu-latest clang

Is it regression?

Yes (worked fine until yesterday: https://github.com/wheremyfoodat/Panda3DS/actions/runs/6614729350/job/17965319784)

Expected behavior

Runner clang should probably be able to compile this

Actual behavior

Some (not all) ubuntu-latest runners fail to compile C++ files that do #include <chrono>

Repro steps

  1. Have any C++ code that does #include <chrono>, such as the Panda3DS repo above (without updating the compiler like it does now)
  2. Set up some ubuntu-latest actions for it.
  3. Specific runners should fail with the error message listed in the "Description" field

Originally posted by @wheremyfoodat in #9446

@erik-bershel
Copy link
Contributor

Hey @Ozaq! Thank you for bringing it back to our attention. We are going to reexamine our previous investigation. Some of us will drop new info ASAP. Perhaps we will go through all the previously asked questions again. 😅 😅 😅

@mikhailkoliada
Copy link
Member

Should be handled here in a month or so #9679

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants