Gas station without pumps

2012 April 3

Asymptote drawing program—hard to install

Filed under: Software — gasstationwithoutpumps @ 13:43
Tags: , , , , ,

My son has been using Asymptote, a drawing program for geometric drawings, with the Art of Problem-Solving classes that he has been taking.  He’s been running it on their website through the TeXer interface with [asy] tags, which is a little awkward, as error messages are not returned—you just get success or failure.  Asymptote has a lot of powerful features and seems pretty easy to use for a compiled language, and I thought it might be worth my trouble to learn for those diagrams that are not the sorts of graphing that gnuplot is good for.

We wanted to install it on our Macs, but like with our troubles with gnuplot, the developers of Asymptote have made it damn near impossible to install on Macs. We did find something that looked promising: precompiled binaries for the Mac: HMUG: /pub/MacOS_X/X/Applications/Publishing/asymptote.

Unfortunately, these binaries are not complete.  In a separate file, they tell you about all the libraries you need to install first:

Dependencies:
ImageMagick 6.7.3-3
gv 3.7.2
gsl 1.15
MacTeX 2010
gc 7.1
readline 6.2

That is not a trivial set of dependencies!

The default sourceforge download is no better. It does not have sources either, and has (apparently) the same dynamic library dependencies.  You have to go all way to getting a branch from the SVN repository if you want to compile it yourself, which is more trouble than Asymptote was worth.

Are proper Mac OS X installers so difficult to build that the open-source projects never build them?

2012 January 2

Installing gnuplot—a nightmare

Filed under: Software — gasstationwithoutpumps @ 14:19
Tags: , , , , , , ,

My son and I use gnuplotfor all our graph plotting, because it is free, it has good curve-fitting tools, it can produce graphs in many standard graphical formats (both vector and raster formats), and it has good scripting capabilities.

Example of a simple gnuplot graph, click for full-size image.

I sure wish that it came already installed on Macintosh computers, though, as it is huge pain to install.  We had to install it for my son to do his latest physics lab writeup, as the old version we had on the household computer was from the old G5 iMac, and could not run under Lion, which no longer supports emulation of the PowerPC processors.

Probably the easiest way to install gnuplot is using MacPorts, so first we had to install MacPorts.  Downloading it went fine, but it wouldn’t install, because the Xcode that came with the Mac was not suitably configured.  So we had to install a new Xcode, which meant setting up an AppStore  account.  The Xcode download is almost 2 Gbytes and took an hour.  What the h*** is in Xcode that it is so bloated?  So far as I can see, Xcode contains a low-quality editor (about as powerful as Textedit), some compilers, and a build system that is about as featureful as make. The download is about 100× bigger than is reasonable—is it full of porn videos or what?

After the hour-long download of Xcode, MacPorts installed ok, but to run it we had to add /opt/local/bin and /opt/local/sbin to the path in the .cshrc file (and /opt/local/man to the MANPATH), since MacPorts puts its programs in a totally separate place form where everything else gets installed.

Because my son wanted to use the latest features of gnuplot (the pdfcairo output option), we started by using

sudo port install cairo
sudo port install pango

This triggered a huge pile of downloads and installations, as MacPorts built an entire ecosystem duplicating most of the compilation and building capabilities of Xcode (so why does it need Xcode to get started). After about an hour of downloads and building, we were finally ready to install gnuplot.

Due to lack of documentation for Mac installation on the gnuplot site, we downloaded and installed gd-libgd, which probably was not necessary, because

sudo port install gnuplot

installed a different version of gd anyway.  The total time to do the installation was over 2 hours (mostly due to the massive downloads).  It also took up a huge amount of disk space (1.9Gbytes for Xcode, 769Mbytes in /opt).  All that for a tiny program that is only about 2Mbytes. I just wanted one small graphing program, not two huge ecosystems for developing code!

There are two groups of people who could fix this problem:

  1. Apple could include gnuplot in their standard Unix utilities.  This would be the simplest and best solution.
  2. The gnuplot developers could release Macintosh binaries (like they already do for Windows) that install like other Macintosh programs.

I’m not going to hold my breath waiting for either of these things to happen.  Apple has no interest whatsoever in the scientific market (though I see more and more MacBooks at conferences) and the gnuplot developers see nothing wrong in taking 2 hours and 2.7Gbytes to install a 2Mbyte program—they do it all the time.

I used to recommend gnuplot to my students all the time, but now that most of them have Macs, I can’t honestly recommend it anymore.  No one should have to go through that much hassle to install a simple program.

[Added 2013 March 15: Read through all the comments.  Gnuplot installation on Macs has gotten somewhat easier since I wrote this post, and people have written about better approaches in the comments.  Installation is still not as easy as it should be, but it is not quite the nightmare it was.]

The Rubric Theme Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 250 other followers

%d bloggers like this: