-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Warn if num installed to a broken system compiler #11300
Conversation
If the num library was installed in a system switch where the user had write permissions to the system compiler's lib directory before ocaml#11207 was merged, then *fresh* installations of the ocamlfind package will detect this "system" installation of num and create a META file for it. This in turn will cause the num package installation to fail. Annoyingly, this failure only appears once because opam then executes ocamlfind remove num so a subsequent attempt to install the num package will appear to have worked. This patch displays a comprehensive error message the first time, strongly suggesting that the user manually delete the files which were incorrectly installed previously.
I haven't followed the discussion on this issue so I'll let an other maintainer merge this PR. |
@samoht - are you able to kick the DataKit CI and Camelus? |
I've restarted the Datakit CI runs, but I don't control Camelus. /cc @AltGr to see if he can do something about it :-) |
Kicked it, but a "Could not complete" error is probably reproducible... |
✅ All lint checks passed eba59ad
✅ Installability check (8230 → 8230) |
Sorry for the long delay. Thanks ! |
The guard implemented in this PR is causing me a lot of headaches. (Although, maybe fewer headaches than I would be experiencing without it? Unclear.) After running
A few more details about how we got here:
I desperately wish that Homebrew's |
@Calvin-L - opam's support for packages installed by a system compiler is very limited at the moment, so I'd expect the solution to be not installing the homebrew I'm possibly puzzled about the |
Thanks for the quick follow-up! I did get everything working by removing Homebrew's system-wide installation of Here are the contents of the
|
@Calvin-L - that |
That's correct. I was using opam to install |
@Calvin-L - no problem with terminology, I just wanted to be sure I'd correctly understood what had gone wrong from your perspective 🙂 |
This follows on from #11207.
If the num library was installed in a system switch where the user had write permissions to the system compiler's lib directory before #11207 was merged, then fresh installations of the ocamlfind package will detect this "system" installation of num and create a META file for it.
This in turn will cause the num package installation to fail. Annoyingly, this failure only appears once because opam then executes
ocamlfind remove num
so a subsequent attempt to install the num package will appear to have worked (however, in reality the system-installed files will conflict with the ones in the opam directory).This patch displays a comprehensive error message the first time, strongly suggesting that the user manually delete the files which were incorrectly installed previously.
If you have a system compiler where num has been manually installed to
ocamlc -where
(e.g. by runningsudo make install
from the GitHub sources) and a fresh installation of the ocamlfind package, then you will now see the following if you attempt to install the num package:cc @avsm