-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
Description
The current installation guide (muffin3.install.MacOS.pdf) for M1/M2 Macs contains instructions that can lead to compilation errors when running make testbiogem.
Problem
Following the current instructions in step 7, users are directed to set:
NETCDF_DIR=/usr/local/Cellar/netcdf/4.9.2_1Or whatever the output of the brew info.
However, on M1/M2 Macs with Homebrew, this causes the following error:
Fatal Error: Cannot open module file 'netcdf.mod' for reading at (1): No such file or directory
This occurs because:
- The path needs to accommodate both
netcdfandnetcdf-fortranpackages - Pointing to a specific version in
/Cellar/breaks when packages are updated (may be, this is just a guess)
Solution
In user.mak (step 7), M1/M2 Mac users should set:
NETCDF_DIR=/opt/homebrewThis parent directory contains symlinks to both required libraries and remains stable across package updates.
Additional Issue: Whitespace in MACHINE Setting
Users should be careful when editing the MACHINE=OSX_M line - any trailing spaces will cause the conditional compilation flags to fail, resulting in:
gfortran: error: unrecognized command-line option '-msse'
Suggested Documentation Updates
The installation guide should be updated to:
- Recommend
/opt/homebrewfor M1/M2 Macs (instead of the version-specific Cellar path) - Add a troubleshooting note warning about whitespace in the
MACHINEvariable - Clarify that Intel Macs use
/usr/localwhile Apple Silicon uses/opt/homebrew
Environment
- macOS with M1 processor
- Homebrew package manager
- netcdf 4.9.3_1
- netcdf-fortran 4.6.2
Metadata
Metadata
Assignees
Labels
No labels