Installing Unison 2.27.57 via MacPorts

Posted on in System Administration

MacPorts LogoI've mentioned before that I use Unison to keep a few important directories synchronized between my various workstations and file server. I made the switch to Ubuntu 10.04 LTS recently, and started using its unison 2.27.57 package. This breaks all of my Macs that use unison 2.32.52 via the MacPorts collection. If you already had unison 2.27.57 installed, all you need to do is activate it: sudo port activate unison @2.27.57_0. If you only have 2.32.52 installed, you'll need to follow the instructions below.

<!--more-->

  1. Install / Activate OCaml 3.11.2
    Unison 2.27.57 absolutely requires OCaml 3.11.2 to build. If you try to install Unison 2.27.57 with OCaml 3.12.0, you'll likely see this error:

    Error: Target org.macports.destroot returned: shell command failed (see log for details)
    

    Which, upon further inspection, is pretty much because of this:

    make: *** [update.cmx] Error 2
    

    If you have OCaml 3.11.2 installed, but not activated, do so now. Otherwise, you'll need to build it. Checkout the OCaml 3.11.2 subversion repository from MacPorts and install it:

    $ cd /tmp
    $ svn co -r 62875 http://svn.macports.org/repository/macports/trunk/dports/lang/ocaml
    A    ocaml/Portfile
    Checked out revision 62875.
    $ cd ocaml
    $ sudo port install
    --->  Fetching ocaml
    --->  Attempting to fetch ocaml-3.11.2.tar.bz2 from http://distfiles.macports.org/ocaml
    --->  Verifying checksum(s) for ocaml
    --->  Extracting ocaml
    --->  Configuring ocaml
    --->  Building ocaml
    --->  Staging ocaml into destroot
    --->  Installing ocaml @3.11.2_0
    --->  Deactivating ocaml @3.12.0_0
    --->  Cleaning ocaml
    --->  Activating ocaml @3.11.2_0
    --->  Cleaning ocaml
    $ ocaml -version
    The Objective Caml toplevel, version 3.11.2
    
  2. Install / Activate Unison 2.27.57
    This process should look familiar...

    $ cd /tmp
    $ svn co -r 50980 http://svn.macports.org/repository/macports/trunk/dports/net/unison
    A    unison/files
    A    unison/files/patch-Makefile
    A    unison/Portfile
    Checked out revision 50980.
    $ cd unison
    $ sudo port install
    --->  Computing dependencies for unison
    --->  Fetching unison
    --->  Verifying checksum(s) for unison
    --->  Extracting unison
    --->  Applying patches to unison
    --->  Configuring unison
    --->  Building unison
    --->  Staging unison into destroot
    --->  Installing unison @2.27.57_0
    --->  Activating unison @2.27.57_0
    --->  Cleaning unison
    $ unison -version
    unison version 2.27.57
    
  3. Profit!

My Bookshelf

Reading Now

Other Stuff