-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
install Coq through opam fails on Arch Linux if ocaml-findlib package is installed #415
Comments
We should check this before Coq Platform starts setup in the upfront sanity checks - that is before even installing opam. Can you suggest a piece of shell script to detect this situation say using |
If your goal is to check whether ocaml-findlib is installed, then you can do However, a more correct check might need to rely directly on ocaml and opam since those are the tools that are confused by ocaml-findlibs already existing. The installation of Coq should succeed, even if ocaml-findlibs is installed. It is a bug that they don't.
Note that in my case, I install opam through the Arch Linux package manager. In this case a like what you propose doesn't make sense. But it might make sense for Coq Platform. |
Coq Platform does install opam if it is not installed yet - if it finds a usable (not too old) opam, it will use it (but always create a new switch). But Coq Platform does the sanity checks before it starts installing anything. It is quite annoying if scripts run half through and then find that there is an issue and you have to restart from scratch. In the end this needs to be fixed in opam, probably by supplying a patched findlib which ignores system installed OCaml and Coq packages. There is already a patched findlib in opam, but its purpose is to supply switch local libraries. But doing upfront sanity checks has proven to be very effective. |
Following the official instructions on installing Coq through opam does not work on Arch Linux if the ocaml-findlib Arch Linux package is installed. For me, the package was installed because I previously installed the Arch Linux coq package. I decided to install Coq through opam and removed the Arch Linux Coq package, but I did not uninstall ocaml-findlib.
You can easily reproduce this issue with a clean Arch installation through Docker.
The last command errors with the following message.
Note that if you don't install ocaml-findlib, the installation succeeds.
At this point you can run more investigative commands like
ocamlfind list
:This issue has been discussed on Zulip.
The text was updated successfully, but these errors were encountered: