I’m getting this error message when I tried to compile “respknt” program under Rosetta 2 on my macOS-arm64 (apple silicon/M1 chip):
gfortran -g runtest.o runcmd.o -o bin//runtest
ld: warning: ignoring file runtest.o, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
ld: warning: ignoring file runcmd.o, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
Undefined symbols for architecture arm64:
“_main”, referenced from:
implicit entry/start for main executable
ld: symbol(s) not found for architecture arm64
collect2: error: ld returned 1 exit status
make: *** [runtest] Error 1.
Please note that, “respknt” is a seismological software that is built on reflection matrix method of Kenneth 1986.
I switched the architecture on my Mac terminal from arm64 to MacOS x86_64 to test if I could compile the “respknt” program.
I even verified if I have switched the architecture to MacOS x86_64 by invoking the “gcc -v” command:
Apple clang version 14.0.0 (clang-1400.0.29.202)
Target: x86_64-apple-darwin22.3.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin.
Also, I got “i386” when I invoked “arch” command.
I would appreciate it if you could tell me what I’m doing wrong. Thank you for your time!
Olumide Sanusi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.