Opened 3 years ago

Last modified 3 years ago

#296 accepted Defect

Compiling fails on Mac OS 10.15 with "unable to execute command: Illegal instruction" error — at Initial Version

Reported by: craymond Owned by:
Priority: major Milestone:
Component: FP coding/compilation Version: FLEXPART 10.4
Keywords: Cc: cr2630@…, petra.seibert@…

Description

I am trying to compile Flexpart for the first time and would greatly appreciate some help. I've gotten nearly to the end of the process (having installed the necessary libraries, etc.) but am now quite stuck. My set-up is as follows:

Mac OS 10.15.7
gcc10.2 (this version is also used to build mpicc)
ulimit -n 1000
ulimit -s 16383
LIBRARY_PATH, LD_LIBRARY_PATH, and various FLAGS are set to (I believe) the appropriate directories.

I then try to compile with
make -f makefile gcc=10.2 FC=gfortran ncf=yes -I/dir/of/eccodes/build/include/grib_api.mod

which results in the error

clang: error: unable to execute command: Illegal instruction: 4
clang: error: clang integrated assembler command failed due to signal (use -v to see invocation)
Apple clang version 12.0.0 (clang-1200.0.32.29)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir?: /Applications/Xcode?.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
clang: note: diagnostic msg: PLEASE submit a bug report to http://developer.apple.com/bugreporter/ and include the crash backtrace, preprocessed source, and associated run script.
clang: note: diagnostic msg: Error generating preprocessed source(s) - no preprocessable inputs.
make: * [com_mod.o] Error 1

Experimenting with various flags and compilers (i.e. gcc, gfortran, mpicc, mpif90) has not helped so far, and the answers found from Google are either too complex for me to understand, or too specific to seem applicable. What I can tell is it has something to do with wrong compiler options and/or Mac compatibility with 32-bit operations, but what these are exactly I can't determine. I'm hoping someone else has had this issue (or a similar one) as well and can advise!

Thank you,
Colin Raymond

Change History (0)

Note: See TracTickets for help on using tickets.
hosted by ZAMG