Skip to content
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

Way to enforce specific library search path? #365

Open
tbole opened this issue Jul 3, 2018 · 5 comments
Open

Way to enforce specific library search path? #365

tbole opened this issue Jul 3, 2018 · 5 comments

Comments

@tbole
Copy link

tbole commented Jul 3, 2018

I have an environment, where multiple versions of the same library are installed on the system.
One version in /usr/lib and multiple others in /opt/... accessible through environment modules, which will automatically set PATH and LD_LIBRARY_PATH.

The package, in my case HDF5.jl, has defined multiple aliases for the library
aliases = ["libhdf5", "libhdf5_openmpi", "libhdf5_mpich", "libhdf5_serial", "libhdf5_serial.so.10" ].
BinDeps will find the lib under multiple aliases, some in /usr/lib and some in /opt, but will always pick the one in /usr/lib. Is there a way to enforce a specific path through some flag, without changing HDF5.jl? This is probably the most simple functionality to ask for, no search, no installer, just use the specified path...

PS: I've already added the path to Libdl.DL_LOAD_PATH and as already mentioned all environment variables are set.

@tkelman
Copy link
Contributor

tkelman commented Jul 3, 2018

You're probably best off manually editing the path in deps/deps.jl. That file will get overwritten if you re-do Pkg.build("HDF5") but there are a few ways you could delay that from happening.

@tbole
Copy link
Author

tbole commented Jul 3, 2018

Of course I could edit ´deps.jl´, just thought there was something more elegant for such basic functionality.

@tkelman
Copy link
Contributor

tkelman commented Jul 3, 2018

What about the library in /usr/lib do you not want BinDeps to accept? There's not much in the way of priority other than library groups or yes/no validity checks, the first acceptable thing BinDeps finds is usually what it will use.

@tbole
Copy link
Author

tbole commented Jul 3, 2018

The libraries in '/usr/lib' are often ancient and may not support specific features such as MPI. BinDeps actually finds the right libs in ´/opt´, e.g. ´libhdf5´, but since there are some aliases defined, it will also find libhdf5_mpich or even worse libhdf5_serial in '/usr/lib' and use one of these. I was hoping for some CMake-ish feature, where you simply pass a preferred search paths (or preferred alias?), e.g. using environment variables.

@tkelman
Copy link
Contributor

tkelman commented Jul 3, 2018

You might be able to entirely remove the search paths you know you don't want. Some might be hard-coded and harder to suppress, would have to check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants