[Unison-hackers] Building Compatible Unison: macOS + Raspbian

David Filip dfilip at colornet.com
Sun Aug 23 10:24:53 EDT 2020


Dear Unison Hackers:

Was wondering if anyone out there could provide some Unison build help?  I'm trying to get Unison 2.51 running on both macOS (High Sierra, 10.13) and Raspberry Pi (Raspbian / Debain 9.13).

So the latest version of Unison on macOS Brew is:

$ unison -version
unison version 2.51.2 (ocaml 4.08.1)

So I installed OCaml on Raspbian (apt-get install ocaml), downloaded the latest Unison source code (2.51.2) from this page:

https://github.com/bcpierce00/unison/releases <https://github.com/bcpierce00/unison/releases>

and was able to successfully compile and install Unison 2.51.2 on Raspbian:

$ unison -version
unison version 2.51.2 (ocaml 4.02.3)

However, when I try to sync between macOS and Raspbian, I receive the following error:

Fatal error: Server: Fatal error during unmarshaling (input_value: ill-formed message),
possibly because client and server have been compiled with differentversions of the OCaml compiler.

So assuming that is an accurate message -- and not a red herring -- it appears that now not only the versions if Unison have to match, but also the same version of OCaml!

So I download OCaml 4.08 to Raspbian, and successfully built and installed it:

# ocaml -version
The OCaml toplevel, version 4.08.0

I then went back to Unison 2.51, and did a:

# make clean
# make

but whereas with OCaml 4.02 I just received a bunch of warnings, I now receive a fatal error when compiling Unison with OCaml 4.08 (to match the version that Unison on Brew was built with):

ocamlopt: system.mli ---> system.cmi
ocamlopt -g -unsafe-string -I lwt -I ubase -I system -I fsmonitor -I fsmonitor/linux -I fsmonitor/windows -I system/generic -I lwt/generic -c /opt/unison-2.51.2/src/system.mli
ocamlopt: system.ml ---> system.cmx
ocamlopt -g -unsafe-string -I lwt -I ubase -I system -I fsmonitor -I fsmonitor/linux -I fsmonitor/windows -I system/generic -I lwt/generic -c /opt/unison-2.51.2/src/system.ml
File "/opt/unison-2.51.2/src/system.ml", line 1:
Error: The implementation /opt/unison-2.51.2/src/system.ml
       does not match the interface system.cmi:
       Values do not match:
         val link : ?follow:bool -> string -> string -> unit
       is not included in
         val link : fspath -> fspath -> unit
       File "/opt/unison-2.51.2/src/system/system_intf.ml", line 70, characters 0-35:
         Expected declaration
       File "/opt/unison-2.51.2/src/system/system_generic.ml", line 50, characters 4-8:
         Actual declaration
Makefile.OCaml:422: recipe for target 'system.cmx' failed
make[1]: *** [system.cmx] Error 2
make[1]: Leaving directory '/opt/unison-2.51.2/src'
Makefile:6: recipe for target 'text' failed
make: *** [text] Error 2

Unfortunately, I don't know anything about OCaml to know exactly what this means or how to fix it.

Any ideas on how to fix this?  The Brew version of OCaml for macOS is actually 4.0.9.

BTW - I have been using Unison 2.40 on macOS + Raspbian + CentOS Linux for many years, but have decided it is probably time for an upgrade.

Any help would be appreciated.

Thanks,

Dave.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://LISTS.SEAS.UPENN.EDU/pipermail/unison-hackers/attachments/20200823/f1ab539f/attachment.htm>


More information about the Unison-hackers mailing list