Description
Hi,
In the opam package of CompCert, there are sometimes build failures with the following message:
Error: Corrupted compiled interface
during the compilation of .mli
files when installing the package with parallel compilation.
These errors appear around 5-10% of the time in the opam bench for Coq. It seems fine with OCaml >= 4.06
(no current errors, I do not remember if there were). Here are some examples of errors (the links may soon be outdated as new tests are being run):
- https://coq-bench.github.io/clean/Linux-x86_64-4.02.3-2.0.1/released/8.7.1%2B2/compcert/3.2.0.html
- https://coq-bench.github.io/clean/Linux-x86_64-4.05.0-2.0.1/released/8.7.1%2B1/compcert/3.3.0.html
- https://coq-bench.github.io/clean/Linux-x86_64-4.02.3-2.0.1/released/8.7.0/compcert/3.3.0.html
- https://coq-bench.github.io/clean/Linux-x86_64-4.04.2-2.0.5/released/8.5.2/compcert/2.7.1.html
Here is an extract of logs with errors after an opam install coq-compcert
:
[...]
- OCAMLC extraction/ConstpropOp.mli
- OCAMLC extraction/Cminorgen.mli
- OCAMLC extraction/CleanupLabels.mli
- OCAMLC extraction/Asmgen.mli
- OCAMLOPT x86/AsmToJSON.ml
- OCAMLOPT lib/Camlcoq.ml
- OCAMLOPT extraction/AST.ml
- OCAMLC backend/XTL.mli
- OCAMLC extraction/Conventions1.mli
- File "backend/XTL.mli", line 1:
- Error: Corrupted compiled interface
- lib/Camlcoq.cmi
- make[2]: *** [Makefile.extr:117: backend/XTL.cmi] Error 2
- make[2]: *** Waiting for unfinished jobs....
- make[2]: Leaving directory '/home/bench/.opam/ocaml-base-compiler.4.02.3/.opam-switch/build/coq-compcert.3.3.0'
- make[1]: *** [Makefile:164: ccomp] Error 2
- make[1]: Leaving directory '/home/bench/.opam/ocaml-base-compiler.4.02.3/.opam-switch/build/coq-compcert.3.3.0'
- make: *** [Makefile:139: all] Error 2
[ERROR] The compilation of coq-compcert failed at "/home/bench/.opam/opam-init/hooks/sandbox.sh build make -j7".
#=== ERROR while compiling coq-compcert.3.3.0 =================================#
# context 2.0.1 | linux/x86_64 | ocaml-base-compiler.4.02.3 | file:///home/bench/run/opam-coq-archive/released
# path ~/.opam/ocaml-base-compiler.4.02.3/.opam-switch/build/coq-compcert.3.3.0
# command ~/.opam/opam-init/hooks/sandbox.sh build make -j7
# exit-code 2
# env-file ~/.opam/log/coq-compcert-3524-e4db2f.env
# output-file ~/.opam/log/coq-compcert-3524-e4db2f.out
### output ###
# [...]
# OCAMLOPT extraction/AST.ml
# OCAMLC backend/XTL.mli
# OCAMLC extraction/Conventions1.mli
# File "backend/XTL.mli", line 1:
# Error: Corrupted compiled interface
# lib/Camlcoq.cmi
# make[2]: *** [Makefile.extr:117: backend/XTL.cmi] Error 2
# make[2]: *** Waiting for unfinished jobs....
# make[2]: Leaving directory '/home/bench/.opam/ocaml-base-compiler.4.02.3/.opam-switch/build/coq-compcert.3.3.0'
# make[1]: *** [Makefile:164: ccomp] Error 2
# make[1]: Leaving directory '/home/bench/.opam/ocaml-base-compiler.4.02.3/.opam-switch/build/coq-compcert.3.3.0'
# make: *** [Makefile:139: all] Error 2
<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
+- The following actions failed
| - build coq-compcert 3.3.0
+-
- No changes have been performed
# Run eval $(opam env) to update the current shell environment
'opam install -y -v coq-compcert.3.3.0 coq.8.7.0' failed.
I do not know how important is it and if it happens to some users in practice. I think the parallel compilation of the CompCert package is nice to keep as this is a large package. In the opam bench we black-list such errors. Posting it there for the record.