jscert / jsexplain

Apache License 2.0
26 stars 4 forks source link

`make init` fails when coming from ocaml 4.06 #21

Closed brabalan closed 5 years ago

brabalan commented 6 years ago

Biniou fails to build, but I think this is a problem with jbuilder:

[ERROR] The compilation of biniou failed at "jbuilder build -p biniou -j 1".

#=== ERROR while installing biniou.1.2.0 ======================================#
# opam-version 1.2.2
# os           darwin
# command      jbuilder build -p biniou -j 1
# path         /Users/schmitta/.opam/4.04.2/build/biniou.1.2.0
# compiler     4.04.2
# exit-code    1
# env-file     /Users/schmitta/.opam/4.04.2/build/biniou.1.2.0/biniou-95433-a71bb4.env
# stdout-file  /Users/schmitta/.opam/4.04.2/build/biniou.1.2.0/biniou-95433-a71bb4.out
# stderr-file  /Users/schmitta/.opam/4.04.2/build/biniou.1.2.0/biniou-95433-a71bb4.err
### stderr ###
# [...]
# File "src/bi_io.ml", line 1:
# Error: /Users/schmitta/.opam/4.06.1/lib/easy-format/easy_format.cmi
# is not a compiled interface for this version of OCaml.
# It seems to be for a newer version of OCaml.
#       ocamlc src/.biniou.objs/bi_io.{cmo,cmt} (exit 2)
# (cd _build/default && /Users/schmitta/.opam/4.04.2/bin/ocamlc.opt -safe-string -g -bin-annot -I src/.biniou.objs -I /Users/schmitta/.opam/4.06.1/lib/easy-format -no-alias-deps -o src/.biniou.objs/bi_io.cmo -c -impl src/bi_io.ml)
# File "src/bi_io.ml", line 1:
# Error: /Users/schmitta/.opam/4.06.1/lib/easy-format/easy_format.cmi
# is not a compiled interface for this version of OCaml.
# It seems to be for a newer version of OCaml.
IgnoredAmbience commented 6 years ago

You've got inconsistent OCaml versions in the paths listed there? Moving to 4.06 should certainly be on the todo list.

brabalan commented 6 years ago

Yes, I was on a 4.06.1 switch. I think the problem is with jbuilder as the make init does the switch to 4.04 and does the eval opam config env, which I can see as the packages are installed in the correct switch… yet the library (just for biniou) is looked up in the wrong path.

IgnoredAmbience commented 6 years ago

It's potentially the case that the shell variables set in the eval line aren't being carried over to the next lines of the Makefile, resulting in inconsistent use of switches.

brabalan commented 6 years ago

I'm not sure about that, as biniou is trying to be built in the 4.04 opam directory, so the environment seems to point there.

barockobamo commented 5 years ago

There is no more "make init" and the new Makefile build with 4.07.1 fine.