[Unison-hackers] Building Compatible Unison: macOS + Raspbian
Stéphane Glondu
steph at glondu.net
Sun Aug 23 10:39:00 EDT 2020
Dear David,
Le 23/08/2020 à 16:24, David Filip a écrit :
> So the latest version of Unison on macOS Brew is:
>
> $ unison -version
> unison version 2.51.2 (ocaml 4.08.1)
>
> [...]
>
> So I download OCaml 4.08 to Raspbian, and successfully built and
> installed it:
>
> # ocaml -version
> The OCaml toplevel, version 4.08.0
I would advise you to use the exact same version, 4.08.1. It is probably
easier to use opam.
> 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
Unison 2.51.2 does not compile with OCaml 4.08.1. In the following branch:
https://github.com/glondu/unison/tree/unison-2.51
you will find a fix for that.
> Any ideas on how to fix this? The Brew version of OCaml for macOS is
> actually 4.0.9.
This seems to contradict what you said above... unless Brew provides
binary packages that are not recompiled on each OCaml update.
Cheers,
--
Stéphane
More information about the Unison-hackers
mailing list