I have two computers one running Ubuntu 19.04 and another running Ubuntu 20.04. I synchronize them both with a server at my workplace running CentOS 7.7.1908 using unison. My Ubuntu 19.04 machine is running Unison 2.48.4. My Ubuntu 20.04 machine is running 2.48.4. The server at work is running Unison 2.48.15.
The Ubuntu 19.04 machine synchronizes with server with no problem. Before I had upgraded to 20.04 that machine running 19.10 synchronized with the server fine. Now in Ubuntu 20.04 it can successfully scan the files but the moment I try to synchronize with "Go" it crashes with error
Unison failed: Uncaught exception Failure("input_value: ill-formed message")
Raised at file "/opt/unison-2.48.15v4/src/lwt/lwt.ml", line 135, characters 6-13
Called from file "list.ml", line 85, characters 12-15
Called from file "/opt/unison-2.48.15v4/src/lwt/lwt.ml", line 31, characters 2-37
Called from file "/opt/unison-2.48.15v4/src/lwt/lwt.ml" (inlined), line 83, characters 17-46
Called from file "/opt/unison-2.48.15v4/src/lwt/generic/lwt_unix_impl.ml", line 55, characters 6-23
Called from file "/opt/unison-2.48.15v4/src/lwt/generic/lwt_unix_impl.ml", line 147, characters 6-40
Called from file "/opt/unison-2.48.15v4/src/main.ml", line 202, characters 6-24
Called from file "/opt/unison-2.48.15v4/src/main.ml", line 131, characters 4-9
I thought this might be a similar issue to John Clements’ post but I built an entirely new unison profile to synchronize a new directory containing a single empty text file. I assume that this means there were no previous relevant archives to cause the problem as John deduced. I have also run unison with the -ignorearchives directive and I get the same error.
2
Answers
This would be more a comment than an answer, but I am not allowed to comment yet, so I’ll post it like an answer:
Have you tried this answer?
https://unix.stackexchange.com/questions/583058/unison-and-version-compiler-conflicts/583377#583377
It really solved my long standing problems because of the incompatibility among different versions of Unison, or even the very same version being built with different versions of OCaml.
Snapd is installed in Ubuntu by default, but I think you need to install it in CentOS first. According to this
https://snapcraft.io/docs/installing-snap-on-centos
You have to issue these commands in a terminal
and then proceed like in the answer quoted above.
EDIT: If you don’t have access to one of the machines, the Unisons you install are not guaranteed to be compatible. In this case you can try different snap “channels”. For Unison, see:
https://snapcraft.io/unison-jz
On the top-right corner you can find the different versions.
You can also issue:
In your case it would be the beta, so
Since the server does not have unison-jz installed, DO NOT add the “servercmd” line to your unison profile.
If this version of unison-jz is not compatible with the one in your CentOS machine, I’m afraid you’ll have to compile from source like here.
How to use unison across OS X and linux? Fatal error due to ocaml version
You can manually install the same version on both hosts:
Make sure to delete all
fp*
files from~/.unison
I took this from: https://askubuntu.com/a/1235089/917854
I am using this with a Kubuntu 20.04 client and a Ubuntu 18.04 server (both using the command line version). I had the same problem before.
Bug tracker: https://bugs.launchpad.net/ubuntu/+source/unison/+bug/1875475