ocaml / ocaml-lsp

OCaml Language Server Protocol implementation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Inconsistent assumptions over interface Pp

lispandfound opened this issue · comments

With ocaml compiler 5.0.0 and opam version 2.1.5 I am unable to compile stdune 3.11.1. The compiler complains about inconsistent assumptions over interface Pp. I haven't seen anything in the issues about this, so I assume it must be a me problem? Here is the build log:

(cd _build/default && /usr/bin/ocamlc.opt -w -40 -alert -unstable -g -bin-annot -I otherlibs/stdune/src/.stdune.objs/byte -I /home/jake/.opam/default/lib/csexp -I /home/jake/.opam/default/lib/pp -I /usr/lib/ocaml/dyn -I /usr/lib/ocaml/ordering -I /usr/lib/ocaml/unix -I otherlibs/stdune/dune_filesystem_stubs/.dune_filesystem_stubs.objs/byte -no-alias-deps -open Stdune__ -o otherlibs/stdune/src/.stdune.objs/byte/stdune__Exn.cmi -c -intf otherlibs/stdune/src/exn.mli)
File "otherlibs/stdune/src/exn.mli", line 1:
Error: The files /home/jake/.opam/default/lib/pp/pp.cmi
       and /usr/lib/ocaml/dyn/dyn.cmi make inconsistent assumptions
       over interface Pp
(cd _build/default && /usr/bin/ocamlc.opt -w -40 -alert -unstable -g -bin-annot -I otherlibs/stdune/src/.stdune.objs/byte -I /home/jake/.opam/default/lib/csexp -I /home/jake/.opam/default/lib/pp -I /usr/lib/ocaml/dyn -I /usr/lib/ocaml/ordering -I /usr/lib/ocaml/unix -I otherlibs/stdune/dune_filesystem_stubs/.dune_filesystem_stubs.objs/byte -no-alias-deps -open Stdune__ -o otherlibs/stdune/src/.stdune.objs/byte/stdune__Sexp.cmi -c -intf otherlibs/stdune/src/sexp.mli)
File "otherlibs/stdune/src/sexp.mli", line 1:
Error: The files /home/jake/.opam/default/lib/pp/pp.cmi
       and /usr/lib/ocaml/dyn/dyn.cmi make inconsistent assumptions
       over interface Pp
(cd _build/default && /usr/bin/ocamlc.opt -w -40 -alert -unstable -g -bin-annot -I otherlibs/stdune/src/.stdune.objs/byte -I /home/jake/.opam/default/lib/csexp -I /home/jake/.opam/default/lib/pp -I /usr/lib/ocaml/dyn -I /usr/lib/ocaml/ordering -I /usr/lib/ocaml/unix -I otherlibs/stdune/dune_filesystem_stubs/.dune_filesystem_stubs.objs/byte -no-alias-deps -open Stdune__ -o otherlibs/stdune/src/.stdune.objs/byte/stdune__Ansi_color.cmi -c -intf otherlibs/stdune/src/ansi_color.mli)
File "otherlibs/stdune/src/ansi_color.mli", line 1:
Error: The files /usr/lib/ocaml/dyn/dyn.cmi
       and /home/jake/.opam/default/lib/pp/pp.cmi
       make inconsistent assumptions over interface Pp
(cd _build/default && /usr/bin/ocamlc.opt -w -40 -alert -unstable -g -bin-annot -I otherlibs/stdune/src/.stdune.objs/byte -I /home/jake/.opam/default/lib/csexp -I /home/jake/.opam/default/lib/pp -I /usr/lib/ocaml/dyn -I /usr/lib/ocaml/ordering -I /usr/lib/ocaml/unix -I otherlibs/stdune/dune_filesystem_stubs/.dune_filesystem_stubs.objs/byte -no-alias-deps -open Stdune__ -o otherlibs/stdune/src/.stdune.objs/byte/stdune__Exn_with_backtrace.cmi -c -intf otherlibs/stdune/src/exn_with_backtrace.mli)
File "otherlibs/stdune/src/exn_with_backtrace.mli", line 1:
Error: The files otherlibs/stdune/src/.stdune.objs/byte/stdune__Result.cmi
       and /home/jake/.opam/default/lib/pp/pp.cmi
       make inconsistent assumptions over interface Pp
(cd _build/default && /usr/bin/ocamlc.opt -w -40 -alert -unstable -g -bin-annot -I otherlibs/stdune/src/.stdune.objs/byte -I /home/jake/.opam/default/lib/csexp -I /home/jake/.opam/default/lib/pp -I /usr/lib/ocaml/dyn -I /usr/lib/ocaml/ordering -I /usr/lib/ocaml/unix -I otherlibs/stdune/dune_filesystem_stubs/.dune_filesystem_stubs.objs/byte -no-alias-deps -open Stdune__ -o otherlibs/stdune/src/.stdune.objs/byte/stdune__Path.cmi -c -intf otherlibs/stdune/src/path.mli)
File "otherlibs/stdune/src/path.mli", line 1:
Error: The files otherlibs/stdune/src/.stdune.objs/byte/stdune__Path_intf.cmi
       and /home/jake/.opam/default/lib/pp/pp.cmi
       make inconsistent assumptions over interface Pp

Wrong repo!

For people that want to install ocaml-lsp-server and stumble upon this, version 1.15.1-5 is the latest that does not depend on borked stdune v3.12.1:

opam install ocaml-lsp-server\<1.16.1

This line from the report is suspicious:

and /usr/lib/ocaml/dyn/dyn.cmi make inconsistent assumptions

It seems like you're using opam switch, but then why is your dyn package installed globally?