Get front row seat and watch the development of micro-isv. We make cool product that solves all your problems...

logo

Friends
         
Compiling Haskell CGI with Debootstrap
2009-01-27

So today my task was to get a fastcgi 'script' written in Haskell working on our webserver. This is the one place where lame scripting languages have an edge over real languages, in that there are no binary compatibility problems.

There are two problems to consider: Firstly that the webserver is a 32bit machine, and secondly it is running Debian Etch rather than Lenny which is on my development machine. The solution is to build a chroot:



$ debootstrap --arch i386 etch . http://ftp.uk.debian.org/debian
cp /etc/passwd /buildmachinechroot/etc
cp /etc/shadow /buildmachinechroot/etc

# chroot /buildmachinechroot
# Set the locale
$ apt-get install locales
$ dpkg-reconfigure locales

# Install the packages required to build
# apt-get install ghc6 ...

# Bug whoever wrote the README that the list of required packages is not correct