Skip to content

mf2005 not compiling on MacOS Monterey #97

Open
@Olsthoorn

Description

@Olsthoorn

The new MacOS Monterey broke well running old USGS programs now leaving incomplete output files upon normal termination. This proved to be due to not flushing the file buffers upon ending the program. This is also the case when recompiled with the newest gfortran for MacOS Monterey, hence the problem would lay in the dynamic system libraries that come with the OS. This is solved by adding CALL FLUSH() just before the last END statement in the main program.
Next to this, Apple also broke compiling with Pymake. This is due to 1) the stdio.h and stdlib.h no longer on normal /usr/local/bin or so. It is solved by adding an INCLUDEDIR directive pointing to the right folder. Second, Apple removed the standard libraries like libc.a, libc.so from the file system. They are not win the "dynamic link cache". This turns out to be solved by adding --sysroot compiler directive.

I add the adapted makefiles for both mf2005 and seawat that show the correct arguments. Notice that seawat has more issues, due to the new fortran compiler being more seviere than previous ones, which are also described in the makefile.
makefile_mac_monterey_swt.txt
makefile_mf2005_MacMontery.txt
Compling_issue_analysis.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions