Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

brew install gnuplot --with-qt --with-x11 not working

I tried installing gnuplot on a Mac (Mojave 10.14.2) using homebrew today, and it brew is not accepting --with-qt nor --with-x11

(I tried other variants, such as --with-qt5 and --with-x, with no luck.)

brew options gnuplot did not report any options.

How are we supposed to get the qt and x11 terminals installed on gnuplot now?

like image 440
gasstationwithoutpumps Avatar asked Jan 21 '19 19:01

gasstationwithoutpumps


2 Answers

I contacted the brew maintainer who had most recently modified the gnuplot formula. Brew is no longer allowing options in formulas, so "brew install gnuplot --with-x11" can no longer be done, but "brew install gnuplot" installs the qt terminal and useful terminals from the cairo package, but not the x11 terminal. I caught the formula during a couple of hour window when the formula was broken. It is now working, but with no way to install the x11 terminal. (It might be worthwhile for someone willing to maintain the formula to

like image 200
gasstationwithoutpumps Avatar answered Nov 09 '22 05:11

gasstationwithoutpumps


Default brew gnuplot installation on Mojave is broken. The best way to solve this problem would be to install a custom "tap" with a working formula, as described here: https://docs.brew.sh/How-to-Create-and-Maintain-a-Tap

If you just want a quick solution: the following manual recompilation with necessary options works just fine. Here's what brew was reporting for me when installing gnuplot:

$ brew reinstall gnuplot
==> Reinstalling gnuplot 
==> Downloading https://downloads.sourceforge.net/project/gnuplot/gnuplot/5.2.7/gnuplot-5.2.7.tar.gz
==> Downloading from https://versaweb.dl.sourceforge.net/project/gnuplot/gnuplot/5.2.7/gnuplot-5.2.7.tar.gz
######################################################################## 100.0%
==> ./configure --disable-silent-rules --prefix=~/brew/Cellar/gnuplot/5.2.7_1 --with-readline=~/brew/opt/readline --without-tutorial --disable-wxwidgets --with-qt --without-x
==> make
==> make install
🍺  ~/brew/Cellar/gnuplot/5.2.7_1: 48 files, 2.9MB, built in 1 minute 47 seconds

Uninstall gnuplot, download the package, configure it to your liking and reinstall manually to the brew location:

brew uninstall gnuplot

### Downloading sources
mkdir ~/src
cd ~/src
wget https://downloads.sourceforge.net/project/gnuplot/gnuplot/5.2.7/gnuplot-5.2.7.tar.gz
tar zxvf gnuplot-5.2.7.tar.gz
cd gnuplot-5.2.7

### Configuring with x11
./configure --disable-silent-rules --prefix=~/brew/Cellar/gnuplot/5.2.7_1 --with-readline=~/brew/opt/readline --without-tutorial --with-cairo --with-qt --with-x

### Uninstall gnuplot from brew and install the substitute
make -j
make install      # installs to the same location where brew would
brew link gnuplot
like image 2
Oleg Avatar answered Nov 09 '22 05:11

Oleg