-
Notifications
You must be signed in to change notification settings - Fork 429
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
Packages depending on ez-conf-lib
can't find the ez-conf-lib
script
#11598
Comments
The problem appears to be that variables set in a package's generated |
Did you consider just making this package relocatable? We've also have some support for non-relocatable packages like the compiler. Perhaps we could generalize that? Both sound a lot more appealing than post-processing the config file. |
I'll see what that would involve. We'd need to make the generated |
I've played around with modifying Clients of
The ideal solution would be to remove the Alternatively (and what I currently do on my branch) we attempt to fix the problem by just patching ez-conf-lib and not any of its revdeps. If we change ez-conf-lib to install its script into the bin directory rather than lib and set the value of the So in the short term we should probably use the latter solution and add a patched version of ez-conf-lib to our overlay repo, and then submit patches upstream to ez-conf-lib and its 2 clients to implement the former solution in the long run. |
I wrote some of my thoughts in the pull request you opened. The most general way is to post-process the Given @nberth is the author of both @nberth, what do you think about this? |
Hi all. Reading all the discussions now I think I understand what you are trying to achieve. I would be totally fine to make |
Let me add that I would be very uncomfortable adding the script to the user PATH as it really is quite a bunch of hacks. |
@nberth Thanks for reaching out! Let me give you a quick rundown of the issue. The general issue is that whenever an absolute path is saved into some of the files it means that that path has to exist in the future, when people want to refer to it. The way Dune works is that it builds artifacts in a sandbox location (which gets recorded in the (One could of course not sandbox, but one of the ideas behind package management in Dune is that artifacts can be cached, thus a different project would be able to restore ez-conf-lib from the cache in a different location and have it just work, cutting down installation times immensely) The way we solve that usually is by avoiding to store the absolute path, instead making it relative to.. something. So
The way @gridbugs explained to me here: It sidesteps the issue because it doesn't refer to the binary via absolute path, but finds the binary in the (Dune-created) Of course if other entries in the |
Hum. I think I remember a bit more what I did. When |
For example, building
apronext.1.0.4
with dune package management, dune produces the error:It's a little suspicious that the path it's using to run
ez-conf-lib
is inside the ez-conf-lib's build sandbox, as that path won't necessarily exist later in the build when a dependent package is being built. This could be a similar issue to what we see withocamlbuild
andocamlfind
which we fixed by forking those projects into an overlay repo. Possibly that is necessary here too.An unusual feature of
ez-conf-lib
is that when it's installed with opam the executable ends up in~/.opam/default/lib/ez-conf-lib/ez-conf-lib
. It's not in the bin directory but instead the package's lib directory. Need to double check that this is being added to the PATH used by dune to find executables scoped within packages.The text was updated successfully, but these errors were encountered: