I am trying to use unison from my OS X machine to a linux box running: CentOS release 6.10 (Final)
I had to make a static compilation of unison 2.51 for the linux box. This version is:
unison version 2.51.2 (ocaml 4.02.3)
On the OS X machine I used “brew install unison”. This gives me:
unison version 2.51.2 (ocaml 4.08.1)
If I try to now use unison I get:
Fatal error during unmarshaling (input_value: ill-formed message), possibly because client and server have been compiled with differentversions of the OCaml compiler.
What can I do to get unison to work?
3
Answers
You will have to compile ocaml and unison from source on your linux box.
Ocaml: You can find ocaml 4.08 on https://caml.inria.fr/pub/distrib/. The instructions for compiling are in the readme.
Unison: From https://github.com/bcpierce00/unison/commits/master, you will see that the commit acfa105 is a verified commit compatible with Ocaml 4.08.1. Download this commit and run make.
I ran into the exact same issue and was able to resolve it using the above steps.
I was running docker with a few containers and using docker-sync to keep things in sync with my local files on my Mac when i hit this issue.
My mac had the following installed:
My web-sync docker container used:
The solution that worked for me was:
Similar problem – I could resolve it by installing identical deb file for unsion on both PC – and deleting some files. In fact I decided to install the deb-File I have on my Laptop also on the PC, where I have a different distro. This has to be done bypassing apt/synaptics, using dpkg. – And same has to be done for unsion-gtk. So what saved me was downloading those both deb-Files, I have allready installed on my Laptop. In my case this were unison_2.48.4-1+b1_amd64.deb and unison-gtk_2.48.4-1+b1_amd64.deb . I installed them in a terminal with
sudo dpkg -i unison_2.48.4-1+b1_amd64.deb
sudo dpkg -i unison-gtk_2.48.4-1+b1_amd64.deb
On both, Laptop and PC, i did remove in the hidden folder ".unison" (in my home directory) all files, with a filename starting with "fp…", that are created after I had updated laptop A to a newer version of ubuntu.
To make sure my PC wont "upgrade" unison and unison-gtk I created a file with filename "unison" in the folder /etc/apt/preferences.d/ an wrote this text into my file "unison":
Now. everything works fine.
More background info to that hack: https://bugs.launchpad.net/ubuntu/+source/unison/+bug/1868502