March 12th, 2006

Building Pugs on OS X

It’s indeed not very straightforward to install Pugs on OS X. There’s some good instructions available here. Anyway, I’ll just rehash most of the things mentioned there with the current state of the art, and some additional notes. These instructions are for GHC 6.4.1, hs-plugins (the latest), parrot 0.4.2 and Pugs 6.2.11.

Install parrot

Download parrot.

sudo mv parrot-0.4.2/ /usr/local/
cd /usr/local/parrot-0.4.2/
perl Configure.pl
make
make test # optional
sudo make install

Install GHC

(You’ll need DarwinPorts for this.)

sudo port install ghc

This will take a *long* time. Took me a little more than five hours. (Optionally, you could probably download the OS X binary.)

Install darcs

darcs is a revision control system, written in Haskell, required to get hs-plugins.

sudo port install darcs

Again, you could optionally download a binary.

Install hs-plugins

darcs get http://www.cse.unsw.edu.au/~dons/code/hs-plugins
cd hs-plugins/
runhaskell Setup.lhs build
runhaskell Setup.lhs install
sudo ranlib /usr/local/lib/plugins-1.0/libHSplugins-1.0.a

Install Pugs

Download Pugs.

export PUGS_EMBED=perl5,parrot
export PARROT_PATH=/usr/local/parrot-0.4.2
perl Makefile.PL
make
sudo make install

make will take a while. Took me around two hours. The wait is worth it; however, you could optionally use make unoptimized — this will make Pugs compile faster, but will run much slower.

That should be it. Pugs should run fine now (here’s a screenshot):

$ pugs
...
^z
$ pugs -e "print 'hello, world';"
hello, world

Posted at 01:55 pm | Link | 0 comments | Leave a comment