-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Description
- install a system compiler and ocamlfind (including findlib dev files, eg
libfindlib-ocaml-devfor debian) - create a opam switch using ocaml-system,
eval $(opam env) opam install ocamlfindocamlfind query findlib
It will say /usr/lib/x86_64-linux-gnu/ocaml/5.3.0/findlib (or whatever the system path on your os is) instead of /path/to/opam/lib/findlib.
Consequently, programs linking findlib will link the system findlib, and so will not find any opam-installed packages.
For instance opam install rocq-core will fail (eg rocq-prover/rocq#20546).
Considering
Lines 302 to 310 in bd9aad1
| if [ "$ocaml_major" -ge 5 ]; then | |
| # OCaml 5.0+ installs its own META files under the stdlib directory. | |
| # If findlib has been configured -sitelib $(ocamlc -where) then there's | |
| # nothing to do, but otherwise we need to put OCaml's Standard Library | |
| # into the path setting. | |
| if [ ! -e "${ocaml_sitelib}/stdlib.cmi" ]; then | |
| ocamlpath="${ocaml_core_stdlib}${path_sep}${ocamlpath}" | |
| fi | |
| fi |
The fix may be as simple as switching the order of paths ie
- ocamlpath="${ocaml_core_stdlib}${path_sep}${ocamlpath}"
+ ocamlpath="${ocamlpath}${path_sep}${ocaml_core_stdlib}"but IDK if there are any problems with doing that.
Metadata
Metadata
Assignees
Labels
No labels