I tried compiling version 12.2.0 and it attempts to access system headers at /usr/include, but on mac the system headers are stored at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include. Here's my error: rm -rf include-fixed; mkdir include-fixed chmod a+rx include-fixed if [ -d ../prev-gcc ]; then \ cd ../prev-gcc && \ /Library/Developer/CommandLineTools/usr/bin/make real-install-headers-tar DESTDIR=`pwd`/../gcc/ \ libsubdir=. ; \ else \ set -e; for ml in `cat fixinc_list`; do \ sysroot_headers_suffix=`echo ${ml} | sed -e 's/;.*$//'`; \ multi_dir=`echo ${ml} | sed -e 's/^[^;]*;//'`; \ fix_dir=include-fixed${multi_dir}; \ if ! false && test ! -d `echo /usr/include | sed -e :a -e 's,[^/]*/\.\.\/,,' -e ta`; then \ echo The directory that should contain system headers does not exist: >&2 ; \ echo " `echo /usr/include | sed -e :a -e 's,[^/]*/\.\.\/,,' -e ta`" >&2 ; \ tooldir_sysinc=`echo "/lib/gcc/x86_64-apple-darwin21.6.0/12.2.0/../../../../x86_64-apple-darwin21.6.0/sys-include" | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`; \ if test "x`echo /usr/include | sed -e :a -e 's,[^/]*/\.\.\/,,' -e ta`" = "x${tooldir_sysinc}"; \ then sleep 1; else exit 1; fi; \ fi; \ /bin/sh ../../gcc-12.2.0/gcc/../mkinstalldirs ${fix_dir}; \ chmod a+rx ${fix_dir} || true; \ (TARGET_MACHINE='x86_64-apple-darwin21.6.0'; srcdir=`cd ../../gcc-12.2.0/gcc; ${PWDCMD-pwd}`; \ SHELL='/bin/sh'; MACRO_LIST=`${PWDCMD-pwd}`/macro_list ; \ gcc_dir=`${PWDCMD-pwd}` ; \ export TARGET_MACHINE srcdir SHELL MACRO_LIST && \ cd ../build-x86_64-apple-darwin21.6.0/fixincludes && \ /bin/sh ./fixinc.sh "${gcc_dir}/${fix_dir}" \ `echo /usr/include | sed -e :a -e 's,[^/]*/\.\.\/,,' -e ta` ); \ rm -f ${fix_dir}/syslimits.h; \ if [ -f ${fix_dir}/limits.h ]; then \ mv ${fix_dir}/limits.h ${fix_dir}/syslimits.h; \ else \ cp ../../gcc-12.2.0/gcc/gsyslimits.h ${fix_dir}/syslimits.h; \ fi; \ chmod a+r ${fix_dir}/syslimits.h; \ done; \ fi The directory that should contain system headers does not exist: /usr/include make[1]: *** [stmp-fixinc] Error 1 make: *** [all-gcc] Error 2 On Fri, Feb 17, 2023 at 8:04 AM Iain Sandoe wrote: > > > > On 17 Feb 2023, at 15:37, Jonathan Wakely via Gcc > wrote: > > > > On Fri, 17 Feb 2023, 15:17 -xlan- via Gcc, wrote: > > > >> I was building gcc version 4.9.1 > > > > > > Why? > > Indeed, what is the use-case? > trying to build such an old GCC version on modern macOS could be > problematic. > > > on Mac OS version when I got this error: > >> > >> In file included from ../../gcc-4.9.1/gcc/c/c-objc-common.c:33: > >> In file included from > >> > >> > /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/new:93: > >> > >> > /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/exception:184:5: > >> error: no member named 'fancy_abort' in namespace 'std::__1'; did you > mean > >> simply 'fancy_abort'? > >> _VSTD::abort(); > >> ^~~~~~~ > >> > > > > > > The GCC sources define 'abort' as a macro, which appears to be > incompatible > > with LLVM's libc++. > > > > You might be able to compile using -stdlib=libstdc++ instead. > > There are no headers for libstdc++ in SDKs for OSX 10.13 + (so you would > need also to find an > older SDK and then build with an OSX target of say 10.12). > > What you are trying to do is going to required quite advanced techniques > to deal with the difference in the OS, compiler and bootstrap tools. I > have not attempted anything < GCC-5 on newer machines. > > Iain > > > >