Skip to content
This repository has been archived by the owner on Aug 16, 2023. It is now read-only.

Add note about expected libraryproduct extensions per platform? #154

Open
IanButterworth opened this issue Mar 17, 2019 · 0 comments
Open

Comments

@IanButterworth
Copy link
Member

IanButterworth commented Mar 17, 2019

I just came across a library that built .so files on MacOS, and didn't realize that these were being rejected by:

function parse_dl_name_version(path::AbstractString, platform::Platform)
dlext_regexes = Dict(
# On Linux, libraries look like `libnettle.so.6.3.0`
"so" => r"^(.*?).so((?:\.[\d]+)*)$",
# On OSX, libraries look like `libnettle.6.3.dylib`
"dylib" => r"^(.*?)((?:\.[\d]+)*).dylib$",
# On Windows, libraries look like `libnettle-6.dylib`
"dll" => r"^(.*?)(?:-((?:[\.\d]+)*))?.dll$"
)

It was difficult to debug because there was no warning. Perhaps it could be helpful to explain that requirement, either in the readme and/or LibraryProduct doc notes (which as they are, reinforced to me that a .so file should be discoverable):

"""
A `LibraryProduct` is a special kind of `Product` that not only needs to exist,
but needs to be `dlopen()`'able. You must know which directory the library
will be installed to, and its name, e.g. to build a `LibraryProduct` that
refers to `"/lib/libnettle.so"`, the "directory" would be "/lib", and the
"libname" would be "libnettle". Note that a `LibraryProduct` can support
multiple libnames, as some software projects change the libname based on the
build configuration.
"""

@IanButterworth IanButterworth changed the title Add note about expected libraryproduct extensions per platform? Add note about expected libraryproduct extensions per platform? Mar 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant