[Unison-hackers] OCaml version mismatch breaks Unison 2.48.4

Stéphane Glondu steph at glondu.net
Mon Aug 31 01:41:47 EDT 2020


Le 30/08/2020 à 17:13, Andrew Schulman a écrit :
> Hi. For years I've been syncing my Cygwin and Ubuntu hosts, using Unison 2.48.4.
> It worked fine. Now I've just upgraded Ubuntu to Focal (20.04). It still has
> Unison 2.48.4, but syncing now fails with the dreaded
> 
> Fatal error: Fatal error during unmarshaling (input_value: ill-formed message),
> possibly because client and server have been compiled with differentversions of
> the OCaml compiler.
> 
> How can I solve this?
> 
> * In Ubuntu, the only Unison package is 2.48.4, compiled apparently with OCaml
> 4.08.1.
> 
> * In Cygwin, the existing 2.48.4 package was built several years ago, probably
> with OCaml 4.01. The current OCaml in Cygwin is 4.10.0, but when I try to
> compile Unison 2.48.4 with that, the build fails almost immediately:
> [...]
> 
> It seems that I need either:
> 
> * A patch to allow Unison 2.48.4 to build with OCaml 4.10, or

The current master should compile with OCaml 4.10. Can you try in your
Cygwin setup and report back here? (But wait for the next release before
uploading that to Cygwin repos since there will be a version bump.)

> * An OCaml 4.08 package for Cygwin, so I can try to build Unison with that.

If it is easy, this is what I would advise you until the next release.
It would allow you to use directly the Ubuntu binary. Otherwise, you'll
have to recompile Unison on Ubuntu as well (e.g. with opam since OCaml
4.10.0 is not yet available in Debian/Ubuntu).

> Suggestions?
> 
> BTW I'm the Unison packager for Cygwin, so I need to solve this problem not just
> for myself, but for any other Cygwin users who are trying to sync with Ubuntu.

You cannot guarantee that, there usually are at least two supported
Ubuntu versions (last LTS and last non-LTS), and they can have different
OCaml versions, leading to incompatible versions of Unison.

Besides, there is not only Ubuntu, there are Fedora, Suse, ...

Because the possibilities are too many, I would advise you to focus on
Cygwin-Cygwin syncs and be explicit in your packaging metadata about
which version of OCaml has been used to compile your Unison. This is
what I am going to do with Unison in Debian.


Cheers,

-- 
Stéphane



More information about the Unison-hackers mailing list