Building darcs 2.0.2 on Ubuntu manually
June 29th, 2008
Recently had to work with a Ubuntu server and I wanted to get the latest darcs working on it. Simple install guide follows, pending this making it into.
One thing I've learnt in the process is that Ubuntu is very conservative about its packages - by default, you only get those that were approved at the time of a release, and even if you choose to get updates, they must be specifically ported to your version (I have tried this using 7.10 and 8.04). In FreeBSD and OS X (MacPorts) land, the ports tree marches on regardless.
Following are the commands you need. Apologies if there are some redundant steps on either Ubuntu 7.10 or 8.04, the packages are slightly different as 7.10's package repo contains GHC 6.6, whereas 8.04 has 6.8. (Again, an annoying frustration I found with Ubuntu.)
First install the build tools (note some of these are only needed if you wanted to repackage to submit back to the Ubuntu pacakge repo):
# apt-get install devscripts build-essential wget cdbs \
fakeroot liburi-perl debhelper pbuilder dpatch quilt
Then install GHC and all the required Haskell modules:
# apt-get install ghc6 libghc6-quickcheck-dev libghc6-mtl-dev \
libghc6-html-dev libghc6-http-dev libghc6-harp-dev \
libghc6-regex-base-dev
On 8.04 only (because it uses GHC 6.8) you need the regex-compat library:
# apt-get install libghc6-regex-compat-dev
Finally a few libraries that darcs like to have around:
# apt-get install zlib1g libcurl3 libcurl4-openssl-dev
Then the usual build procedure (I used --without-docs as this command will be sitting on a server, it saves time and also installing LaTeX packages):
$ wget http://darcs.net/darcs-2.0.2.tar.gz
$ tar xf darcs-2.0.2.tar.gz
$ cd darcs-2.0.2
$ ./configure --without-docs
$ make
# make install
Final note: You can get the older 2.0.0 release of darcs from Iain Lane's personal package archive. (I found this after I installed by hand.)

Leave a Reply