-
Notifications
You must be signed in to change notification settings - Fork 99
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
Help relocatability of libraries/executables in the JLL wrappers #687
Comments
I'm wondering if it doesn't make sense to try and carry patches that make these kinds of shenanigans unnecessary. |
In most cases patching the source code might work, but it's more burden on our side to prepare the patches and maintain them in the long term. However, for git we need to set ENV["GIT_SSL_CAINFO"] = joinpath(dirname(Sys.BINDIR), "share", "julia", "cert.pem") I don't think we can escape setting some sort of environment variable in this case. |
It would be really useful to go beyond just allowing to set a few custom variables: how about making it possible to inject some arbitrary extra initialization code? E.g. for libraries like GMP, FLINT and others, one might want to initialize memory management functions. Right now, every caller of such a library has to set these (or hope somebody else did it). |
A very simple solution would be a way to specify a custom |
Based on a comment by @staticfloat on PR #791, I had a look at which env var values are in fact in use. Here is what I got (based on @giordano's helpful list):
Based on the above, it seems that setting env variables to a path relative to the
There is of course a good chance that there are other relevant env vars out there which That said, it might not be completely without issue: e.g. setting |
I am encountering this in PMIx_jll and pprte_jll which both copy OpenMPI MCA approach. It is again an environment variable relative to the artifact_dir. |
|
Fixes #390 and JuliaPackaging/BinaryBuilder.jl#687 [skip build]
We have several cases where we need to set some environment variables at runtime (or using
withenv
) to relocate the libraries/executables:git
we need to setGIT_EXEC_PATH
andGIT_SSL_CAINFO
, see Git_jll: Can't clone over HTTPS Yggdrasil#284 and Git_jll doesn't work with HTTP remotes? Yggdrasil#452ncurses
we need to setTERMINFO
orTERMINFINO_DIRS
, see Cannot initialize Ncurses in macOS Yggdrasil#455Tk
/Tcl
we need to setTCL_LIBRARY
andTK_LIBRARY
, see [TCL/TK] .tcl files not copied to artifacts Yggdrasil#462OpenMPI
we need to setOPAL_PREFIX
, see openmpi launcher doesn't work Yggdrasil#390Gtk
we need to set a bunch of environment variables, see the__init__
function ofGtk.jl
Fontconfig
we need to setFONTCONFIG_FILE
, see the__init__
functions ofFontconfig.jl
andCairo.jl
We usually delegate the Julia packages calling the libraries to set these variables, but this has a couple of drawbacks:
Cairo.jl
andFontconfig.jl
, both usingFontconfig_jll
MPI.jl
reported by @simonbyrne in openmpi launcher doesn't work Yggdrasil#390Maybe we should allow setting these variables directly in the JLL wrappers, to alleviate the burden of the developers of the high-level interface of the package.
The problem is that sometimes these variables need to be set around an executable -- so that we could add these to the already existing wrapper -- but sometimes we need to define the variable globally because it's used by a library, so deciding an interface to do this may not be very easy.
The text was updated successfully, but these errors were encountered: