Installing GFortran in MacPorts after Upgrading MacOS Ventura to MacOS Sequoia 15.3
I purchased an M4 MacBook Pro laptop to replace my 2019-vintage Intel MacBook Pro. The older laptop was still working well, aside from running out of disk space, but the prospect of China tariffs motivated an accelerated purchase and upgrade. The new M4 laptop has actually been waiting a month for my changeover. I decided to upgrade the older laptop to Sequoia MacOS to facilitate the transfer of files and file structures. This enables me to perform the dirty work of reviving my computing environments in the context of a familiar keyboard.
When I tried to compile a Fortran code in Sequoia before upgrading the Fortran installation, the compiler failed because it looked for a directory that exists in Ventura, but does not exist in Sequoia. So I definitely needed to upgrade everything.
Following the JParkCodes post of May 30, 2023, I tried to selfupdate MacPorts. logged in as root, I typed
port selfupdate
This command upgraded my MacPort software from 2.10.4 to 2.10.5. I was also advised by the selfupdate that
The ports tree has been updated.
65 ports are outdated. Run 'port outdated' for details.
To upgrade your installed ports, you should run
port upgrade outdated
If an upgrade process hangs, one must kill the associated process in order to uninstall gcc12. I lwarnewd this the hard way.
Once the gcc14 port is installed, then one must set up the aliases properly to compile Fortran and C programs. My changes to .cshrc were the lines
alias cc '/opt/local/bin/gcc-mp-14'
alias gcc '/opt/local/bin/gcc-mp-14'
alias gfortran '/opt/local/bin/gfortran-mp-14'