grumpycoders / pcsx-redux

The PCSX-Redux project is a collection of tools, research, hardware design, and libraries aiming at development and reverse engineering on the PlayStation 1. The core product itself, PCSX-Redux, is yet another fork of the Playstation emulator, PCSX.
https://pcsx-redux.consoledev.net
GNU General Public License v2.0
643 stars 101 forks source link

Problem compiling the Mips toolchain with the provided homebrew scripts on my MacBook Pro M1 Max with 14.4.1 (23E224) #1639

Closed DanEEStar closed 5 months ago

DanEEStar commented 6 months ago

Describe the bug

On my MacBook Pro M1 Max with 14.4.1 (23E224), the command brew install ./tools/macos-mips/mipsel-none-elf-gcc.rb does not finish successfully. brew install ./tools/macos-mips/mipsel-none-elf-binutils.rb compiles though.

Here is the error I get when running the command as is:

> brew install ./tools/macos-mips/mipsel-none-elf-gcc.rb
==> Downloading https://formulae.brew.sh/api/formula.jws.json

Error: Failed to load cask: ./tools/macos-mips/mipsel-none-elf-gcc.rb
Cask 'mipsel-none-elf-gcc' is unreadable: wrong constant name #<Class:0x00000001079a61b0>
Warning: Treating ./tools/macos-mips/mipsel-none-elf-gcc.rb as a formula.
==> Fetching mipsel-none-elf-gcc
==> Downloading https://ftp.wayne.edu/gnu/gcc/gcc-13.2.0/gcc-13.2.0.tar.xz
Already downloaded: /Users/daniel/Library/Caches/Homebrew/downloads/aafb9dd07c3d2c0da3a67e83917198c0ba9a897e03e2267d9d60a39023231569--gcc-13.2.0.tar.xz
==> ../configure --target=mipsel-none-elf --prefix=/opt/homebrew/Cellar/mipsel-none-elf-gcc/13.2.0 --without-isl --disable-nls --disable-threads --disable-shared --disable-libssp --disable-libstdcxx-pch --disable-libgomp --disable-werror --without-headers --disable-hosted-libstdcx
==> make all-gcc
Last 15 lines from /Users/daniel/Library/Logs/Homebrew/mipsel-none-elf-gcc/02.make:
        ^
In file included from ../../gcc/cp/module.cc:212:
In file included from ../../gcc/system.h:233:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/vector:321:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_integral.h:32:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/locale:202:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:813:5: error: expected expression
    return std::use_facet<ctype<_CharT> >(__loc).is(ctype_base::cntrl, __c);
    ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[1]: *** [cp/module.o] Error 1
rm gcc.pod
make: *** [all-gcc] Error 2

Do not report this issue to Homebrew/brew or Homebrew/homebrew-core!

Running the command with --verbose gives me the following output (cropped):

clang++ -std=gnu++11  -fno-PIE -c  -DIN_GCC_FRONTEND -g -O2   -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -fno-strict-aliasing -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Wconditionally-supported -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -I. -Icp -I../../gcc -I../../gcc/cp -I../../gcc/../include  -I../../gcc/../libcpp/include -I../../gcc/../libcody  -I../../gcc/../libdecnumber -I../../gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc/../libbacktrace   -o cp/method.o -MT cp/method.o -MMD -MP -MF cp/.deps/method.TPo ../../gcc/cp/method.cc
clang++ -std=gnu++11  -fno-PIE -c  -DHOST_MACHINE=\"aarch64-apple-darwin23.4.0\" -DTARGET_MACHINE=\"mipsel-none-elf\" -DIN_GCC_FRONTEND -g -O2   -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -fno-strict-aliasing -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Wconditionally-supported -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -I. -Icp -I../../gcc -I../../gcc/cp -I../../gcc/../include  -I../../gcc/../libcpp/include -I../../gcc/../libcody  -I../../gcc/../libdecnumber -I../../gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc/../libbacktrace   -o cp/module.o -MT cp/module.o -MMD -MP -MF cp/.deps/module.TPo ../../gcc/cp/module.cc
In file included from ../../gcc/cp/mapper-client.cc:31:
In file included from ../../gcc/system.h:227:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/map:2529:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/functional:526:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__functional/boyer_moore_searcher.h:27:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/vector:321:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_integral.h:32:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/locale:202:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:550:5: error: '__abi_tag__' attribute only applies to structs, variables, functions, and namespaces
    _LIBCPP_INLINE_VISIBILITY
    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__config:891:37: note: expanded from macro '_LIBCPP_INLINE_VISIBILITY'
#  define _LIBCPP_INLINE_VISIBILITY _LIBCPP_HIDE_FROM_ABI
                                    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__config:870:26: note: expanded from macro '_LIBCPP_HIDE_FROM_ABI'
          __attribute__((__abi_tag__(_LIBCPP_TOSTRING(_LIBCPP_ODR_SIGNATURE))))
                         ^
In file included from ../../gcc/cp/mapper-client.cc:31:
In file included from ../../gcc/system.h:227:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/map:2529:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/functional:526:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__functional/boyer_moore_searcher.h:27:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/vector:321:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_integral.h:32:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/locale:202:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:551:37: error: expected ';' at end of declaration list
    char_type toupper(char_type __c) const
                                    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:557:48: error: too many arguments provided to function-like macro invocation
    const char_type* toupper(char_type* __low, const char_type* __high) const
                                               ^
../../gcc/../include/safe-ctype.h:146:9: note: macro 'toupper' defined here
#define toupper(c) do_not_use_toupper_with_safe_ctype
        ^
In file included from ../../gcc/cp/mapper-client.cc:31:
In file included from ../../gcc/system.h:227:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/map:2529:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/functional:526:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__functional/boyer_moore_searcher.h:27:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/vector:321:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_integral.h:32:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/locale:202:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:569:48: error: too many arguments provided to function-like macro invocation
    const char_type* tolower(char_type* __low, const char_type* __high) const
                                               ^
../../gcc/../include/safe-ctype.h:148:9: note: macro 'tolower' defined here
#define tolower(c) do_not_use_tolower_with_safe_ctype
        ^
In file included from ../../gcc/cp/mapper-client.cc:31:
In file included from ../../gcc/system.h:227:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/map:2529:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/functional:526:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__functional/boyer_moore_searcher.h:27:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/vector:321:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_integral.h:32:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/locale:202:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:660:5: error: '__abi_tag__' attribute only applies to structs, variables, functions, and namespaces
    _LIBCPP_INLINE_VISIBILITY
    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__config:891:37: note: expanded from macro '_LIBCPP_INLINE_VISIBILITY'
#  define _LIBCPP_INLINE_VISIBILITY _LIBCPP_HIDE_FROM_ABI
                                    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__config:870:26: note: expanded from macro '_LIBCPP_HIDE_FROM_ABI'
          __attribute__((__abi_tag__(_LIBCPP_TOSTRING(_LIBCPP_ODR_SIGNATURE))))
                         ^
In file included from ../../gcc/cp/mapper-client.cc:31:
In file included from ../../gcc/system.h:227:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/map:2529:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/functional:526:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__functional/boyer_moore_searcher.h:27:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/vector:321:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_integral.h:32:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/locale:202:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:661:37: error: expected ';' at end of declaration list
    char_type toupper(char_type __c) const
                                    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:667:48: error: too many arguments provided to function-like macro invocation
    const char_type* toupper(char_type* __low, const char_type* __high) const
                                               ^
../../gcc/../include/safe-ctype.h:146:9: note: macro 'toupper' defined here
#define toupper(c) do_not_use_toupper_with_safe_ctype
        ^
In file included from ../../gcc/cp/mapper-client.cc:31:
In file included from ../../gcc/system.h:227:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/map:2529:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/functional:526:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__functional/boyer_moore_searcher.h:27:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/vector:321:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_integral.h:32:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/locale:202:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:679:48: error: too many arguments provided to function-like macro invocation
    const char_type* tolower(char_type* __low, const char_type* __high) const
                                               ^
../../gcc/../include/safe-ctype.h:148:9: note: macro 'tolower' defined here
#define tolower(c) do_not_use_tolower_with_safe_ctype
        ^
In file included from ../../gcc/cp/mapper-client.cc:31:
In file included from ../../gcc/system.h:227:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/map:2529:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/functional:526:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__functional/boyer_moore_searcher.h:27:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/vector:321:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_integral.h:32:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/locale:202:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:795:21: error: too many arguments provided to function-like macro invocation
isspace(_CharT __c, const locale& __loc)
                    ^
../../gcc/../include/safe-ctype.h:140:9: note: macro 'isspace' defined here
#define isspace(c) do_not_use_isspace_with_safe_ctype
        ^
In file included from ../../gcc/cp/mapper-client.cc:31:
In file included from ../../gcc/system.h:227:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/map:2529:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/functional:526:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__functional/boyer_moore_searcher.h:27:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/vector:321:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_integral.h:32:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/locale:202:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:795:1: error: declaration conflicts with target of using declaration already in scope
isspace(_CharT __c, const locale& __loc)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/_ctype.h:267:1: note: target of using declaration
isspace(int _c)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/cctype:121:9: note: using declaration
using ::isspace _LIBCPP_USING_IF_EXISTS;
        ^
In file included from ../../gcc/cp/mapper-client.cc:31:
In file included from ../../gcc/system.h:227:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/map:2529:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/functional:526:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__functional/boyer_moore_searcher.h:27:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/vector:321:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_integral.h:32:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/locale:202:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:797:5: error: expected expression
    return std::use_facet<ctype<_CharT> >(__loc).is(ctype_base::space, __c);
    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:798:2: error: expected ';' at end of declaration
}
 ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:803:21: error: too many arguments provided to function-like macro invocation
isprint(_CharT __c, const locale& __loc)
                    ^
../../gcc/../include/safe-ctype.h:136:9: note: macro 'isprint' defined here
#define isprint(c) do_not_use_isprint_with_safe_ctype
        ^
In file included from ../../gcc/cp/mapper-client.cc:31:
In file included from ../../gcc/system.h:227:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/map:2529:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/functional:526:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__functional/boyer_moore_searcher.h:27:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/vector:321:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_integral.h:32:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/locale:202:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:803:1: error: declaration conflicts with target of using declaration already in scope
isprint(_CharT __c, const locale& __loc)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/_ctype.h:255:1: note: target of using declaration
isprint(int _c)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/cctype:119:9: note: using declaration
using ::isprint _LIBCPP_USING_IF_EXISTS;
        ^
In file included from ../../gcc/cp/mapper-client.cc:31:
In file included from ../../gcc/system.h:227:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/map:2529:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/functional:526:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__functional/boyer_moore_searcher.h:27:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/vector:321:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_integral.h:32:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/locale:202:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:805:5: error: expected expression
    return std::use_facet<ctype<_CharT> >(__loc).is(ctype_base::print, __c);
    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:806:2: error: expected ';' at end of declaration
}
 ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:811:21: error: too many arguments provided to function-like macro invocation
iscntrl(_CharT __c, const locale& __loc)
                    ^
../../gcc/../include/safe-ctype.h:128:9: note: macro 'iscntrl' defined here
#define iscntrl(c) do_not_use_iscntrl_with_safe_ctype
        ^
In file included from ../../gcc/cp/mapper-client.cc:31:
In file included from ../../gcc/system.h:227:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/map:2529:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/functional:526:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__functional/boyer_moore_searcher.h:27:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/vector:321:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_integral.h:32:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/locale:202:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:811:1: error: declaration conflicts with target of using declaration already in scope
iscntrl(_CharT __c, const locale& __loc)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/_ctype.h:230:1: note: target of using declaration
iscntrl(int _c)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/cctype:115:9: note: using declaration
using ::iscntrl _LIBCPP_USING_IF_EXISTS;
        ^
In file included from ../../gcc/cp/mapper-client.cc:31:
In file included from ../../gcc/system.h:227:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/map:2529:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/functional:526:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__functional/boyer_moore_searcher.h:27:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/vector:321:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_integral.h:32:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/locale:202:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:813:5: error: expected expression
    return std::use_facet<ctype<_CharT> >(__loc).is(ctype_base::cntrl, __c);
    ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
clang++ -std=gnu++11  -fno-PIE -c  -DIN_GCC_FRONTEND -g -O2   -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -fno-strict-aliasing -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Wconditionally-supported -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -I. -Icp -I../../gcc -I../../gcc/cp -I../../gcc/../include  -I../../gcc/../libcpp/include -I../../gcc/../libcody  -I../../gcc/../libdecnumber -I../../gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc/../libbacktrace   -o cp/name-lookup.o -MT cp/name-lookup.o -MMD -MP -MF cp/.deps/name-lookup.TPo ../../gcc/cp/name-lookup.cc
clang++ -std=gnu++11  -fno-PIE -c  -DIN_GCC_FRONTEND -g -O2   -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -fno-strict-aliasing -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Wconditionally-supported -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -I. -Icp -I../../gcc -I../../gcc/cp -I../../gcc/../include  -I../../gcc/../libcpp/include -I../../gcc/../libcody  -I../../gcc/../libdecnumber -I../../gcc/../libdecnumber/d
pd -I../libdecnumber -I../../gcc/../libbacktrace   -o cp/optimize.o -MT cp/optimize.o -MMD -MP -MF cp/.deps/optimize.TPo ../../gcc/cp/optimize.cc
20 errors generated.
make[1]: *** [cp/mapper-client.o] Error 1
make[1]: *** Waiting for unfinished jobs....
In file included from ../../gcc/cp/mapper-resolver.cc:29:
In file included from ../../gcc/system.h:227:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/map:2529:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/functional:526:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__functional/boyer_moore_searcher.h:27:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/vector:321:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_integral.h:32:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/locale:202:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:550:5: error: '__abi_tag__' attribute only applies to structs, variables, functions, and namespaces
    _LIBCPP_INLINE_VISIBILITY
    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__config:891:37: note: expanded from macro '_LIBCPP_INLINE_VISIBILITY'
#  define _LIBCPP_INLINE_VISIBILITY _LIBCPP_HIDE_FROM_ABI
                                    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__config:870:26: note: expanded from macro '_LIBCPP_HIDE_FROM_ABI'
          __attribute__((__abi_tag__(_LIBCPP_TOSTRING(_LIBCPP_ODR_SIGNATURE))))
                         ^
In file included from ../../gcc/cp/mapper-resolver.cc:29:
In file included from ../../gcc/system.h:227:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/map:2529:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/functional:526:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__functional/boyer_moore_searcher.h:27:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/vector:321:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_integral.h:32:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/locale:202:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:551:37: error: expected ';' at end of declaration list
    char_type toupper(char_type __c) const
                                    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:557:48: error: too many arguments provided to function-like macro invocation
    const char_type* toupper(char_type* __low, const char_type* __high) const
                                               ^
../../gcc/../include/safe-ctype.h:146:9: note: macro 'toupper' defined here
#define toupper(c) do_not_use_toupper_with_safe_ctype
        ^
In file included from ../../gcc/cp/mapper-resolver.cc:29:
In file included from ../../gcc/system.h:227:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/map:2529:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/functional:526:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__functional/boyer_moore_searcher.h:27:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/vector:321:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_integral.h:32:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/locale:202:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:569:48: error: too many arguments provided to function-like macro invocation
    const char_type* tolower(char_type* __low, const char_type* __high) const
                                               ^
../../gcc/../include/safe-ctype.h:148:9: note: macro 'tolower' defined here
#define tolower(c) do_not_use_tolower_with_safe_ctype
        ^
In file included from ../../gcc/cp/mapper-resolver.cc:29:
In file included from ../../gcc/system.h:227:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/map:2529:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/functional:526:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__functional/boyer_moore_searcher.h:27:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/vector:321:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_integral.h:32:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/locale:202:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:660:5: error: '__abi_tag__' attribute only applies to structs, variables, functions, and namespaces
    _LIBCPP_INLINE_VISIBILITY
    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__config:891:37: note: expanded from macro '_LIBCPP_INLINE_VISIBILITY'
#  define _LIBCPP_INLINE_VISIBILITY _LIBCPP_HIDE_FROM_ABI
                                    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__config:870:26: note: expanded from macro '_LIBCPP_HIDE_FROM_ABI'
          __attribute__((__abi_tag__(_LIBCPP_TOSTRING(_LIBCPP_ODR_SIGNATURE))))
                         ^
In file included from ../../gcc/cp/mapper-resolver.cc:29:
In file included from ../../gcc/system.h:227:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/map:2529:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/functional:526:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__functional/boyer_moore_searcher.h:27:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/vector:321:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_integral.h:32:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/locale:202:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:661:37: error: expected ';' at end of declaration list
    char_type toupper(char_type __c) const
                                    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:667:48: error: too many arguments provided to function-like macro invocation
    const char_type* toupper(char_type* __low, const char_type* __high) const
                                               ^
../../gcc/../include/safe-ctype.h:146:9: note: macro 'toupper' defined here
#define toupper(c) do_not_use_toupper_with_safe_ctype
        ^
In file included from ../../gcc/cp/mapper-resolver.cc:29:
In file included from ../../gcc/system.h:227:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/map:2529:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/functional:526:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__functional/boyer_moore_searcher.h:27:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/vector:321:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_integral.h:32:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/locale:202:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:679:48: error: too many arguments provided to function-like macro invocation
    const char_type* tolower(char_type* __low, const char_type* __high) const
                                               ^
../../gcc/../include/safe-ctype.h:148:9: note: macro 'tolower' defined here
#define tolower(c) do_not_use_tolower_with_safe_ctype
        ^
In file included from ../../gcc/cp/mapper-resolver.cc:29:
In file included from ../../gcc/system.h:227:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/map:2529:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/functional:526:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__functional/boyer_moore_searcher.h:27:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/vector:321:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_integral.h:32:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/locale:202:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:795:21: error: too many arguments provided to function-like macro invocation
isspace(_CharT __c, const locale& __loc)
                    ^
../../gcc/../include/safe-ctype.h:140:9: note: macro 'isspace' defined here
#define isspace(c) do_not_use_isspace_with_safe_ctype
        ^
In file included from ../../gcc/cp/mapper-resolver.cc:29:
In file included from ../../gcc/system.h:227:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/map:2529:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/functional:526:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__functional/boyer_moore_searcher.h:27:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/vector:321:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_integral.h:32:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/locale:202:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:795:1: error: declaration conflicts with target of using declaration already in scope
isspace(_CharT __c, const locale& __loc)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/_ctype.h:267:1: note: target of using declaration
isspace(int _c)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/cctype:121:9: note: using declaration
using ::isspace _LIBCPP_USING_IF_EXISTS;
        ^
In file included from ../../gcc/cp/mapper-resolver.cc:29:
In file included from ../../gcc/system.h:227:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/map:2529:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/functional:526:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__functional/boyer_moore_searcher.h:27:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/vector:321:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_integral.h:32:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/locale:202:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:797:5: error: expected expression
    return std::use_facet<ctype<_CharT> >(__loc).is(ctype_base::space, __c);
    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:798:2: error: expected ';' at end of declaration
}
 ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:803:21: error: too many arguments provided to function-like macro invocation
isprint(_CharT __c, const locale& __loc)
                    ^
../../gcc/../include/safe-ctype.h:136:9: note: macro 'isprint' defined here
#define isprint(c) do_not_use_isprint_with_safe_ctype
        ^
In file included from ../../gcc/cp/mapper-resolver.cc:29:
In file included from ../../gcc/system.h:227:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/map:2529:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/functional:526:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__functional/boyer_moore_searcher.h:27:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/vector:321:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_integral.h:32:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/locale:202:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:803:1: error: declaration conflicts with target of using declaration already in scope
isprint(_CharT __c, const locale& __loc)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/_ctype.h:255:1: note: target of using declaration
isprint(int _c)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/cctype:119:9: note: using declaration
using ::isprint _LIBCPP_USING_IF_EXISTS;
        ^
In file included from ../../gcc/cp/mapper-resolver.cc:29:
In file included from ../../gcc/system.h:227:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/map:2529:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/functional:526:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__functional/boyer_moore_searcher.h:27:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/vector:321:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_integral.h:32:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/locale:202:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:805:5: error: expected expression
    return std::use_facet<ctype<_CharT> >(__loc).is(ctype_base::print, __c);
    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:806:2: error: expected ';' at end of declaration
}
 ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:811:21: error: too many arguments provided to function-like macro invocation
iscntrl(_CharT __c, const locale& __loc)
                    ^
../../gcc/../include/safe-ctype.h:128:9: note: macro 'iscntrl' defined here
#define iscntrl(c) do_not_use_iscntrl_with_safe_ctype
        ^
In file included from ../../gcc/cp/mapper-resolver.cc:29:
In file included from ../../gcc/system.h:227:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/map:2529:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/functional:526:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__functional/boyer_moore_searcher.h:27:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/vector:321:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_integral.h:32:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/locale:202:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:811:1: error: declaration conflicts with target of using declaration already in scope
iscntrl(_CharT __c, const locale& __loc)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/_ctype.h:230:1: note: target of using declaration
iscntrl(int _c)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/cctype:115:9: note: using declaration
using ::iscntrl _LIBCPP_USING_IF_EXISTS;
        ^
In file included from ../../gcc/cp/mapper-resolver.cc:29:
In file included from ../../gcc/system.h:227:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/map:2529:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/functional:526:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__functional/boyer_moore_searcher.h:27:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/vector:321:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_integral.h:32:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/locale:202:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:813:5: error: expected expression
    return std::use_facet<ctype<_CharT> >(__loc).is(ctype_base::cntrl, __c);
    ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[1]: *** [cp/mapper-resolver.o] Error 1
In file included from ../../gcc/cp/module.cc:212:
In file included from ../../gcc/system.h:233:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/vector:321:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_integral.h:32:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/locale:202:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:550:5: error: '__abi_tag__' attribute only applies to structs, variables, functions, and namespaces
    _LIBCPP_INLINE_VISIBILITY
    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__config:891:37: note: expanded from macro '_LIBCPP_INLINE_VISIBILITY'
#  define _LIBCPP_INLINE_VISIBILITY _LIBCPP_HIDE_FROM_ABI
                                    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__config:870:26: note: expanded from macro '_LIBCPP_HIDE_FROM_ABI'
          __attribute__((__abi_tag__(_LIBCPP_TOSTRING(_LIBCPP_ODR_SIGNATURE))))
                         ^
In file included from ../../gcc/cp/module.cc:212:
In file included from ../../gcc/system.h:233:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/vector:321:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_integral.h:32:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/locale:202:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:551:37: error: expected ';' at end of declaration list
    char_type toupper(char_type __c) const
                                    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:557:48: error: too many arguments provided to function-like macro invocation
    const char_type* toupper(char_type* __low, const char_type* __high) const
                                               ^
../../gcc/../include/safe-ctype.h:146:9: note: macro 'toupper' defined here
#define toupper(c) do_not_use_toupper_with_safe_ctype
        ^
In file included from ../../gcc/cp/module.cc:212:
In file included from ../../gcc/system.h:233:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/vector:321:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_integral.h:32:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/locale:202:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:569:48: error: too many arguments provided to function-like macro invocation
    const char_type* tolower(char_type* __low, const char_type* __high) const
                                               ^
../../gcc/../include/safe-ctype.h:148:9: note: macro 'tolower' defined here
#define tolower(c) do_not_use_tolower_with_safe_ctype
        ^
In file included from ../../gcc/cp/module.cc:212:
In file included from ../../gcc/system.h:233:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/vector:321:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_integral.h:32:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/locale:202:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:660:5: error: '__abi_tag__' attribute only applies to structs, variables, functions, and namespaces
    _LIBCPP_INLINE_VISIBILITY
    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__config:891:37: note: expanded from macro '_LIBCPP_INLINE_VISIBILITY'
#  define _LIBCPP_INLINE_VISIBILITY _LIBCPP_HIDE_FROM_ABI
                                    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__config:870:26: note: expanded from macro '_LIBCPP_HIDE_FROM_ABI'
          __attribute__((__abi_tag__(_LIBCPP_TOSTRING(_LIBCPP_ODR_SIGNATURE))))
                         ^
In file included from ../../gcc/cp/module.cc:212:
In file included from ../../gcc/system.h:233:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/vector:321:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_integral.h:32:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/locale:202:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:661:37: error: expected ';' at end of declaration list
    char_type toupper(char_type __c) const
                                    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:667:48: error: too many arguments provided to function-like macro invocation
    const char_type* toupper(char_type* __low, const char_type* __high) const
                                               ^
../../gcc/../include/safe-ctype.h:146:9: note: macro 'toupper' defined here
#define toupper(c) do_not_use_toupper_with_safe_ctype
        ^
In file included from ../../gcc/cp/module.cc:212:
In file included from ../../gcc/system.h:233:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/vector:321:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_integral.h:32:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/locale:202:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:679:48: error: too many arguments provided to function-like macro invocation
    const char_type* tolower(char_type* __low, const char_type* __high) const
                                               ^
../../gcc/../include/safe-ctype.h:148:9: note: macro 'tolower' defined here
#define tolower(c) do_not_use_tolower_with_safe_ctype
        ^
In file included from ../../gcc/cp/module.cc:212:
In file included from ../../gcc/system.h:233:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/vector:321:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_integral.h:32:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/locale:202:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:795:21: error: too many arguments provided to function-like macro invocation
isspace(_CharT __c, const locale& __loc)
                    ^
../../gcc/../include/safe-ctype.h:140:9: note: macro 'isspace' defined here
#define isspace(c) do_not_use_isspace_with_safe_ctype
        ^
In file included from ../../gcc/cp/module.cc:212:
In file included from ../../gcc/system.h:233:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/vector:321:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_integral.h:32:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/locale:202:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:795:1: error: declaration conflicts with target of using declaration already in scope
isspace(_CharT __c, const locale& __loc)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/_ctype.h:267:1: note: target of using declaration
isspace(int _c)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/cctype:121:9: note: using declaration
using ::isspace _LIBCPP_USING_IF_EXISTS;
        ^
In file included from ../../gcc/cp/module.cc:212:
In file included from ../../gcc/system.h:233:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/vector:321:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_integral.h:32:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/locale:202:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:797:5: error: expected expression
    return std::use_facet<ctype<_CharT> >(__loc).is(ctype_base::space, __c);
    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:798:2: error: expected ';' at end of declaration
}
 ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:803:21: error: too many arguments provided to function-like macro invocation
isprint(_CharT __c, const locale& __loc)
                    ^
../../gcc/../include/safe-ctype.h:136:9: note: macro 'isprint' defined here
#define isprint(c) do_not_use_isprint_with_safe_ctype
        ^
In file included from ../../gcc/cp/module.cc:212:
In file included from ../../gcc/system.h:233:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/vector:321:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_integral.h:32:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/locale:202:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:803:1: error: declaration conflicts with target of using declaration already in scope
isprint(_CharT __c, const locale& __loc)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/_ctype.h:255:1: note: target of using declaration
isprint(int _c)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/cctype:119:9: note: using declaration
using ::isprint _LIBCPP_USING_IF_EXISTS;
        ^
In file included from ../../gcc/cp/module.cc:212:
In file included from ../../gcc/system.h:233:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/vector:321:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_integral.h:32:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/locale:202:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:805:5: error: expected expression
    return std::use_facet<ctype<_CharT> >(__loc).is(ctype_base::print, __c);
    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:806:2: error: expected ';' at end of declaration
}
 ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:811:21: error: too many arguments provided to function-like macro invocation
iscntrl(_CharT __c, const locale& __loc)
                    ^
../../gcc/../include/safe-ctype.h:128:9: note: macro 'iscntrl' defined here
#define iscntrl(c) do_not_use_iscntrl_with_safe_ctype
        ^
In file included from ../../gcc/cp/module.cc:212:
In file included from ../../gcc/system.h:233:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/vector:321:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_integral.h:32:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/locale:202:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:811:1: error: declaration conflicts with target of using declaration already in scope
iscntrl(_CharT __c, const locale& __loc)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/_ctype.h:230:1: note: target of using declaration
iscntrl(int _c)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/cctype:115:9: note: using declaration
using ::iscntrl _LIBCPP_USING_IF_EXISTS;
        ^
In file included from ../../gcc/cp/module.cc:212:
In file included from ../../gcc/system.h:233:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/vector:321:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__format/formatter_integral.h:32:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/locale:202:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__locale:813:5: error: expected expression
    return std::use_facet<ctype<_CharT> >(__loc).is(ctype_base::cntrl, __c);
    ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[1]: *** [cp/module.o] Error 1
rm gcc.pod
make: *** [all-gcc] Error 2

==> Formula
Path: /Users/daniel/workspace/psxdev/pcsx-redux/tools/macos-mips/mipsel-none-elf-gcc.rb
==> Configuration
HOMEBREW_VERSION: 4.2.17-63-g707abc9
ORIGIN: https://github.com/Homebrew/brew
HEAD: 707abc97f28f3505fb7a988208a97e7d34bd3e5b
Last commit: 25 minutes ago
Core tap HEAD: ccffb770750f387ff17cd4df7bb3755771c2bc6f
Core tap last commit: 5 weeks ago
Core tap JSON: 11 Apr 16:15 UTC
Core cask tap HEAD: 4322204982dc0849ca5b587c8a39b8922c5f38b4
Core cask tap last commit: 5 weeks ago
Core cask tap JSON: 11 Apr 16:15 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_EDITOR: vim
HOMEBREW_MAKE_JOBS: 10
HOMEBREW_SORBET_RUNTIME: set
Homebrew Ruby: 3.1.4 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/bin/ruby
CPU: 10-core 64-bit arm_firestorm_icestorm
Clang: 15.0.0 build 1500
Git: 2.43.0 => /opt/homebrew/bin/git
Curl: 8.4.0 => /usr/bin/curl
macOS: 14.4.1-arm64
CLT: 15.3.0.0.1.1708646388
Xcode: 15.3
Rosetta 2: false
==> ENV
HOMEBREW_CC: clang
HOMEBREW_CXX: clang++
MAKEFLAGS: -j10
CMAKE_PREFIX_PATH: /opt/homebrew
CMAKE_INCLUDE_PATH: /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers
CMAKE_LIBRARY_PATH: /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries
PKG_CONFIG_PATH: /opt/homebrew/opt/gmp/lib/pkgconfig:/opt/homebrew/opt/mpfr/lib/pkgconfig
PKG_CONFIG_LIBDIR: /usr/lib/pkgconfig:/opt/homebrew/Library/Homebrew/os/mac/pkgconfig/14
HOMEBREW_GIT: git
HOMEBREW_SDKROOT: /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk
ACLOCAL_PATH: /opt/homebrew/share/aclocal
PATH: /opt/homebrew/opt/gnu-sed/libexec/gnubin:/opt/homebrew/Library/Homebrew/shims/mac/super:/opt/homebrew/opt/mipsel-none-elf-binutils/bin:/opt/homebrew/opt/gnu-sed/bin:/usr/bin:/bin:/usr/sbin:/sbin

Error: mipsel-none-elf-gcc 13.2.0 did not build
Logs:
     /Users/daniel/Library/Logs/Homebrew/mipsel-none-elf-gcc/00.options.out
     /Users/daniel/Library/Logs/Homebrew/mipsel-none-elf-gcc/01.configure
     /Users/daniel/Library/Logs/Homebrew/mipsel-none-elf-gcc/01.configure.cc
     /Users/daniel/Library/Logs/Homebrew/mipsel-none-elf-gcc/02.make
     /Users/daniel/Library/Logs/Homebrew/mipsel-none-elf-gcc/02.make.cc
     /Users/daniel/Library/Logs/Homebrew/mipsel-none-elf-gcc/mipsel-none-elf-gcc-build
Do not report this issue to Homebrew/brew or Homebrew/homebrew-core!

Expected behavior

It should compile...

Steps to reproduce the bug

As described

Operating System

MacOS 14.4.1 (23E224)

PCSX-Redux version

not relevant

CPU model

not relevant

GPU model & Drivers

not relevant

BIOS version

not relevant

Options

Iso checks

No response

Logs

No response

Additional information

No response

caldog20 commented 5 months ago

@DanEEStar There are currently issues with compiling even standard gcc 13.2.0 from source on latest Mac OS Apple Silicon with latest Xcode Command Line Tools/SDK. Currently, you can install standard gcc from homebrew but it's pre-bottled (pre-compiled) unless you specify brew install gcc --build-from-source in which it fails with the same errors as the mips gcc toolchain formula.

As per the GCC team, GCC is not officially supported yet on Apple Silicon. There is a fork at https://github.com/iains/gcc-darwin-arm64 but it's a decent way from being complete enough to port back into mainline GCC.

I will keep monitoring (I am on Mac M2), and have some emails out to those devs to see if they have ran into this issue and may be able to provide a patch. If so, I will modify the formula in the Redux repo to use it, provided the patches provided result in a successful build.

Thanks for your brining this issue to our attention.

nicolasnoble commented 5 months ago

Luckily, it seems that gcc 14.1 which got released today has fixed this issue, so #1652 should now fix this one, once I fix all of the related issues of upgrading a toolchain.

nicolasnoble commented 5 months ago

The CI seems to indicate this is fixed.