error with opam install for v3.6.1
mndrix opened this issue · 3 comments
In case this bug report is helpful. I ran opam install containers
and received the following error:
[ERROR] The compilation of containers.3.6.1 failed at "dune build -p containers -j 1".
#=== ERROR while compiling containers.3.6.1 ===================================#
# context 2.1.2 | openbsd/x86_64 | ocaml.4.13.1 | https://opam.ocaml.org#9ecf8bc3
# path ~/.opam/default/.opam-switch/build/containers.3.6.1
# command ~/.opam/default/bin/dune build -p containers -j 1
# exit-code 1
# env-file ~/.opam/log/containers-46735-dfead0.env
# output-file ~/.opam/log/containers-46735-dfead0.out
### output ###
# ocamlc src/monomorphic/.containers_monomorphic.objs/byte/cCMonomorphicShims_.{cmi,cmo,cmt}
# File "src/monomorphic/CCMonomorphicShims_.ml", line 1:
# Warning 70 [missing-mli]: Cannot find interface file.
# ocamlc src/top/.containers_top.objs/byte/containers_top.{cmi,cmo,cmt}
# File "src/top/containers_top.ml", line 1:
# Warning 70 [missing-mli]: Cannot find interface file.
# ocamlopt src/top/.containers_top.objs/native/containers_top.{cmx,o} (exit 2)
# (cd _build/default && /home/michael/bin/ocamlopt.opt -w -40 -warn-error -3 -w +a-4-42-44-48-50-58-32-60@8 -safe-string -g -O3 -unbox-closures -unbox-closures-factor 20 -color always -I src/top/.containers_top.objs/byte -I src/top/.containers_top.objs/native -I /home/michael/.opam/default/lib/either -I /home/michael/.opam/default/lib/seq -I /home/michael/lib/ocaml/compiler-libs -I src/core/.co[...]
# File "src/top/containers_top.ml", line 1:
# Error: /home/michael/lib/ocaml/compiler-libs/toploop.cmx
# is not a compilation unit description.
The file toploop.cmx
exists and $ file /home/michael/lib/ocaml/compiler-libs/toploop.cmx
reports:
toploop.cmx: OCaml native object file (.cmx) (Version 031)
I've attached both env-file and output-file:
containers-env.txt
containers-out.txt
I'm new to OCaml, so my attempts at resolving this came up empty. I'm glad to submit a patch if anyone can point me in the right direction. Thanks.
The paths are a bit weird, are you sure you ran
eval $(opam env)
?
I think so. I tried again to be certain and received the same error as before. I install my ocaml from source in ~
, not via opam, perhaps that explains the unusual paths. The other opam packages I've tried so far (about 60) have built successfully.
In the end, I deleted my entire OCaml installation, rebuilt it from source, reinstalled to ~
, and then ran opam install containers
again. This time it worked. I must have corrupted my installation at some point.
Sorry for the noise.