
- #Macports upgrade variants for mac
- #Macports upgrade variants install
- #Macports upgrade variants mod
- #Macports upgrade variants pro
- #Macports upgrade variants software
To see all the variants available for a certain package, type port variants. Note that the plus sign (“+”) in the command above indicates a variant of the MacPorts package.
#Macports upgrade variants install
Since I work with climate data in my research, NetCDF is the first library I want to install: sudo port install netcdf +gcc9 +dap +netcdf4 +hdf4 To set them as default on your system, just type: sudo port select -set gcc mp-gcc9įrom now on, all you have to do is go ahead and install your favourite libraries and programs. Note: by default MacPorts will install executables for the fortran and C compilers under /opt/local/bin. In the meantime, time to go grab one more beer…
#Macports upgrade variants pro
On my Macbook Pro Mid 2012 (dual-core 2.5 GHz), it took nearly 4 hours to finish installing gcc and its depedencies. The entire process will take a few hours to complete, since the packages will be compiled from the source. You can install both gcc and gfortran by typing: sudo port install gcc9
#Macports upgrade variants software
Since I like to use the most up-to-date software version that is available, let's choose GCC 9. First, let's check which versions of gcc are available in the repository: port list | grep gccĪt the time of this posting we have all versions ranging from gcc43 to gcc9. Virtually every scientific software we will install from now on depends on these compilers. The fundamental packages we need to get are the GNU compilers gcc and gfortran. Once you finish installing MacPorts, go to the terminal and refresh its list of packages: sudo port selfupdate If you are familiar to unix, a good analogy is that MacPorts is similar to Ubuntu's aptitude or Suse's zypper. Now let's install MacPorts, which is a package manager for macOS.

Installing XQuartz is a requirement to the next step. The way to go here is to install the latest XQuartz at. It will then download (about 150 Mb) and install all basic tools for development that we need. Once Xcode is downloaded and installed, install the command line tools by typing the following command on your terminal application: xcode-select -install Downloading it will take a while, so in the meantime I suggest you to go grab a beer or keep using your computer for something else that doesn't rely on the internet connection. Note: Xcode is currently (as of version 11.3) a massive - ~8 Gb - download. Just search for Xcode and install the first occurence returned. The easiest way to get Xcode is through your Mac's App Store. These applications distributed by Apple itself will provide the fundamental tools to develop software: Xcode installs the Apple C compilers and command line tools will provide automake, autoreconf, basic libraries and etc. Xcodeįirst of all, you will need to install the latest Xcode and command line tools.

The following notes were tested and confirmed to work on macOS High Sierra (10.13), Mojave (10.14) and Catalina (10.15).
#Macports upgrade variants for mac
What follows is intended to be straightforward instructions for Mac owners to set up their computers to work with scientific programming (which often relies on Fortran and C compilers). I decided to write this post simply as a collection of notes that I used to put together my own system, and that hopefully could spare someone else to spend hours looking for them. This was essentially because all the information I needed was quite spread over many technical documents and forum discussions. With the advantage that the old Xcode gcc can generate ppc i386 x86_64 universals that work eveywhere.As a scientist who works with computer models, it took me a long time to adapt switching from a Linux computer to a Mac computer. usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0) usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.7) usr/lib/libc++abi.dylib (compatibility version 1.0.0, current version 5.0.1) usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 5.0.1)

Somehow libstdc++ is not included (needed) - clever stuff I guess. I guess the whole idea of bootstrapping is to provide a path to clang from gcc, as indicated by: Warning: All compilers are either blacklisted or unavailable defaulting to first fallback option. It looks like it is built with gcc (g++4.2). Interesting question: is libc++ built with GCC and itself depending on libstdc++ (instead of libc++abi, as on Linux) a viable candidate for the libc++ conversion? I'll be attaching the portfile patches only here, for the patchfiles please refer to
#Macports upgrade variants mod
