Blog Computers Mac

Still broken unison brew

I wrote in an earlier post about how the brew build of unison is broken due to it defaulting to ocaml 4.02. Back then it was possible to checkout an old version of ocaml but since then changes to brew seem to have closed that option. Instead of being able to use brew to install a particular version of unison I had to install it from source and include the correct version of ocaml. This is how I did it.

First uninstall any existing brew installations of unison and ocaml

brew unlink unison
brew unlink ocaml

Then download ocaml 4.01 and compile from source.

tar -xvzf ocaml-4.01.0.tar.gz
cd ocaml-4.01.0
make world.opt
sudo su
umask 022
make install

Finally, download unison 2.40.102 and compile from source

tar -xvzf unison-2.40.102.tar.gz
cd unison-2.40.102
make UISTYLE=text

The unison binary is in the current directory. Just copy it to a location within your path and you should be set to go.

Featured photo by Kuba Bożanowski (