-
Notifications
You must be signed in to change notification settings - Fork 81
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
ocamlbuild -where
is not relocatable
#326
Comments
You report the following behavior on the dune issue:
Two comments:
|
Dune builds opam packages by running the build and install commands from the package spec. For ocamlbuild this is:
The path variables such as |
This sounds like the wrong choice indeed. What does the A quick
|
ocamlbuild -where
always returns the value of the$OCAMLBUILD_LIBDIR
makefile variable set during build time. This means that if a pre-compiled instance of ocamlbuild is ever relocated,ocamlbuild -where
will return the wrong result.Practically, this causes problems for dune package management. Dune builds opam packages by running their build and install commands in a transient sandbox, after which all installed artifacts are moved into a shared opam-like filesystem and the sandbox is deleted. This results in errors like:
...because the directory returned by
ocamlbuild -where
was inside the (now deleted) build sandbox. (possibly related: #321)My plan for addressing this is to implement
ocamlbuild -where
by locating the library directory relative to the path to theocamlbuild
executable (by means ofSys.executable_name
), possibly keeping the current behaviour as a fallback.See also: ocaml/dune#10290
The text was updated successfully, but these errors were encountered: