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

Install failed on macOS Sequoia 15.1.1 #122

Open
sumtxt opened this issue Jan 20, 2025 · 6 comments
Open

Install failed on macOS Sequoia 15.1.1 #122

sumtxt opened this issue Jan 20, 2025 · 6 comments

Comments

@sumtxt
Copy link

sumtxt commented Jan 20, 2025

Install failed on macOS Sequoia 15.1.1 with R version 4.4.2 (2024-10-31). Output below, sessionInfo() at the bottom.

> devtools::install_github('r-lib/systemfonts')
Using GitHub PAT from the git credential store.
Downloading GitHub repo r-lib/systemfonts@HEAD
── R CMD build ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
✔  checking for file/private/var/folders/56/fgq8gcm939q9hcqj8hy_zmch0000gp/T/RtmpFQlbOR/remotesbab75c40e077/r-lib-systemfonts-2acac8b/DESCRIPTION...preparingsystemfonts:checking DESCRIPTION meta-information ...cleaning srcrunningcleanup’
─  checking for LF line-endings in source and make files and shell scriptschecking for empty or unneeded directorieslooking to see if adata/datalistfile should be addedbuildingsystemfonts_1.2.1.9000.tar.gzInstalling package into/opt/homebrew/lib/R/4.4/site-library’
(aslibis unspecified)
* installing *source* packagesystemfonts...
** using staged installation
Found pkg-config cflags and libs!
Using PKG_CFLAGS=-I/opt/homebrew/opt/freetype/include/freetype2 -I/opt/homebrew/opt/libpng/include/libpng16
Using PKG_LIBS=-L/opt/homebrew/opt/freetype/lib -lfreetype -lbz2 -L/opt/homebrew/opt/libpng/lib -lpng16 -lz
** libs
using C++ compiler:Apple clang version 16.0.0 (clang-1600.0.26.4)’
using SDK:MacOSX15.1.sdkrm -f systemfonts.so caches.o cpp11.o dev_metrics.o font_matching.o font_local.o font_registry.o ft_cache.o string_shape.o font_metrics.o font_outlines.o font_fallback.o string_metrics.o emoji.o cache_store.o init.o mac/FontManagerMac.o
clang++ -std=gnu++17 -I"/opt/homebrew/Cellar/r/4.4.2_1/lib/R/include" -DNDEBUG -I/opt/homebrew/opt/freetype/include/freetype2 -I/opt/homebrew/opt/libpng/include/libpng16 -I'/opt/homebrew/lib/R/4.4/site-library/cpp11/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2   -c caches.cpp -o caches.o
clang++ -std=gnu++17 -I"/opt/homebrew/Cellar/r/4.4.2_1/lib/R/include" -DNDEBUG -I/opt/homebrew/opt/freetype/include/freetype2 -I/opt/homebrew/opt/libpng/include/libpng16 -I'/opt/homebrew/lib/R/4.4/site-library/cpp11/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2   -c cpp11.cpp -o cpp11.o
clang++ -std=gnu++17 -I"/opt/homebrew/Cellar/r/4.4.2_1/lib/R/include" -DNDEBUG -I/opt/homebrew/opt/freetype/include/freetype2 -I/opt/homebrew/opt/libpng/include/libpng16 -I'/opt/homebrew/lib/R/4.4/site-library/cpp11/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2   -c dev_metrics.cpp -o dev_metrics.o
clang++ -std=gnu++17 -I"/opt/homebrew/Cellar/r/4.4.2_1/lib/R/include" -DNDEBUG -I/opt/homebrew/opt/freetype/include/freetype2 -I/opt/homebrew/opt/libpng/include/libpng16 -I'/opt/homebrew/lib/R/4.4/site-library/cpp11/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2   -c font_matching.cpp -o font_matching.o
clang++ -std=gnu++17 -I"/opt/homebrew/Cellar/r/4.4.2_1/lib/R/include" -DNDEBUG -I/opt/homebrew/opt/freetype/include/freetype2 -I/opt/homebrew/opt/libpng/include/libpng16 -I'/opt/homebrew/lib/R/4.4/site-library/cpp11/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2   -c font_local.cpp -o font_local.o
clang++ -std=gnu++17 -I"/opt/homebrew/Cellar/r/4.4.2_1/lib/R/include" -DNDEBUG -I/opt/homebrew/opt/freetype/include/freetype2 -I/opt/homebrew/opt/libpng/include/libpng16 -I'/opt/homebrew/lib/R/4.4/site-library/cpp11/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2   -c font_registry.cpp -o font_registry.o
clang++ -std=gnu++17 -I"/opt/homebrew/Cellar/r/4.4.2_1/lib/R/include" -DNDEBUG -I/opt/homebrew/opt/freetype/include/freetype2 -I/opt/homebrew/opt/libpng/include/libpng16 -I'/opt/homebrew/lib/R/4.4/site-library/cpp11/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2   -c ft_cache.cpp -o ft_cache.o
clang++ -std=gnu++17 -I"/opt/homebrew/Cellar/r/4.4.2_1/lib/R/include" -DNDEBUG -I/opt/homebrew/opt/freetype/include/freetype2 -I/opt/homebrew/opt/libpng/include/libpng16 -I'/opt/homebrew/lib/R/4.4/site-library/cpp11/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2   -c string_shape.cpp -o string_shape.o
clang++ -std=gnu++17 -I"/opt/homebrew/Cellar/r/4.4.2_1/lib/R/include" -DNDEBUG -I/opt/homebrew/opt/freetype/include/freetype2 -I/opt/homebrew/opt/libpng/include/libpng16 -I'/opt/homebrew/lib/R/4.4/site-library/cpp11/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2   -c font_metrics.cpp -o font_metrics.o
clang++ -std=gnu++17 -I"/opt/homebrew/Cellar/r/4.4.2_1/lib/R/include" -DNDEBUG -I/opt/homebrew/opt/freetype/include/freetype2 -I/opt/homebrew/opt/libpng/include/libpng16 -I'/opt/homebrew/lib/R/4.4/site-library/cpp11/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2   -c font_outlines.cpp -o font_outlines.o
clang++ -std=gnu++17 -I"/opt/homebrew/Cellar/r/4.4.2_1/lib/R/include" -DNDEBUG -I/opt/homebrew/opt/freetype/include/freetype2 -I/opt/homebrew/opt/libpng/include/libpng16 -I'/opt/homebrew/lib/R/4.4/site-library/cpp11/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2   -c font_fallback.cpp -o font_fallback.o
clang++ -std=gnu++17 -I"/opt/homebrew/Cellar/r/4.4.2_1/lib/R/include" -DNDEBUG -I/opt/homebrew/opt/freetype/include/freetype2 -I/opt/homebrew/opt/libpng/include/libpng16 -I'/opt/homebrew/lib/R/4.4/site-library/cpp11/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2   -c string_metrics.cpp -o string_metrics.o
clang++ -std=gnu++17 -I"/opt/homebrew/Cellar/r/4.4.2_1/lib/R/include" -DNDEBUG -I/opt/homebrew/opt/freetype/include/freetype2 -I/opt/homebrew/opt/libpng/include/libpng16 -I'/opt/homebrew/lib/R/4.4/site-library/cpp11/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2   -c emoji.cpp -o emoji.o
clang++ -std=gnu++17 -I"/opt/homebrew/Cellar/r/4.4.2_1/lib/R/include" -DNDEBUG -I/opt/homebrew/opt/freetype/include/freetype2 -I/opt/homebrew/opt/libpng/include/libpng16 -I'/opt/homebrew/lib/R/4.4/site-library/cpp11/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2   -c cache_store.cpp -o cache_store.o
clang++ -std=gnu++17 -I"/opt/homebrew/Cellar/r/4.4.2_1/lib/R/include" -DNDEBUG -I/opt/homebrew/opt/freetype/include/freetype2 -I/opt/homebrew/opt/libpng/include/libpng16 -I'/opt/homebrew/lib/R/4.4/site-library/cpp11/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include    -fPIC  -g -O2   -c init.cpp -o init.o
clang++ -I"/opt/homebrew/Cellar/r/4.4.2_1/lib/R/include" -DNDEBUG -I/opt/homebrew/opt/freetype/include/freetype2 -I/opt/homebrew/opt/libpng/include/libpng16 -I'/opt/homebrew/lib/R/4.4/site-library/cpp11/include' -I/opt/homebrew/opt/gettext/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/xz/include -I/opt/homebrew/include   -fobjc-arc -fPIC   -c mac/FontManagerMac.mm -o mac/FontManagerMac.o
In file included from mac/FontManagerMac.mm:5:
In file included from mac/../FontDescriptor.h:11:
In file included from mac/../utils.h:9:
In file included from /opt/homebrew/lib/R/4.4/site-library/cpp11/include/cpp11/protect.hpp:10:
/opt/homebrew/lib/R/4.4/site-library/cpp11/include/cpp11/R.hpp:52:1: error: unknown type name 'constexpr'
   52 | constexpr R_xlen_t operator"" _xl(unsigned long long int value) { return value; }
      | ^
/opt/homebrew/lib/R/4.4/site-library/cpp11/include/cpp11/R.hpp:52:19: error: expected ';' after top level declarator
   52 | constexpr R_xlen_t operator"" _xl(unsigned long long int value) { return value; }
      |                   ^
      |                   ;
/opt/homebrew/lib/R/4.4/site-library/cpp11/include/cpp11/R.hpp:59:16: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
   59 |   using type = T;
      |                ^
In file included from mac/FontManagerMac.mm:5:
In file included from mac/../FontDescriptor.h:11:
In file included from mac/../utils.h:9:
/opt/homebrew/lib/R/4.4/site-library/cpp11/include/cpp11/protect.hpp:38:54: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
   38 |                             decltype(std::declval<Fun&&>()()), SEXP>::value>::type>
      |                                                      ^
/opt/homebrew/lib/R/4.4/site-library/cpp11/include/cpp11/protect.hpp:39:24: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
   39 | SEXP unwind_protect(Fun&& code) {
      |                        ^
/opt/homebrew/lib/R/4.4/site-library/cpp11/include/cpp11/protect.hpp:37:34: warning: default template arguments for a function template are a C++11 extension [-Wc++11-extensions]
   37 | template <typename Fun, typename = typename std::enable_if<std::is_same<
      |                                  ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   38 |                             decltype(std::declval<Fun&&>()()), SEXP>::value>::type>
      |                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/homebrew/lib/R/4.4/site-library/cpp11/include/cpp11/protect.hpp:40:24: error: expected expression
   40 |   static SEXP token = [] {
      |                        ^
/opt/homebrew/lib/R/4.4/site-library/cpp11/include/cpp11/protect.hpp:52:8: error: expected expression
   52 |       [](void* data) -> SEXP {
      |        ^
/opt/homebrew/lib/R/4.4/site-library/cpp11/include/cpp11/protect.hpp:52:14: error: expected '(' for function-style cast or type construction
   52 |       [](void* data) -> SEXP {
      |          ~~~~^
/opt/homebrew/lib/R/4.4/site-library/cpp11/include/cpp11/protect.hpp:52:16: error: use of undeclared identifier 'data'
   52 |       [](void* data) -> SEXP {
      |                ^
/opt/homebrew/lib/R/4.4/site-library/cpp11/include/cpp11/protect.hpp:57:8: error: expected expression
   57 |       [](void* jmpbuf, Rboolean jump) {
      |        ^
/opt/homebrew/lib/R/4.4/site-library/cpp11/include/cpp11/protect.hpp:57:14: error: expected '(' for function-style cast or type construction
   57 |       [](void* jmpbuf, Rboolean jump) {
      |          ~~~~^
/opt/homebrew/lib/R/4.4/site-library/cpp11/include/cpp11/protect.hpp:57:24: error: unexpected type name 'Rboolean': expected expression
   57 |       [](void* jmpbuf, Rboolean jump) {
      |                        ^
/opt/homebrew/lib/R/4.4/site-library/cpp11/include/cpp11/protect.hpp:76:54: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
   76 |                             decltype(std::declval<Fun&&>()()), void>::value>::type>
      |                                                      ^
/opt/homebrew/lib/R/4.4/site-library/cpp11/include/cpp11/protect.hpp:77:24: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
   77 | void unwind_protect(Fun&& code) {
      |                        ^
/opt/homebrew/lib/R/4.4/site-library/cpp11/include/cpp11/protect.hpp:75:34: warning: default template arguments for a function template are a C++11 extension [-Wc++11-extensions]
   75 | template <typename Fun, typename = typename std::enable_if<std::is_same<
      |                                  ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   76 |                             decltype(std::declval<Fun&&>()()), void>::value>::type>
      |                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/homebrew/lib/R/4.4/site-library/cpp11/include/cpp11/protect.hpp:78:26: error: expected expression
   78 |   (void)unwind_protect([&] {
      |                          ^
/opt/homebrew/lib/R/4.4/site-library/cpp11/include/cpp11/protect.hpp:84:63: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
   84 | template <typename Fun, typename R = decltype(std::declval<Fun&&>()())>
      |                                                               ^
/opt/homebrew/lib/R/4.4/site-library/cpp11/include/cpp11/protect.hpp:87:19: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
   87 | unwind_protect(Fun&& code) {
      |                   ^
/opt/homebrew/lib/R/4.4/site-library/cpp11/include/cpp11/protect.hpp:84:34: warning: default template arguments for a function template are a C++11 extension [-Wc++11-extensions]
   84 | template <typename Fun, typename R = decltype(std::declval<Fun&&>()())>
      |                                  ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/homebrew/lib/R/4.4/site-library/cpp11/include/cpp11/protect.hpp:89:26: error: expected expression
   89 |   (void)unwind_protect([&] {
      |                          ^
/opt/homebrew/lib/R/4.4/site-library/cpp11/include/cpp11/protect.hpp:98:17: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
   98 | template <size_t...>
      |                 ^
/opt/homebrew/lib/R/4.4/site-library/cpp11/include/cpp11/protect.hpp:100:16: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
  100 |   using type = index_sequence;
      |                ^
/opt/homebrew/lib/R/4.4/site-library/cpp11/include/cpp11/protect.hpp:106:22: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
  106 | template <std::size_t... I, std::size_t J>
      |                      ^
/opt/homebrew/lib/R/4.4/site-library/cpp11/include/cpp11/protect.hpp:116:31: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
  116 | template <typename F, typename... Aref, size_t... I>
      |                               ^
/opt/homebrew/lib/R/4.4/site-library/cpp11/include/cpp11/protect.hpp:116:47: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
  116 | template <typename F, typename... Aref, size_t... I>
      |                                               ^
/opt/homebrew/lib/R/4.4/site-library/cpp11/include/cpp11/protect.hpp:117:24: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
  117 | decltype(std::declval<F&&>()(std::declval<Aref>()...)) apply(
      |                        ^
/opt/homebrew/lib/R/4.4/site-library/cpp11/include/cpp11/protect.hpp:118:6: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
  118 |     F&& f, std::tuple<Aref...>&& a, const index_sequence<I...>&) {
      |      ^
/opt/homebrew/lib/R/4.4/site-library/cpp11/include/cpp11/protect.hpp:118:17: error: no template named 'tuple' in namespace 'std'
  118 |     F&& f, std::tuple<Aref...>&& a, const index_sequence<I...>&) {
      |            ~~~~~^
/opt/homebrew/lib/R/4.4/site-library/cpp11/include/cpp11/protect.hpp:118:31: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
  118 |     F&& f, std::tuple<Aref...>&& a, const index_sequence<I...>&) {
      |                               ^
/opt/homebrew/lib/R/4.4/site-library/cpp11/include/cpp11/protect.hpp:122:31: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
  122 | template <typename F, typename... Aref>
      |                               ^
/opt/homebrew/lib/R/4.4/site-library/cpp11/include/cpp11/protect.hpp:123:24: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
  123 | decltype(std::declval<F&&>()(std::declval<Aref>()...)) apply(F&& f,
      |                        ^
/opt/homebrew/lib/R/4.4/site-library/cpp11/include/cpp11/protect.hpp:123:63: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
  123 | decltype(std::declval<F&&>()(std::declval<Aref>()...)) apply(F&& f,
      |                                                               ^
/opt/homebrew/lib/R/4.4/site-library/cpp11/include/cpp11/protect.hpp:124:67: error: no template named 'tuple' in namespace 'std'
  124 |                                                              std::tuple<Aref...>&& a) {
      |                                                              ~~~~~^
/opt/homebrew/lib/R/4.4/site-library/cpp11/include/cpp11/protect.hpp:124:81: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
  124 |                                                              std::tuple<Aref...>&& a) {
      |                                                                                 ^
/opt/homebrew/lib/R/4.4/site-library/cpp11/include/cpp11/protect.hpp:125:86: error: expected '(' for function-style cast or type construction
  125 |   return apply(std::forward<F>(f), std::move(a), make_index_sequence<sizeof...(Aref)>{});
      |                                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/opt/homebrew/lib/R/4.4/site-library/cpp11/include/cpp11/protect.hpp:131:24: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
  131 | decltype(std::declval<F&&>()()) apply(F&& f, std::tuple<>&&) {
      |                        ^
/opt/homebrew/lib/R/4.4/site-library/cpp11/include/cpp11/protect.hpp:131:40: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
  131 | decltype(std::declval<F&&>()()) apply(F&& f, std::tuple<>&&) {
      |                                        ^
/opt/homebrew/lib/R/4.4/site-library/cpp11/include/cpp11/protect.hpp:131:51: error: no template named 'tuple' in namespace 'std'
  131 | decltype(std::declval<F&&>()()) apply(F&& f, std::tuple<>&&) {
      |                                              ~~~~~^
/opt/homebrew/lib/R/4.4/site-library/cpp11/include/cpp11/protect.hpp:131:58: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
  131 | decltype(std::declval<F&&>()()) apply(F&& f, std::tuple<>&&) {
      |                                                          ^
/opt/homebrew/lib/R/4.4/site-library/cpp11/include/cpp11/protect.hpp:135:31: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
  135 | template <typename F, typename... Aref>
      |                               ^
/opt/homebrew/lib/R/4.4/site-library/cpp11/include/cpp11/protect.hpp:137:70: warning: reference qualifiers on functions are a C++11 extension [-Wc++11-extensions]
  137 |   decltype(std::declval<F*>()(std::declval<Aref>()...)) operator()() && {
      |                                                                      ^
/opt/homebrew/lib/R/4.4/site-library/cpp11/include/cpp11/protect.hpp:141:8: error: no template named 'tuple' in namespace 'std'
  141 |   std::tuple<Aref...> arefs_;
      |   ~~~~~^
/opt/homebrew/lib/R/4.4/site-library/cpp11/include/cpp11/protect.hpp:149:23: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
  149 |     template <typename... A>
      |                       ^
/opt/homebrew/lib/R/4.4/site-library/cpp11/include/cpp11/protect.hpp:150:47: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
  150 |     decltype(std::declval<F*>()(std::declval<A&&>()...)) operator()(A&&... a) const {
      |                                               ^
/opt/homebrew/lib/R/4.4/site-library/cpp11/include/cpp11/protect.hpp:150:70: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
  150 |     decltype(std::declval<F*>()(std::declval<A&&>()...)) operator()(A&&... a) const {
      |                                                                      ^
/opt/homebrew/lib/R/4.4/site-library/cpp11/include/cpp11/protect.hpp:164:3: error: unknown type name 'constexpr'
  164 |   constexpr function<F> operator[](F* raw) const {
      |   ^
/opt/homebrew/lib/R/4.4/site-library/cpp11/include/cpp11/protect.hpp:164:13: error: member 'function' declared as a template
  163 |   template <typename F>
      |   ~~~~~~~~~~~~~~~~~~~~~
  164 |   constexpr function<F> operator[](F* raw) const {
      |             ^
/opt/homebrew/lib/R/4.4/site-library/cpp11/include/cpp11/protect.hpp:164:24: error: expected ';' at end of declaration list
  164 |   constexpr function<F> operator[](F* raw) const {
      |                        ^
      |                        ;
fatal error: too many errors emitted, stopping now [-ferror-limit=]
30 warnings and 20 errors generated.
make: *** [mac/FontManagerMac.o] Error 1
ERROR: compilation failed for packagesystemfonts* removing/opt/homebrew/lib/R/4.4/site-library/systemfonts* restoring previous/opt/homebrew/lib/R/4.4/site-library/systemfontsWarning message:
In i.p(...) :
  installation of package/var/folders/56/fgq8gcm939q9hcqj8hy_zmch0000gp/T//RtmpFQlbOR/filebab753568f27/systemfonts_1.2.1.9000.tar.gzhad non-zero exit status
> sessionInfo()
R version 4.4.2 (2024-10-31)
Platform: aarch64-apple-darwin24.1.0
Running under: macOS Sequoia 15.1.1

Matrix products: default
BLAS:   /opt/homebrew/Cellar/openblas/0.3.29/lib/libopenblasp-r0.3.29.dylib 
LAPACK: /opt/homebrew/Cellar/r/4.4.2_1/lib/R/lib/libRlapack.dylib;  LAPACK version 3.12.0

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: GMT
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
 [1] miniUI_0.1.1.1    compiler_4.4.2    promises_1.3.2    Rcpp_1.0.13-1    
 [5] stringr_1.5.1     callr_3.7.6       later_1.4.1       fastmap_1.2.0    
 [9] mime_0.12         R6_2.5.1          curl_6.0.1        htmlwidgets_1.6.4
[13] desc_1.4.3        profvis_0.3.8     shiny_1.10.0      rlang_1.1.5      
[17] cachem_1.1.0      stringi_1.8.4     httpuv_1.6.15     fs_1.6.5         
[21] pkgload_1.4.0     memoise_2.0.1     cli_3.6.3         magrittr_2.0.3   
[25] ps_1.8.1          digest_0.6.37     processx_3.8.5    xtable_1.8-4     
[29] remotes_2.5.0     devtools_2.4.5    lifecycle_1.0.4   vctrs_0.6.5      
[33] glue_1.8.0        urlchecker_1.0.1  sessioninfo_1.2.2 pkgbuild_1.4.4   
[37] purrr_1.0.2       tools_4.4.2       usethis_3.0.0     ellipsis_0.3.2   
[41] htmltools_0.5.8.1
> 
@ywwry66
Copy link

ywwry66 commented Jan 21, 2025

The issue is that constexpr requires compiling with C++11 standard or above. R 4.3 and newer use C++17 as the default standard for compiling C++ code, which is why you see clang++ -std=gnu++17 in the first few lines. However, it does not set the default standard for Objective C++ code, which is what mac/FontManagerMac.mm is written in. Without the -std flag, macOS's clang++ uses ancient gnu++98 standard, leading to the compilation error.

I don't know why R does not set the standard for Objective C++ code, and it is not even affected by the CXX_STD variable in Makevars file. Not sure whether it is the intended behavior or a bug of R.

The most straightforward way to build systemfonts is to add the line OBJCXXFLAGS += ${CXX17STD} in your personal Makevars file. The maintainers here may consider setting PKG_OBJCXXFLAGS=${CXX17STD} @objcflags@ in src/Makevars.in.

@thomasp85
Copy link
Member

Thanks for the insight @ywwry66

I do find it strange that there is no issues compiling on CRAN, GitHub Actions or my own machine with the current Makevars if it is a general issue

@ywwry66
Copy link

ywwry66 commented Jan 21, 2025

I looked at GitHub Actions, where two macOS environments are tested:

  1. macos-13 (oldrel): macOS Ventura (13), Apple Clang 15.0.0, failed with the same error here.
  2. macos-latest (release): macOS Sonoma (14), Apple Clang 14.0.0, build suceeded.

My environment is the same as OP's: macOS Sequoia (15), Apple Clang 16.0.0. So this could be an issue with Apple Clang 15.0.0+. @thomasp85 Do you know how to retrieve the compilation logs for the macos-latest (release) test? All I can see is

* installing the package to build vignettes
* creating vignettes ... OK

which indicates a successful build.

@sa0v
Copy link

sa0v commented Jan 22, 2025

I am having the same issue on an M1 Mac Mini, running MacOS 15.2. Fortunately CPAN allows you to install the previous version as a workaround for the moment, but I thought I would mention it to ensure that it wasn't just a problem isolated to a single person's machine.

I have done all my data analysis learning and course work in R and RStudio, my thanks for contributing to such great software 😄 If there is any technical information I can provide, please let me know!

@Tom271
Copy link

Tom271 commented Jan 26, 2025

I was coming across a similar error (also Sequoia 15.1.1). Following @ywwry66 's suggestion above, I successfully installed systemfonts using:

withr::with_makevars(c(OBJCXXFLAGS = "${CXX17STD}"), install.packages('systemfonts'))

@pdbartlett
Copy link

Works for me too! Thanks.

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

No branches or pull requests

6 participants