JuliaPackaging / BinaryProvider.jl

A reliable binary provider for Julia
Other
43 stars 47 forks source link

Finds incorrect library name due to `startswith()` check #177

Open staticfloat opened 5 years ago

staticfloat commented 5 years ago

https://github.com/JuliaPackaging/BinaryProvider.jl/blob/master/src/Products.jl#L158

Finds libcairo-script-interpreter when it should find just libcairo

giordano commented 4 years ago

Duplicate of #133

fingolfin commented 4 years ago

A simple fix (albeit not perfect) would be check if the name starts with basename(f) followed by . or - (the latter for Windows). Of course that would still not be perfect; but on my computer, it would handle all cases except for libprotobuf.dylib vs. libprotobuf-lite.dylib. If one restricts the check to only allow - on Windows, that would thus make this even more general.

Better would of course be to a function which computes resp. checks the "libname" by following the rules the linker actually uses (but I expect that there are minor differences there between different Unix variants...?)