Can’t build on macOS,and can't install clang on macOS.
clang --version
Apple clang version 13.0.0 (clang-1300.0.29.30)
Target: x86_64-apple-darwin21.3.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
./build.sh
Cloning into 'harfbuzz'...
remote: Enumerating objects: 78568, done.
remote: Counting objects: 100% (5405/5405), done.
remote: Compressing objects: 100% (1774/1774), done.
remote: Total 78568 (delta 3877), reused 4834 (delta 3592), pack-reused 73163
Receiving objects: 100% (78568/78568), 64.35 MiB | 14.53 MiB/s, done.
Resolving deltas: 100% (59027/59027), done.
Note: switching to '3.0.0'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 9c387e20d 3.0.0
In file included from libc/malloc.cc:25:
libc/emmalloc.cpp:58:1: error: C++ requires a type specifier for all declarations
static_assert(sizeof(void*) == 4, "32-bit system");
^
libc/emmalloc.cpp:59:1: error: C++ requires a type specifier for all declarations
static_assert(sizeof(size_t) == 4, "32-bit system");
^
libc/emmalloc.cpp:60:1: error: C++ requires a type specifier for all declarations
static_assert(sizeof(int) == 4, "32-bit system");
^
libc/emmalloc.cpp:64:1: error: C++ requires a type specifier for all declarations
static_assert(CHAR_BIT == 8, "standard char bit size");
^
libc/emmalloc.cpp:65:1: error: C++ requires a type specifier for all declarations
static_assert(SIZE_T_BIT == 32, "standard size_t bit size");
^
libc/emmalloc.cpp:112:1: error: C++ requires a type specifier for all declarations
static_assert(ALLOC_UNIT == ALIGNMENT, "expected size of allocation unit");
^
libc/emmalloc.cpp:113:1: error: C++ requires a type specifier for all declarations
static_assert(METADATA_SIZE == ALIGNMENT, "expected size of metadata");
^
libc/emmalloc.cpp:141:1: error: C++ requires a type specifier for all declarations
static_assert(sizeof(FreeInfo) == ALLOC_UNIT, "expected size of free info");
^
libc/emmalloc.cpp:144:30: error: use of undeclared identifier 'nullptr'
static Region* firstRegion = nullptr;
^
libc/emmalloc.cpp:148:29: error: use of undeclared identifier 'nullptr'
static Region* lastRegion = nullptr;
^
libc/emmalloc.cpp:193:14: error: use of undeclared identifier 'nullptr'
return nullptr;
^
libc/emmalloc.cpp:238:51: error: use of undeclared identifier 'nullptr'
static FreeInfo* freeLists[MAX_FREELIST_INDEX] = {nullptr, nullptr, nullptr, nullptr, nullptr,
^
libc/emmalloc.cpp:238:60: error: use of undeclared identifier 'nullptr'
static FreeInfo* freeLists[MAX_FREELIST_INDEX] = {nullptr, nullptr, nullptr, nullptr, nullptr,
^
libc/emmalloc.cpp:238:69: error: use of undeclared identifier 'nullptr'
static FreeInfo* freeLists[MAX_FREELIST_INDEX] = {nullptr, nullptr, nullptr, nullptr, nullptr,
^
libc/emmalloc.cpp:238:78: error: use of undeclared identifier 'nullptr'
static FreeInfo* freeLists[MAX_FREELIST_INDEX] = {nullptr, nullptr, nullptr, nullptr, nullptr,
^
libc/emmalloc.cpp:238:87: error: use of undeclared identifier 'nullptr'
static FreeInfo* freeLists[MAX_FREELIST_INDEX] = {nullptr, nullptr, nullptr, nullptr, nullptr,
^
libc/emmalloc.cpp:239:3: error: use of undeclared identifier 'nullptr'
nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
^
libc/emmalloc.cpp:239:12: error: use of undeclared identifier 'nullptr'
nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
^
libc/emmalloc.cpp:239:21: error: use of undeclared identifier 'nullptr'
nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
In file included from harfbuzz/src/harfbuzz.cc:1:
In file included from harfbuzz/src/hb-aat-layout.cc:28:
harfbuzz/src/hb.hh:461:1: error: C++ requires a type specifier for all declarations
static_assert ((sizeof (hb_codepoint_t) == 4), "");
^
harfbuzz/src/hb.hh:462:1: error: C++ requires a type specifier for all declarations
static_assert ((sizeof (hb_position_t) == 4), "");
^
harfbuzz/src/hb.hh:463:1: error: C++ requires a type specifier for all declarations
static_assert ((sizeof (hb_mask_t) == 4), "");
^
harfbuzz/src/hb.hh:464:1: error: C++ requires a type specifier for all declarations
static_assert ((sizeof (hb_var_int_t) == 4), "");
^
In file included from harfbuzz/src/harfbuzz.cc:1:
In file included from harfbuzz/src/hb-aat-layout.cc:28:
In file included from harfbuzz/src/hb.hh:470:
harfbuzz/src/hb-meta.hh:41:18: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template<typename... Ts> struct _hb_void_t { typedef void type; };
^
harfbuzz/src/hb-meta.hh:42:18: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template<typename... Ts> using hb_void_t = typename _hb_void_t<Ts...>::type;
^
harfbuzz/src/hb-meta.hh:42:44: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
template<typename... Ts> using hb_void_t = typename _hb_void_t<Ts...>::type;
^
harfbuzz/src/hb-meta.hh:44:33: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template<typename Head, typename... Ts> struct _hb_head_t { typedef Head type; };
^
harfbuzz/src/hb-meta.hh:45:18: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template<typename... Ts> using hb_head_t = typename _hb_head_t<Ts...>::type;
^
harfbuzz/src/hb-meta.hh:45:44: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
template<typename... Ts> using hb_head_t = typename _hb_head_t<Ts...>::type;
^
harfbuzz/src/hb-meta.hh:47:65: error: unknown type name 'constexpr'
template <typename T, T v> struct hb_integral_constant { static constexpr T value = v; };
^
harfbuzz/src/hb-meta.hh:47:76: error: expected ';' at end of declaration list
template <typename T, T v> struct hb_integral_constant { static constexpr T value = v; };
^
;
harfbuzz/src/hb-meta.hh:48:44: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
template <bool b> using hb_bool_constant = hb_integral_constant<bool, b>;
^
harfbuzz/src/hb-meta.hh:49:22: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using hb_true_type = hb_bool_constant<true>;
^
harfbuzz/src/hb-meta.hh:50:23: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using hb_false_type = hb_bool_constant<false>;
^
harfbuzz/src/hb-meta.hh:83:48: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
template <typename T> using hb_type_identity = typename hb_type_identity_t<T>::type;
^
harfbuzz/src/hb-meta.hh:87:25: error: unknown type name 'constexpr'
template <typename T> constexpr T*
^
harfbuzz/src/hb-meta.hh:87:35: error: member 'T' declared as a template
template <typename T> constexpr T*
~~~~~~~~~~~~~~~~~~~~~ ^
harfbuzz/src/hb-meta.hh:87:36: error: expected ';' at end of declaration list
template <typename T> constexpr T*
^
;
harfbuzz/src/hb-meta.hh:106:47: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
template <typename T> using hb_remove_const = typename hb_match_const<T>::type;
^
harfbuzz/src/hb-meta.hh:107:44: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
template <typename T> using hb_add_const = const T;
^
harfbuzz/src/hb-meta.hh:111:51: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
template <typename T> struct hb_match_reference<T &&> : hb_type_identity_t<T>, hb_true_type {};
^
harfbuzz/src/hb-meta.hh:112:51: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
template <typename T> using hb_remove_reference = typename hb_match_reference<T>::type;
^
harfbuzz/src/hb-meta.hh:113:23: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
template <typename T> auto _hb_try_add_lvalue_reference (hb_priority<1>) -> hb_type_identity<T&>;
^
harfbuzz/src/hb-meta.hh:113:23: error: 'auto' not allowed in function return type
template <typename T> auto _hb_try_add_lvalue_reference (hb_priority<1>) -> hb_type_identity<T&>;
^~~~
harfbuzz/src/hb-meta.hh:113:73: error: expected ';' at end of declaration
template <typename T> auto _hb_try_add_lvalue_reference (hb_priority<1>) -> hb_type_identity<T&>;
^
;
harfbuzz/src/hb-meta.hh:113:74: error: cannot use arrow operator on a type
template <typename T> auto _hb_try_add_lvalue_reference (hb_priority<1>) -> hb_type_identity<T&>;
^
harfbuzz/src/hb-meta.hh:114:23: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
template <typename T> auto _hb_try_add_lvalue_reference (hb_priority<0>) -> hb_type_identity<T>;
^
harfbuzz/src/hb-meta.hh:114:23: error: 'auto' not allowed in function return type
template <typename T> auto _hb_try_add_lvalue_reference (hb_priority<0>) -> hb_type_identity<T>;
^~~~
harfbuzz/src/hb-meta.hh:114:73: error: expected ';' at end of declaration
template <typename T> auto _hb_try_add_lvalue_reference (hb_priority<0>) -> hb_type_identity<T>;
^
;
harfbuzz/src/hb-meta.hh:114:74: error: cannot use arrow operator on a type
template <typename T> auto _hb_try_add_lvalue_reference (hb_priority<0>) -> hb_type_identity<T>;
^
harfbuzz/src/hb-meta.hh:115:55: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
template <typename T> using hb_add_lvalue_reference = decltype (_hb_try_add_lvalue_reference<T> (hb_prioritize));
^
harfbuzz/src/hb-meta.hh:115:55: error: unknown type name 'decltype'
harfbuzz/src/hb-meta.hh:115:65: error: expected ')'
template <typename T> using hb_add_lvalue_reference = decltype (_hb_try_add_lvalue_reference<T> (hb_prioritize));
^
harfbuzz/src/hb-meta.hh:115:64: note: to match this '('
template <typename T> using hb_add_lvalue_reference = decltype (_hb_try_add_lvalue_reference<T> (hb_prioritize));
^
harfbuzz/src/hb-meta.hh:116:23: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
template <typename T> auto _hb_try_add_rvalue_reference (hb_priority<1>) -> hb_type_identity<T&&>;
^
harfbuzz/src/hb-meta.hh:116:23: error: 'auto' not allowed in function return type
template <typename T> auto _hb_try_add_rvalue_reference (hb_priority<1>) -> hb_type_identity<T&&>;
^~~~
harfbuzz/src/hb-meta.hh:116:73: error: expected ';' at end of declaration
template <typename T> auto _hb_try_add_rvalue_reference (hb_priority<1>) -> hb_type_identity<T&&>;
^
;
fatal error: too many errors emitted, stopping now [-ferror-limit=]
18 warnings and 20 errors generated.
brew install clang
==> Tapping homebrew/core
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core'...
remote: Enumerating objects: 1143907, done.
remote: Counting objects: 100% (129/129), done.
remote: Compressing objects: 100% (69/69), done.
remote: Total 1143907 (delta 77), reused 108 (delta 60), pack-reused 1143778
Receiving objects: 100% (1143907/1143907), 450.90 MiB | 16.69 MiB/s, done.
Resolving deltas: 100% (790982/790982), done.
Tapped 3 commands and 5968 formulae (6,298 files, 495.5MB).
Warning: No available formula with the name "clang". Did you mean cln, cling, clean, vlang, clingo or clac?
==> Searching for similarly named formulae...
These similarly named formulae were found:
clang-format clang-format@8 cln clean clingo
clang-format@11 emacs-clang-complete-async cling vlang clac
To install one of them, run (for example):
brew install clang-format
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching taps on GitHub...
Error: No formulae found in taps.
Can’t build on macOS,and can't install clang on macOS.