I am trying to run fortran code on an Apple Macbook pro M1 chip machine running Big Sur v11.4. When testing my code I get the error
"f951: Error: unrecognized command-line option ‘-auxbase’".
I've written a test script test.f containing the following
program test
print *, "Hello World"
end program test
The output of gcc -v
:
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 12.0.5 (clang-1205.0.22.11)
Target: arm64-apple-darwin20.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
The output of gfortran -v
:
Using built-in specs.
COLLECT_GCC=gfortran
Target: x86_64-apple-darwin13.4.0
Configured with: ../configure --prefix=/Users/pfesi/opt/anaconda3/envs/fermi --build=x86_64-apple-darwin13.4.0 --host=x86_64-apple-darwin13.4.0 --target=x86_64-apple-darwin13.4.0 --with-libiconv-prefix=/Users/pfesi/opt/anaconda3/envs/fermi --enable-languages=fortran --disable-multilib --enable-checking=release --disable-bootstrap --disable-libssp --with-gmp=/Users/pfesi/opt/anaconda3/envs/fermi --with-mpfr=/Users/pfesi/opt/anaconda3/envs/fermi --with-mpc=/Users/pfesi/opt/anaconda3/envs/fermi --with-isl=/Users/pfesi/opt/anaconda3/envs/fermi --with-native-system-header-dir=/Applications/Xcode_12.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include
Thread model: posix
gcc version 7.5.0 (GCC)
The output of which gcc
:
/usr/bin/gcc
The output of which gfortran
:
/Users/pfesi/opt/anaconda3/envs/fermi/bin/gfortran
I'm not an expert on gfortran and any help will be highly appreciated.