If I verify my gcc --version I get:
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 13.0.0 (clang-1300.0.29.30)
Target: arm64-apple-darwin21.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
And when I build with make after configure, I obtain the following error:
ld: warning: ignoring file /usr/local/Cellar/gcc/11.3.0_2/lib/gcc/11/libquadmath.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
ld: in '/usr/local/Cellar/gcc/11.3.0_2/lib/gcc/11/libquadmath.0.dylib', building for macOS-x86_64 but attempting to link with file built for macOS-arm64
collect2: error: ld returned 1 exit status
make[8]: *** [libfgsl.la] Error 1
make[7]: *** [subdir-fgsl] Error 2
make[6]: *** [build-fgsl] Error 2
make[5]: *** [hd-std-all-subdirs] Error 2
make[4]: *** [all-subdirs] Error 2
make[3]: *** [hd-std-all] Error 2
make[2]: *** [all] Error 2
make[1]: *** [heacore] Error 2
make: *** [all] Error 2
Following the similar question here, I verified that
% ranlib --version
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: unknown option character `-' in: --version
Usage: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib [-sactfqLT] [-] archive [...]
(base) cmalacaria@issi47 BUILD_DIR % ranlib -version
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: unknown option character `v' in: -version
Usage: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib [-sactfqLT] [-] archive [...]
and that echo $PATH returns
I have followed similar questions and a) updated Cmake, b) attempted to edit CMAKE_OSX_ARCHITECTURES (but not found in cmake), and more.
Why is this happening and how to fix it?