How to use unison across OS X and linux? Fatal error due to ocaml version
Asked Answered
P

3

11

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?

Penneypenni answered 1/11, 2019 at 15:22 Comment(0)
E
8

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.

Episiotomy answered 1/11, 2019 at 23:5 Comment(1)
I am currently fighting this problem between unison 2.51.2 (ocaml 4.08.1) on the Mac (10.14.6) and unison 2.51.2 (ocaml 4.05.0) on Linux (CentOS 7.6, 3.10.0-957.5.1.el7.x86_64). The latest ocaml distro for CentOS 7 is 4.05.0, and when I compile ocaml 4.08.1 from source, the test suite fails more than 200 of the tests.Gradin
C
2

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:

unison -version
unison version 2.51.2 (ocaml 4.06.1)

My web-sync docker container used:

unison -version
unison version 2.51.2 (ocaml 4.08.1)

The solution that worked for me was:

brew uninstall unison && brew install unison
Counterpunch answered 25/2, 2020 at 3:9 Comment(0)
S
2

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":

 Package: unison
 Pin: version 2.48.4-1+b1
 Pin-Priority: 1000

 Package: unison-gtk
 Pin: version 2.48.4-1+b1
 Pin-Priority: 1000

Now. everything works fine. More background info to that hack: https://bugs.launchpad.net/ubuntu/+source/unison/+bug/1868502

Spent answered 6/10, 2020 at 13:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.