Tuesday, May 30, 2023

Installing GFortran in MacPorts

 After some googling, I discovered the pages on how to install gcc and gfortran in MacPorts.

There are several versions of gcc available, but all except version 12 returned a warning that their installation would fail.  This is probably a MacOS Ventura thing -- is version 12 the version for Ventura?

sudo port install gcc12 

worked without too much fuss, not to long to install, and gfortran seems to be part of /usr/local/bin

bin/gfortran-mp-12

bin/gcc-mp-12

One can alias these in the .cshrc file, or can ask macports to do it.  From 

"I had to combine these two answers as follows: sudo port install gcc11 +gfortran; sudo port select --set gcc mp-gcc11 
– pidloop
 Jan 19, 2022 at 23:12"

The spelling of this port command for aliasing is correct, even though the spelling of the executable file in the ./bin subdirectory is different

sudo port select --set gcc mp-gcc12

enables the command "gfortran" to find the gcc12 version of gfortran.



A Few Words about MacPorts

 The first of three computers to upgrade to MacOS Ventura, so making all the old tools work will be done thrice.  I document the first try.

The computing environment I am accustomed to relies on GCC Fortran and the text editor nedit.  Nedit is the "Nirvana editor" from way way back, but I am used to it in Xwindow environments.  Nedit has always been an open-source tool that could be loaded with Fink, but Fink is no more.  The Nedit software has a website, but downloading this package led to failure, because it was not updated to the system directories of Ventura.  The software package aggregator MacPorts has nedit, and has been updated.  So that is where I went for it.

https://manjaro.site/install-macports-on-macos-ventura/

https://www.macports.org/

From documentation:

"This installer contains a Universal installer for macOS 13.0.x and requires the curl and OpenSSL libraries provided by macOS. To build ports locally, you will need to install the Xcode Command Line Tools by running "xcode-select --install" in your terminal. Also required for many GUI applications is the installation of Apple's Xcode development suite, available from the Mac App Store or from Apple's Developer site. It is also available as a separate installation on Mac OS X CDs and DVDs."

"The MacPorts installer copies MacPorts to the target directory /opt/local. If you wish to install to any path other than that, you must install MacPorts via its source code. See Installing MacPorts on the MacPorts webpage for instructions on installation alternatives."

"The main user interface to MacPorts is the port command and the various facilities it provides for installing ports. The first thing you should do after you install MacPorts is to make sure it is fully up to date by pulling the latest revisions to the Portfiles and any updated MacPorts base code from our rsync server, all accomplished simply by running the port selfupdate command as the Unix superuser:

sudo port selfupdate

Running this command on a regular basis is recommended -- it ensures your MacPorts installation is always up to date. Afterwards, you may search for ports to install:

port search <portname>

where <portname> is the name of the port you are searching for, or a partial name. To install a port you've chosen, you need to run the port install command as the Unix superuser:

sudo port install <portname>

where now <portname> maps to an exact port name in the ports tree, such as those returned by the port search commandPlease consult the port(1) man page for complete documentation for this command and the software installation process."

Monday, May 29, 2023

Upgrade to MacOS Ventura breaks things!

 My office iMac lost its Fusion Drive functionality during a past system upgrade, unbeknownst to me.  It was so so slow!  It took some online sleuthing to discover the likely cause and to organize a fix.   The office iMac has regained its speed, but in doing so I perforce upgraded to MacOS Ventura. This broke the handful of applications leftover from Fink, a software package that has kept my Macs useful since the early 1990s.  The Fink software package has never been updated to install properly in MacOS 11 (Big Sur), so installing it into Ventura would be a fool's game.  The directories have been moved around and the older files won't compile.  Luckily the Ports software package has been upgraded as MacOS has evolved, so I am switching to that.

 
Link