Skip to content

Update stdlib/macos CI #15139

@MBkkt

Description

@MBkkt

Bug description

Expected behavior

We can use most C++17 (and C++20) features.
But very common C++17 feature: std::from_chars for double not available

Actual behavior

We're using apple libc++, it's outdated.

https://github.com/facebookincubator/velox/actions/runs/18444778495/job/52549931371?pr=15134

In file included from /Users/runner/work/velox/velox/velox/functions/prestosql/registration/DateTimeFunctionsRegistration.cpp:18:
/Users/runner/work/velox/velox/./velox/functions/prestosql/DateTimeFunctions.h:1811:23: error: call to deleted function 'from_chars'
 1811 |     auto [_, error] = std::from_chars(
      |                       ^~~~~~~~~~~~~~~
/Applications/Xcode_16.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__charconv/from_chars_integral.h:38:19: note: candidate function has been explicitly deleted
   38 | from_chars_result from_chars(const char*, const char*, bool, int = 10) = delete;
      |                   ^
/Applications/Xcode_16.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__charconv/from_chars_integral.h:224:1: note: candidate template ignored: requirement 'is_integral<double>::value' was not satisfied [with _Tp = double]
  224 | from_chars(const char* __first, const char* __last, _Tp& __value) {
      | ^
/Applications/Xcode_16.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__charconv/from_chars_integral.h:230:1: note: candidate function template not viable: requires 4 arguments, but 3 were provided
  230 | from_chars(const char* __first, const char* __last, _Tp& __value, int __base) {
      | ^          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

How to fix this?

Ideally use llvm clang and llvm libc++21
It's available for macos15: https://formulae.brew.sh/formula/llvm

Alternatively we can use gnu libstdc++ which is also available on macos

System information

CI

Relevant logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingbuildtriageNewly created issue that needs attention.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions