<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/59995>59995</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            unknown rune table for this platform when building libc++
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          Gei0r
      </td>
    </tr>
</table>

<pre>
    I'm trying to build libc++, libcxxabi, libunwind according to [the default build in the docs](https://libcxx.llvm.org/BuildingLibcxx.html#the-default-build). I'm running in a docker container with alpine and clang/cmake/ninja installed through apk.

When building `locale.cpp`, I get the error below.

[Full build log, including cmake invocation](https://github.com/llvm/llvm-project/files/10409892/build.log)

```
ninja: job failed: /usr/bin/clang++ -DLIBCXX_BUILDING_LIBCXXABI -D_LIBCPP_BUILDING_LIBRARY -D_LIBCPP_DISABLE_NEW_DELETE_DEFINITIONS -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D_LIBCPP_LINK_PTHREAD_LIB -D_LIBCPP_LINK_RT_LIB -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/build/build-runtimes/include/c++/v1 -I/build/llvm-project/libcxxabi/include -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wstring-conversion -Wmisleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -fno-color-diagnostics -faligned-allocation -nostdinc++ -fvisibility-inlines-hidden -fvisibility=hidden -Wall -Wextra -W -Wwrite-strings -Wno-unused-parameter -Wno-long-long -Werror=return-type -Wextra-semi -Wundef -Wformat-nonliteral -Wno-user-defined-literals -Wno-covered-switch-default -Wno-suggest-override -Wno-error -D_LIBCPP_ENABLE_EXPERIMENTAL -std=c++20 -MD -MT libcxx/src/CMakeFiles/cxx_experimental.dir/format.cpp.o -MF libcxx/src/CMakeFiles/cxx_experimental.dir/format.cpp.o.d -o libcxx/src/CMakeFiles/cxx_experimental.dir/format.cpp.o -c /build/llvm-project/libcxx/src/format.cpp
In file included from /build/llvm-project/libcxx/src/format.cpp:9:
In file included from /build/build-runtimes/include/c++/v1/format:153:
In file included from /build/build-runtimes/include/c++/v1/__format/format_context.h:25:
In file included from /build/build-runtimes/include/c++/v1/locale:203:
/build/build-runtimes/include/c++/v1/__locale:545:3: error: unknown rune table for this platform -- do you mean to define _LIBCPP_PROVIDES_DEFAULT_RUNE_TABLE?
# error unknown rune table for this platform -- do you mean to define _LIBCPP_PROVIDES_DEFAULT_RUNE_TABLE?
 ^
/build/build-runtimes/include/c++/v1/__locale:547:18: error: unknown type name 'mask'
    static const mask alnum  = alpha | digit;
 ^
/build/build-runtimes/include/c++/v1/__locale:547:32: error: use of undeclared identifier 'alpha'
    static const mask alnum  = alpha | digit;
 ^
/build/build-runtimes/include/c++/v1/__locale:547:40: error: use of undeclared identifier 'digit'
    static const mask alnum  = alpha | digit;
 ^
/build/build-runtimes/include/c++/v1/__locale:548:18: error: unknown type name 'mask'
    static const mask graph  = alnum | punct;
 ^
/build/build-runtimes/include/c++/v1/__locale:548:40: error: use of undeclared identifier 'punct'; did you mean 'putc'?
    static const mask graph  = alnum | punct;
 ^~~~~
 putc
/build/build-runtimes/include/c++/v1/cstdio:131:9: note: 'putc' declared here
using ::putc _LIBCPP_USING_IF_EXISTS;
        ^
In file included from /build/llvm-project/libcxx/src/format.cpp:9:
In file included from /build/build-runtimes/include/c++/v1/format:153:
In file included from /build/build-runtimes/include/c++/v1/__format/format_context.h:25:
In file included from /build/build-runtimes/include/c++/v1/locale:203:
/build/build-runtimes/include/c++/v1/__locale:552:20: error: use of undeclared identifier '__regex_word'
 static_assert((__regex_word & ~(space | print | cntrl | upper | lower | alpha | digit | punct | xdigit | blank)) == __regex_word,
 ^
/build/build-runtimes/include/c++/v1/__locale:552:37: error: use of undeclared identifier 'space'
    static_assert((__regex_word & ~(space | print | cntrl | upper | lower | alpha | digit | punct | xdigit | blank)) == __regex_word,
 ^
/build/build-runtimes/include/c++/v1/__locale:552:45: error: use of undeclared identifier 'print'
    static_assert((__regex_word & ~(space | print | cntrl | upper | lower | alpha | digit | punct | xdigit | blank)) == __regex_word,
 ^
/build/build-runtimes/include/c++/v1/__locale:552:53: error: use of undeclared identifier 'cntrl'
    static_assert((__regex_word & ~(space | print | cntrl | upper | lower | alpha | digit | punct | xdigit | blank)) == __regex_word,
 ^
/build/build-runtimes/include/c++/v1/__locale:552:61: error: use of undeclared identifier 'upper'
    static_assert((__regex_word & ~(space | print | cntrl | upper | lower | alpha | digit | punct | xdigit | blank)) == __regex_word,
 ^
/build/build-runtimes/include/c++/v1/__locale:552:69: error: use of undeclared identifier 'lower'
    static_assert((__regex_word & ~(space | print | cntrl | upper | lower | alpha | digit | punct | xdigit | blank)) == __regex_word,
 ^
/build/build-runtimes/include/c++/v1/__locale:552:77: error: use of undeclared identifier 'alpha'
    static_assert((__regex_word & ~(space | print | cntrl | upper | lower | alpha | digit | punct | xdigit | blank)) == __regex_word,
 ^
/build/build-runtimes/include/c++/v1/__locale:552:85: error: use of undeclared identifier 'digit'; did you mean 'visit'?
 static_assert((__regex_word & ~(space | print | cntrl | upper | lower | alpha | digit | punct | xdigit | blank)) == __regex_word,
 ^~~~~
 visit
/build/build-runtimes/include/c++/v1/variant:1710:20: note: 'visit' declared here
    decltype(auto) visit(_Visitor&& __visitor, _Vs&&... __vs) {
                   ^
In file included from /build/llvm-project/libcxx/src/format.cpp:9:
In file included from /build/build-runtimes/include/c++/v1/format:153:
In file included from /build/build-runtimes/include/c++/v1/__format/format_context.h:25:
In file included from /build/build-runtimes/include/c++/v1/locale:203:
/build/build-runtimes/include/c++/v1/__locale:552:93: error: use of undeclared identifier 'punct'; did you mean 'putc'?
 static_assert((__regex_word & ~(space | print | cntrl | upper | lower | alpha | digit | punct | xdigit | blank)) == __regex_word,
 ^~~~~
 putc
/build/build-runtimes/include/c++/v1/cstdio:131:9: note: 'putc' declared here
using ::putc _LIBCPP_USING_IF_EXISTS;
        ^
In file included from /build/llvm-project/libcxx/src/format.cpp:9:
In file included from /build/build-runtimes/include/c++/v1/format:153:
In file included from /build/build-runtimes/include/c++/v1/__format/format_context.h:25:
In file included from /build/build-runtimes/include/c++/v1/locale:203:
/build/build-runtimes/include/c++/v1/__locale:552:101: error: use of undeclared identifier 'xdigit'
 static_assert((__regex_word & ~(space | print | cntrl | upper | lower | alpha | digit | punct | xdigit | blank)) == __regex_word,
 ^
/build/build-runtimes/include/c++/v1/__locale:552:110: error: use of undeclared identifier 'blank'
    static_assert((__regex_word & ~(space | print | cntrl | upper | lower | alpha | digit | punct | xdigit | blank)) == __regex_word,
 ^
/build/build-runtimes/include/c++/v1/__locale:552:121: error: use of undeclared identifier '__regex_word'
    static_assert((__regex_word & ~(space | print | cntrl | upper | lower | alpha | digit | punct | xdigit | blank)) == __regex_word,
 ^
/build/build-runtimes/include/c++/v1/__locale:572:13: error: unknown type name 'mask'
    bool is(mask __m, char_type __c) const
 ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
ninja: subcommand failed
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzsWt9z2rry_2uUF40YY4dfDzyYAC3zTUgGaNPz5BHWYtTIEl9JBnIf-rffkWwDyeWcW3raO-1pMhmwtNL--Ei72jWixvBMAvRRa4Bawyta2LXS_XfAA321VOy5P0FhJ8dWP3OZYavwsuCCYcGXKQoH_v_Gt_Z7uuRVo5A7Lhmmaao0q-ah1sCuATNY0ULYig2X2Heq1KDWEIXdtbUbg6IYhWMUjku-DSG2eUPpDIXjgZvGZXZbUtY2FyiM7BpIxZh4xijsNXCpuS6kdCpwiakT9AQap0pay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