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.)

2 Responses to “Building darcs 2.0.2 on Ubuntu manually”

  1. Mark Stosberg Says:

    Unfortunately, you may still end up with a binary that runs much slower than it should in some cases, whether you build on Hardy, Intrepid, or use Iain's packages.

    The problem is that there's a bug that was in GHC 6.8.2. It's already fixed in GHC but Hardy has 6.8.2 and so will Intrepid.

    You can read about the bug report.

    So, there's still a real need for someone like Iain to build darcs packages for Ubuntu...but using a newer GHC.

  2. Ash Says:

    Hi Mark

    Thanks for the info. I've actually been able move away from Ubunutu, back to FreeBSD, where the ports system is more up-to-date. And as it's source based, recompiling is not an issue.

    Kinda sucks that Intrepid will be stuck with such a broken GHC though.

    Ashley

Sorry, comments are closed for this article.