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

David Filip dfilip at colornet.com
Sun Aug 23 11:07:56 EDT 2020


Stephane,

This seems to contradict what you said above... unless Brew provides
binary packages that are not recompiled on each OCaml update.

Yes, Brew provides binary packages.  But for Raspbian, I am doing the compiling myself.

> 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.


OK, I'll check out that fix, and see if I get any further.

> I would advise you to use the exact same version, 4.08.1. It is probably
> easier to use opam.


OK, what I found before was a page on ocaml.org <http://ocaml.org/> which had 4.08.0 as the latest version, with older versions also listed, but I've looked around and found another page on that site which has later releases (got to the earlier page via Google).

So you are saying that the even the patch (.0 vs .1) level of OCaml has to match?

Let me give this another try and report back.

Cheers,

Dave.

> On Aug 23, 2020, at 10:39 AM, Stéphane Glondu <steph at glondu.net> wrote:
> 
> 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
> 

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


More information about the Unison-hackers mailing list