Installing Tioga on Leopard

Written by thomas on April 4th, 2008

Since I do DNA analysis in Ruby, I wanted to be able to make some nice graphs for my data. Enter Tioga, a Ruby library originally created by "Bill Paxton, one of the creators of Adobe PostScript". Needless to say, the graphs look beautiful.

Anyway, I wasn't able to install it on Leopard. Installing via gem didn't produce a workable Tioga, so I had to do it the old fashioned way:

tar zxf tioga-1.7.tar.gz
cd tioga-1.7
cd split
ruby extconf.rb

Now, the last command failed with this error message:

checking for zlib.h... no
Error: you should have zlib (including development files) installed to
build and run Tioga. You can get it there:

  http://www.zlib.net/

If that doesn't solve your problem, please report it on the Tioga tracker:

  http://rubyforge.org/tracker/?group_id=701

After a lot of debugging, the problem was solved by instead running the following:

hdrdir="/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0" \
ARCHFLAGS="-arch i386" ruby extconf.rb

Mind you, this is on a Mac Pro, which should otherwise have ARCHFLAGS="-arch x86_64". Moving on, running the rest of the code is a piece of cake.

make
sudo make install
cd ../tests
ruby ts_Tioga.rb

Ta-da! It should work, and you can start working with Tioga. Enjoy!

Filed in:

LaTeX, OS X, Ruby

Tags:

os x

Accepting comments