OCamlPro/ocp-index

Error: Reference to undefined global `Oprint'

reynir opened this issue · 5 comments

After running opam upgrade I can no longer use ocp-index.lib. It fails with the error in the title. It can easily be reproduced in e.g. utop:

utop # #require "ocp-index.lib";;
Error: Reference to undefined global `Oprint'
AltGr commented

That module is part of the compiler-libs. Can you tell what version of OCaml you are using, and see in ocp-index's META file if there is anything missing ?

Yes, I noticed. I'm on 4.03.0, but I get the same on 4.04.0+flambda. The META file seems to be identical to https://github.com/OCamlPro/ocp-index/blob/618872a0980d077857a63d502eadbbf0d1b05c0f/META where only the version number has changed the past 4 years. It was working for me until I updated a few days ago. I'm wondering if it's due to a change in ocamlfind?

I discovered the issue when I saw the same error in https://github.com/reynir/ocp-index-top (which is a hack; would be cool to include something similar in ocp-index), and I found out ocp-index was affected in the same way.

I just tried to reproduce on a fresh 4.04.1 switch, and I could not.

Interesting! I tested with ocaml instead of utop and I don't get the error! I guess I will open an issue with utop, then.

It seems to be due to ocaml-community/utop#213. Sorry for the noise, and thank you!