ocamljava icon indicating copy to clipboard operation
ocamljava copied to clipboard

ocamlfind won't build with ocamljava

Open arlencox opened this issue 8 years ago • 3 comments

When I try to build ocamlfind using the ocaml built with ocamljava I get an inconsistent assumptions over interface errors:

File "topfind.ml", line 1:
# Error: The files /Users/cox/.opam/ocamljava-2.0-alpha3/lib/ocaml/compiler-libs/toploop.cmi
#        and /Users/cox/.opam/ocamljava-2.0-alpha3/lib/ocaml/compiler-libs/parsetree.cmi
#        make inconsistent assumptions over interface Warnings
# make[1]: *** [topfind.cmo] Error 2

I tried to figure out how to fix it, but I couldn't figure out how to make the pieces of the build work outside of build.sh

arlencox avatar Aug 05 '16 02:08 arlencox

Indeed; ocamlfind has to be patched to be compiled with ocamljava. There is a dedicated opam package, namely ocj-ocamlfind.

Did you try to install ocamlfind thourgh opam install ocj-ocamlfind?

xclerc avatar Aug 12 '16 11:08 xclerc

I didn't. I will try that. Is there a reason why these interfaces cannot make consistent assumptions?

arlencox avatar Aug 12 '16 17:08 arlencox

The problem is that ocamljava defines new warnings.

In order to have a uniform handling, these new warnings are added as new cases to the sum type of legacy warnings, hence modifying the signature of the Warnings module.

xclerc avatar Aug 13 '16 14:08 xclerc