goblint / cil

C Intermediate Language
https://goblint.github.io/cil/
Other
40 stars 16 forks source link

Error: Cannot load ppx_deriving_yojson: interface mismatch on Ppx_deriving #87

Closed thierry-FreeBSD closed 2 years ago

thierry-FreeBSD commented 2 years ago

Trying to compile cil 1.8.2 on FreeBSD, with OCaml 4.12.1, ppx_deriving 5.2.1, ppx_deriving_yojson 3.6.1 and dune 2.8.0 gives the following error:

ocamlfind ocamldep -package zarith -package stdlib-shims -package batteries -package yojson -package ppx_deriving_yojson -modules src/ocamlutil/alpha.mli > src/ocamlutil/alpha.mli.depends
+ ocamlfind ocamldep -package zarith -package stdlib-shims -package batteries -package yojson -package ppx_deriving_yojson -modules src/ocamlutil/alpha.mli > src/ocamlutil/alpha.mli.depends
File "_none_", line 1:
Error: Cannot load ppx_deriving_yojson: interface mismatch on Ppx_deriving
Command exited with code 2.

Which are the compatible / recommended versions?

sim642 commented 2 years ago

That sounds less of a problem with goblint-cil (and even ppx_deriving_yojson), but rather something else mixed up in the environment (system OCaml vs an opam switch OCaml maybe?)

thierry-FreeBSD commented 2 years ago

Everything is built from sources on this machine, and all the OCaml packages have been built using OCaml 4.12.1.

sim642 commented 2 years ago

Here's the list of packages and their versions successfully installed by opam in the most recent OCaml 4.12.0 CI job:

  ∗ install conf-perl           2
  ∗ install seq                 base
  ∗ install dune                3.0.3
  ∗ install conf-gmp            4
  ∗ install ocamlfind           1.9.3
  ∗ install ocamlbuild          0.14.1
  ∗ install cmdliner            1.1.1
  ∗ install stdlib-shims        0.3.0
  ∗ install sexplib0            v0.15.0
  ∗ install result              1.5
  ∗ install re                  1.10.3
  ∗ install ppx_derivers        1.2.1
  ∗ install ocaml-compiler-libs v0.12.4
  ∗ install easy-format         1.3.2
  ∗ install cppo                1.6.8
  ∗ install zarith              1.12
  ∗ install num                 1.4
  ∗ install topkg               1.0.5
  ∗ install hevea               2.35
  ∗ install ppxlib              0.25.0
  ∗ install biniou              1.2.1
  ∗ install batteries           3.5.1
  ∗ install uutf                1.0.3
  ∗ install fmt                 0.9.0
  ∗ install astring             0.8.5
  ∗ install ppx_deriving        5.2.1
  ∗ install yojson              1.7.0
  ∗ install tyxml               4.5.0
  ∗ install odoc-parser         1.0.0
  ∗ install fpath               0.7.3
  ∗ install ppx_deriving_yojson 3.6.1
  ∗ install odoc                2.1.0

Not sure what you mean by built from sources, but opam is designed to figure out compatible versions of all dependencies and install them from source.

thierry-FreeBSD commented 2 years ago

Thanks! You have some packages newer than mine: I'll try to upgrade them without breaking the others. By built from sources, I mean that I'm currently updating the FreeBSD OCaml ports, which are using either ocamlfind / ocamlbuilt or dune as installers.

thierry-FreeBSD commented 2 years ago

Closing, everything is fine now! Unfortunately I changed several things at the same time, and I cannot identify the culprit... And another point: cliquer (from https://users.aalto.fi/~pat/cliquer.html or https://github.com/dimpase/autocliquer ) was installed on this machine, and this creates a conflict, because Makefile looks for cl, which is installed by cliquer!

sim642 commented 2 years ago

Makefile looks for cl

That sounds like a forgotten leftover from #52.