-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[package] hdf5/*: add support for infix for custom library naming #23741
Comments
I've tried to add this option but it doesn't work |
Hi @Nekto89 - thanks for opening this issue. In what scenarios would it be useful to have this exposed as an option? |
Personally I need to be able to load multiple HDF5 dlls from different versions in the same executable. |
how is this being modelled in Conan? - Conan errors out early when multiple versions of the same library are present in the graph |
I use conan to download dependencies for building my "packages" that wrap all the functionality behind C API into resulting binaries. This allows me to have different "flavors" and versions of my packages in the same address space. For example, as .whl packages in Python. I'll have a problem if different flavors/versions use different versions of HDF5 but expect same name of dll. |
I don't need conan to handle multiple versions of HDF5 in the same tree. I just need to be able to change DLL name. |
Remember this is already possible without changes to the recipe - e.g. by adding this to a profile:
and optionally with the following if we want to influence the package ID
While it is the case that the hdf5 build system already has a setting for this - the described use case could apply to any library in conan center, and we just want to undestand why this should be in this recipe when it could literally be argued for all of them - the use case seems rather vague, if we had something to reproduce to better understanding that would be appreciated. It is not a goal of Conan center to expose every single option - we just want sensible defaults without removing the ability to do this via other means.
It may allow the linker to load two separate files, but depending on the circumstances (platform, linker, loading method), it can also lead to duplicate symbols that may even be ABI incompatible, causing unwanted behaviours or actual crashes. |
Resulting binaries are loaded at runtime through LoadLibrary of "package" dll and not used simultaneously in the build process. I can update my PR and remove infix part from there if such option isn't welcomed in CCI. |
hdf5 has a way to change library names through usage of
HDF5_LIB_INFIX
https://github.com/HDFGroup/hdf5/blob/3876299d75af7a133769837798ef9e146938ab9b/CMakeLists.txt#L72C1-L73C34
It would be nice to have this as an option in conan recipe.
The text was updated successfully, but these errors were encountered: