2

I am having a problem where I can't specify options for installing a formula with brew.

Specifically

brew install gnuplot --with-qt results in a invalid option: --with-qt and when I look at brew info gnuplot there is no option available:

$ brew info gnuplot
gnuplot: stable 5.2.6 (bottled), HEAD
Command-driven, interactive function plotting
http://www.gnuplot.info/
Not installed
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/gnuplot.rb
==> Dependencies
Build: pkg-config ✔
Required: gd ✔, libcerf ✔, lua ✔, pango ✔, qt ✔, readline ✔
==> Options
--HEAD
    Install HEAD version

However, I get all indication from the documentation, and thousands of Andrew Ng's machine learning course students that there are some optional flags I could specify. I've tried all sorts of updating and upgrading, and nothing under brew doctor seems to be relevant. I've installed very many things with brew in the past (though ultimately I'm not very sure of the inner workings)

$ brew --version
Homebrew 2.0.1
Homebrew/homebrew-core (git revision 1204; last commit 2019-02-09)
Homebrew/homebrew-cask (git revision 8d29a; last commit 2019-02-09)

mac os 10.14.2 Mojave

Any ideas on where to start investigating would be helpful.

tristansokol
  • 4,054
  • 2
  • 17
  • 32

3 Answers3

5

Unfortunately, options have been removed recently, more about it can be found here: Remove all options from Homebrew/homebrew-core formulae

nbari
  • 25,603
  • 10
  • 76
  • 131
3

My recommendation would be to use MacPorts as it's generally much easier to install.

$ port variant gnuplot
gnuplot has the variants:
[+]aquaterm: Enable AquaTerm terminal
[+]luaterm: Enable lua-based terminals
   old_bitmap_terminals: Enable PBM (Portable Bit Map) and other older bitmap terminals
[+]pangocairo: Enable cairo-based terminals
   qt: Enable qt terminal with Qt 4
     * conflicts with qt5
   qt5: Enable qt terminal with Qt 5
     * conflicts with qt
   universal: Build for multiple architectures
[+]wxwidgets: Enable wxt terminal
[+]x11: Enable X11 support

Note: In the description it states that qt conflicts with qt5, so you'll want to use one or the other.

So based upon that output you can see there are several "variants" available to install. To use qt:

$ sudo port install gnuplot +qt

If you also wanted to install x11 with qt you could do:

$ sudo port install gnuplot +qt +x11
l'L'l
  • 44,951
  • 10
  • 95
  • 146
1

For now, the option --with-qt is applied by default when you do brew install gnuplot.

As you can see in the following source code of gnuplot hombrew formula.

args = %W[
      --disable-dependency-tracking
      --disable-silent-rules
      --prefix=#{prefix}
      --with-readline=#{Formula["readline"].opt_prefix}
      --without-tutorial
      --disable-wxwidgets
      --with-qt
      --without-x
    ]
system "./configure", *args

This can be changed in the future. You can check the source code of gnuplot formula here: https://github.com/Homebrew/homebrew-core/blob/master/Formula/gnuplot.rb

Gorisanson
  • 2,202
  • 1
  • 9
  • 25