Homebrew-core: octave fails to install (and lauch) with default GNU Octave gui

Created on 24 Jul 2017  路  8Comments  路  Source: Homebrew/homebrew-core

The current brew install octave does not provide the default interactive GUI of the GNU Octave project.

Objective

Run GNU Octave with the GNU Octave project's default interactive GUI (Qt) interface.

As noted on the GNU Octave website, a major new feature of Octave 4.x (vs 3.x) was the introduction of:

  • "A graphical user interface is now the default when running Octave
    interactively."
  • "Octave now uses OpenGL graphics with Qt widgets by default."

Reference: GNU Octave News: "GNU Octave 4.0.0 Released" and GNU Release Notes: "Summary of important user-visible changes for version 4.0"

However, Homebrew-care octave does include two octave executables octave and octave-cli:

Steps To Reproduce

macos: brew install octave
macos: ls -l /usr/local/Cellar/octave/4.2.1/bin/
/usr/local/bin/mkoctfile
/usr/local/bin/octave
/usr/local/bin/octave-cli
/usr/local/bin/octave-config

macos: octave # expected to launch into "default" GUI
macos: octave --force-gui # expected graphical user interface to start

Expected Results

One would expect /usr/local/bin/octave, by default, to use the GNU Octave project's default interactve qt5 gui. Also, octave --force-gui is expected to launch with an interactive gui.

Most helpful comment

@ilovezfs, the formula provided above does not work for me. Do you know of any updated formula to install octave 4.2.1 with the GUI?

All 8 comments

The GUI was removed as part of the migration into homebrew/core. See https://github.com/Homebrew/brew/blob/master/docs/Acceptable-Formulae.md#stuff-that-builds-a-gui-by-default-but-doesnt-have-to

@ilovezfs per Homebrew Acceptable Formulae: "Stuff that builds a GUI by default (but doesn't have to)" reference:

Make it build a command-line tool or a library by default and, if the GUI is useful and would be widely used, _add an option to build the GUI._

Some --with-qt-gui option would appear the meet referenced homebrew guideline.

Or is there something else that i'm missing? Is there some reason that the standard octave --force-gui should be extected to fail with a homebrew install?

The GUI does not work properly with the current version of Qt, and so needs [email protected]. Since the qscintilla2 formula builds with the standard qt formula (5.9), the Octave GUI needs an entire version of qscintilla2 vendored into the formula as well. Octave also then needs a patch so it works properly on retina displays.

Basically, we can consider adding a --with-qt option if at some point the Octave GUI works properly with the current version of Qt, and does so without patching.

@ilovezfs ok. thanks for the more detailed reply. Hopefully, Octave GUI will eventually work without said patches so a --with-qt option is the considered (and implemented).

@ilovezfs, the formula provided above does not work for me. Do you know of any updated formula to install octave 4.2.1 with the GUI?

If you don't mind recompiling the whole thing, this works: http://www.schoeps.org/home/2017/10/octave-on-macos-with-gui/
(change brew pin-tap schoeps/homebrew-science to brew tap-pin schoeps/homebrew-science though)

Above tap doesn't work here

3329 files updated, 0 files merged, 0 files removed, 0 files unresolved
==> Checking out branch default
==> Downloading http://savannah.gnu.org/support/download.php?file_id=41891
==> Downloading from http://savannah.gnu.org/file/octave-qt_wait_on_worker_thread-DEBUG1-djs2017sep25.patch?file_id=41891
######################################################################## 100.0%
==> Patching
==> Applying download.php
patching file libgui/src/main-window.cc
Hunk #2 succeeded at 1567 (offset -9 lines).
==> ./bootstrap
==> ./configure --prefix=/usr/local/Cellar/octave/HEAD-0a567c6489ef_7 --disable-silent-rules --enable-link-all-dependencies --enable-shared --disable-static --disable-docs --without-OSM
==> make all
==> make install
Error: Empty installation

Update:

nvm after brew link octave it works!

Was this page helpful?
0 / 5 - 0 ratings