Open simonbyrne opened 1 year ago
My sense is that option 2 is the path of least resistance at the moment. So name issues can be addressed by overriding a consistent set of files and symlinks.
I'm not sure option 2 is going to work well given the problem with the soname
Yeah my stance on this (which is not satisfying) is that the user of system must also use preferences to change the libraries of their dependency.
Long-term goal was to get some decent Spack integration going to make this feasible...
Option 2 works as long as one of the following two options is true:
ObjectFile
's DynamicLinks()
function to figure out what they actually link against.Fundamentally, a change in SONAME means that the ABI has a decent chance of being incompatible, so I'm not sure it makes sense to try and work around that, I think it's kind of playing with fire. So the best option, in my mind, is to build up tooling for setting preferences en-masse to picking up system library versions.
If someone wants to look into this, I'm happy to give some guidance on how I think it should work.
Could we change this: https://github.com/JuliaBinaryWrappers/HDF5_jll.jl/blob/b11cbc14cd22353ed44891395858fbcf514811bd/src/wrappers/x86_64-linux-gnu-libgfortran5-cxx03-mpi%2Bopenmpi.jl#L9 to something like
using MPIPreferences
if MPIPreferences.binary == "system"
using MPIPreferences.System
else
using OpenMPI_jll
end
For libraries which have an MPI dependency, we augment based in the MPIPreferences
abi
key: https://github.com/JuliaBinaryWrappers/HDF5_jll.jl/blob/b96de8ada558f8d70e27b5561d4f5df815b01ebf/.pkg/platform_augmentation.jl#L13However we augment by loading the corresponding JLL. e.g. the augmentation for
abi = "openmpi"
always loads OpenMPI_jll: https://github.com/JuliaBinaryWrappers/HDF5_jll.jl/blob/main/src/wrappers/x86_64-linux-gnu-libgfortran5-cxx03-mpi%2Bopenmpi.jl#L9The problem is if someone uses
binary = "system"
: then MPI.jl will load the system binary, but downstream dependencies (e.g. HDF5_jll) will load the corresponding MPI JLL binary, causing problems: https://github.com/JuliaIO/HDF5.jl/issues/1079There are a couple of potential fixes here:
cc: @giordano @staticfloat @mkitti @vchuravy