1

I am trying to compile the unison source using OCAML compiler(ver 4.01.0) and GNU make 4.0. The source code is taken from the link (http://www.seas.upenn.edu/~bcpierce/unison//download/releases/unison-2.27.57/)

I extracted the tar.gz and then wrote the command "make NATIVE=false" as mentioned in the user manual (http://www.seas.upenn.edu/~bcpierce/unison/download/releases/stable/unison-manual.html) see section building unison from scratch windows.

Code starts compiling for few seconds but stops and following errors appear:

----------

File "/cygdrive/c/unison_build/unison-2.27.57/update.ml", line 1:
Error: The implementation /cygdrive/c/unison_build/unison-2.27.57/update.ml
does not match the interface update.cmi:
...
In module NameMap:
The field `split' is required but not provided
In module NameMap:
The field `choose' is required but not provided
In module NameMap:
The field `max_binding' is required but not provided
In module NameMap:
The field `min_binding' is required but not provided
In module NameMap:
The field `bindings' is required but not provided
In module NameMap:
The field `cardinal' is required but not provided
In module NameMap:
The field `partition' is required but not provided
In module NameMap:
The field `filter' is required but not provided
In module NameMap:
The field `exists' is required but not provided
In module NameMap:
The field `for_all' is required but not provided
In module NameMap:
The field `merge' is required but not provided
In module NameMap:
The field `singleton' is required but not provided
Makefile.OCaml:339: recipe for target 'update.cmo' failed
make: *** [update.cmo] Error 2

6
  • Did you consider installing Linux on your own machine? Have you been able to install Ocaml from its source code on your machine? Commented Sep 19, 2014 at 16:28
  • I found make wasn't installed properly. So OCAML now compiles but the source file has some errors as compiler complains about fields not provide
    – hhs_89
    Commented Sep 19, 2014 at 16:31
  • An example of the error is " In module NameMap: The field `split' is required but not provided "
    – hhs_89
    Commented Sep 19, 2014 at 16:32
  • 1
    Are you familiar with Ocaml? BTW, you should edit your question to improve it (by giving the commands and the error messages, indented by four spaces at start of each line) Commented Sep 19, 2014 at 16:47
  • 1
    Also give the version of ocaml you are using Commented Sep 19, 2014 at 16:52

3 Answers 3

3

I got the exact same error (with ocaml 3.12) and solved it by patching file update.mli as follows (4th line):

-module NameMap : Map.S with type key = Name.t
+module NameMap : MyMap.S with type key = Name.t

Note that this is a known bug (bug #585453) and I got the patch from debian package here (file 0005-Fix-build-with-OCaml-3.12.patch). The patch is valid at least for 2.27.57 and 2.32.52. In the same package you can also find a patch for Ocaml 4 it seems.

1

You should compile Unison with OCaml 3.12, it will not compile with later compilers. Nate that Unison is not under active development anymore:

Unison is no longer under active development as a research project. At this point, there is no one whose job it is to add new features, fix bugs, or answer questions.

The quote is from the website.

0
0

This error can occur if you compiled update.ml using different versions of the OCaml compiler, you clear the _build directory and try again from the beginning.

2
  • I deleted the _build folder, all CMI and CMO files. Still get the same error.
    – hhs_89
    Commented Sep 22, 2014 at 10:05
  • can you post what is "..." in the error message that you get ?
    – codelion
    Commented Sep 23, 2014 at 13:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.