inconsistent assumptions over interface Random

45 views
Skip to first unread message

Kuba Roth

unread,
Mar 24, 2016, 11:47:04 PM3/24/16
to ocaml-core
Hi, a newbie question here. Can anyone guide me how to solve the following error in 4.02.1 or point me to the right place? Thanks in advance.
I'm using opam to switch versions of compiler and apparently something gets out of sync here.
Error: The files /home/kuba/.opam/4.02.1/bin/ocaml and random.cmi
       make inconsistent assumptions over interface Random


Thanks,
kuba

Yaron Minsky

unread,
Mar 25, 2016, 6:38:58 AM3/25/16
to ocaml...@googlegroups.com
That is pretty surprising. Did this happen during the execution of
"opam switch"?

y
> --
> You received this message because you are subscribed to the Google Groups
> "ocaml-core" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ocaml-core+...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Kuba Roth

unread,
Mar 25, 2016, 1:26:36 PM3/25/16
to ocaml-core
No, this actually happens in the utop on the very first use of Random. I did quick test switching to another patch version with same results. Ultimately switching to higher minor version - 4.03.0+trunk solved the issue but left me wondering how to handle such problems in the future. 

Does the fact that interface file is insistent with the module mean the problem has been caused by opam? 
Can I fix this by forcing opam to reinstall the module/compiler version?

Kuba Roth

unread,
Mar 25, 2016, 1:44:18 PM3/25/16
to ocaml-core
Reading up more about opam lead me to the answer :)
opam switch reinstall 4.02.1
...solved the problem.

Thank you
kuba

Malcolm Matalka

unread,
Mar 25, 2016, 4:37:49 PM3/25/16
to ocaml...@googlegroups.com
Did you restart utop after the switch? If you had it open the whole
time things probably won't work right.

juuso....@gmail.com

unread,
Mar 28, 2016, 2:15:54 AM3/28/16
to ocaml-core
I can't tell whether it is relevant to this particular instance, but not running "eval `opam config env`" after an opam switch is an endless well of nebulous errors and bugs. Keep it in your .bashrc (or similar), so that popping up a new terminal will suffice.
Reply all
Reply to author
Forward
0 new messages