BinaryProvider.jl
BinaryProvider.jl copied to clipboard
locate() is greedy when matching library name
When called from write_deps_file()
, locate()
will happily match any library that begins with the same string as the library we are looking for:
https://github.com/JuliaPackaging/BinaryProvider.jl/blob/cb403e6e19c5ec130b47cf3d85d8e9530adabd14/src/Products.jl#L158
In my case I was trying to use the library libgsl
, which existed in the same folder as the library libgslcblas
:
Info: Found a valid dl path libgslcblas.so while looking for libgsl
Info: /home/ludvigak/.julia/dev/GSL/deps/usr/lib/libgslcblas.so matches our search criteria of libgsl
I could fix this by changing
LibraryProduct(prefix, ["libgsl"], :libgsl)
to
LibraryProduct(prefix, ["libgsl."], :libgsl)
in the build script, but that was not obvious from the start.
This greedy matching could be considered a feature or a bug, depending on how you want things to work.
This should be considered a bug. We’ll fix it ASAP