Octave 4 upgrade via MacPorts fails after “port upgrade outdated”

To keep MacPorts and its ports up to date a frequently performed  sudo port selfupgrade and sudo port upgrade outdated do the job.

Unfortunately the update/grade of GNU Octave fails:

Error: org.macports.fetch for port octave returned: must set at least one Fortran variant (e.g. +gfortran, +gccX, +g95)


I installed GNU Octave via Install Octave on Mac OS X El Capitan. Currently MacPorts supports Octave 4.0.3 instead of 3.8.2 before. But this version has to be installed with other variants.

Checking my old status via port installed | grep -i "octave" gave the following result:

octave @3.8.2_15+atlas+gcc5+glgui+gui+java+metis+qtgui

To lookup the current variants I did port variants octave:

octave has the variants:
[+]accelerate: Build with linear algebra from built-in Accelerate framework
 * conflicts with atlas openblas
[+]app: build application bundle to launch octave
 atlas: Build with linear algebra from ATLAS
 * conflicts with accelerate openblas
 clang37: Build using the MacPorts clang 3.7 compiler
 * conflicts with clang38 clang39
 clang38: Build using the MacPorts clang 3.8 compiler
 * conflicts with clang37 clang39
 clang39: Build using the MacPorts clang 3.9 compiler
 * conflicts with clang37 clang38
[+]docs: build documentation files
[+]fltk: enable fltk as a graphics toolkit for plotting
[+]gfortran: Build using the MacPorts gcc 5 Fortran compiler
[+]graphicsmagick: use GraphicsMagick for image I/O
 java: enable Java interface
 jit: enable JIT compiler (EXPERIMENTAL)
 openblas: Build with linear algebra from OpenBLAS
 * conflicts with accelerate atlas
[+]qt4gui: build the GUI using Qt4
[+]sound: enable audio support (file I/O and playback)
 universal: Build for multiple architectures

You see that the following variants are not supported anymore:

  • gcc5
  • gui
  • qtgui
  • glgui

The [+] labeled variants are installed by default.


First clean-up:

sudo port clean octave

than install GNU Octave with the right variants and get rid of the wrong ones:

sudo port install octave -gcc5+gfortran-accelerate+atlas+docs+fltk+graphicsmagick+java-gui-metis-qtgui+app+qt4gui+sound

After that the installation succeeded. But please be patient it can take a while.

But its worth waiting because you get a new GNU Octave 4.0.3 on your drive.


In Octave 3.8.2 it was not possible to plot with FLTK. Now Octave plots via QT. This works now.

If you installed Octave as described in Install Octave on Mac OS X El Capitan you can (but you do not have to) change the graphics toolkit from Gnuplot to QT by simply delete or out-comment the following lines in your   ~/.octaverc:


The first plot can lasts a while. Be patient.

Octave 4 Screenshot

GNU Octave 4.0.3 via MacPorts


Leave a Reply

Your email address will not be published. Required fields are marked *