-
Notifications
You must be signed in to change notification settings - Fork 4
Description
We've looked into the vendored findlib and dune issue with @emillon and there are several problems:
- at the moment dune sets
OCAMLPATHto point to the_build/install/default/libbut not to_opam/libwhich means that a vendored ocamlfind cannot find packages installed in the switch - when ocamlfind is not installed in the switch, there are no
METAfiles forstdlib,unixand other such compiler libraries
Etienne's dune patch fixes 1 but not 2. We didn't catch it because ocamlfind was always in the switch as a deps of base-bytes.
1 can also be fixed directly in findlib's dune port. The dune port is slightly different from upstream as it always relies on OCAMLPATH being set to work, whereas upstream hardcodes the default OCAMLPATH after a configure step.
We can improve the dune port and write this config step as dune rules so that the dune produced binary has the right hardcoded path.
2 is a bit trickier but could also be fixed in the dune port. ocamlfind installs the META itself instead of hardcoding the information in the META. This could be changed as well.
I'll open an issue to see if this second fix can be usptreamed instead so that we keep the dune port simple.