Build unison 2.40.65 (ocaml 4.0) to work between Ubuntu 12.04 and OS X Mountain Lion

I could not find any pre-built binaries (macports) that worked properly out of the box between my laptop and the ubuntu server. So build your own.

NOTE: This will break unison with hosts that use unison 2.40.65 built with ocaml 3.x!

On Ubuntu 12.04

$ sudo apt-get install build-essential linux-headers-$(uname -r)
$ wget -O ocaml-4.00.0.tar.gz http://caml.inria.fr/pub/distrib/ocaml-4.00/ocaml-4.00.0.tar.gz
$ cd ocaml-4.00.0
$ ./configure --with-pthreads
$ make world.opt
$ make install
$ cd ..
$ wget -O unison-2.40.65.tar.gz http://www.seas.upenn.edu/~bcpierce/unison//download/releases/unison-2.40.65/unison-2.40.65.tar.gz 
$ cd unison-2.40.65
$ make UISTYLE=text THREADS=true
###$ make install UISTYLE=text THREADS=true
$ sudo cp ./unison /usr/bin/unison-2.40.65a
$ sudo update-alternatives --install /usr/bin/unison unison /usr/bin/unison-2.40.65a 50
$ update-alternatives --query unison

Link: unison
Status: auto
Best: /usr/bin/unison-2.40.65a
Value: /usr/bin/unison-2.40.65a

Alternative: /usr/bin/unison-2.40.65a
Priority: 50
Slaves:

Alternative: /usr/bin/unison-latest-stable
Priority: 20
Slaves:
 unison.1.gz /usr/share/man/man1/unison-latest-stable.1.gz

On OS X Mountain Lion

Make sure to have installed XCode's command line build tools.

$ wget -O ocaml-4.00.0.tar.gz http://caml.inria.fr/pub/distrib/ocaml-4.00/ocaml-4.00.0.tar.gz
$ cd ocaml-4.00.0
$ ./configure --with-pthreads
$ make world.opt
$ make install
$ cd ..
$ wget -O unison-2.40.65.tar.gz http://www.seas.upenn.edu/~bcpierce/unison//download/releases/unison-2.40.65/unison-2.40.65.tar.gz 
$ cd unison-2.40.65
$ make UISTYLE=text THREADS=true
$ mkdir -p ~/bin
$ make install UISTYLE=text THREADS=true 

 

Tags: 

Add new comment

Plain text

  • No HTML tags allowed.
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.