Incompatible versions issue : unable to use Lambda Soup in Ocaml 4.11

I just did a opam install lambdasoup. When I open utop and try a #require"lambdasoup", I get the following error message :


Type #utop_help for help about using utop.

─( 11:06:00 )─< command 0 >──────────────────────────────────────────────────────────────────────────────────{ counter: 0 }─
utop # #require "lambdasoup";;
The files /Users/jakezkerrien/.opam/4.11.0/lib/uutf/uutf.cma
and /Users/ewandelanoy/Teuliou/OCaml/Ordinary/_build/uutf.cmo
disagree over interface Uutf
The files /Users/jakezkerrien/.opam/4.11.0/lib/markup/markup.cma
and /Users/ewandelanoy/Teuliou/OCaml/Ordinary/_build/uutf.cmo
disagree over interface Uutf
The files /Users/jakezkerrien/.opam/4.11.0/lib/lambdasoup/soup.cma
and /Users/ewandelanoy/Teuliou/OCaml/Ordinary/_build/uutf.cmo
disagree over interface Uutf

How can I fix this ?

I would start from reinstalling lambdasoup, markup and uutf

I did opam reinstall uutf followed by opam reinstall markup followed by opam reinstall lambdasoup and the error message stays the same

You can also try to clean build directory of the project you are trying to build and try again.

I did rm -rf ~/.opam/4.11.0/lib/uutf ~/.opam/4.11.0/lib/markup ~/.opam/4.11.0/lib/lambdasoup followed by opam reinstall uutf followed by opam reinstall markup followed by opam reinstall lambdasoup and the error message stays the same.

I meant to do rm -fr /Users/ewandelanoy/Teuliou/OCaml/Ordinary/_build

I finally found out what went wrong : I has a homemade module called Uutf that conflicted with the Uutf from the Lambda Soup library. I renamed my homemade module and now everything works fine.

1 Like