-
-
Notifications
You must be signed in to change notification settings - Fork 261
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
On macOS, using CMake, the OS-provided zlib is not found. Worse, it seems not possible to point to it. #5155
Comments
Hi, @seanm ! Thank you for your report but I cannot duplicate your concern.
Please see the complete action log and workflow. All (incl. deflate) tests passed. |
@hyoklee thanks for your reply. In my case, it finds a zlib that some other software installed. It finds |
In release_docs/INSTALL_CMake.txt , section "IV. Further considerations" and section "V. Options for Building HDF5 Libraries with the CMake Command Line" show the CMake options to use.
|
We may have been overzealous with our prefix (H5_) changes and you may need to remove the prefix. |
This is not macOS specific -- the same problem occurs on Windows if using a self-compiled ZLIB. ZLIB itself does not provide a cMake configuration file when installed so that isn't a Mac thing, it's just a ZLIB thing. It does provide a pkgconf configuration file, but HDF5 is not attempting to use that. To get it working I had to manually set the paths to the include dir and the direct path to the library file itself, via: |
Thank you - I will fix the documentation. |
|
I think those vars are for the find_library process. CMAKE will search under $CMAKE_PREFIX_PATH/include for headers and $CMAKE_PREFIX_PATH/libs for libraries. From CMAKE documentation: |
Describe the bug
On macOS, using CMake, the OS-provided zlib is not found. Worse, it seems not possible to point to it.
HDF5 provides a
ZLIB_DIR
setting, but it's described as "The directory containing a CMake configuration file for ZLIB." macOS does not provide any CMake configuration file for ZLIB, and in fact CMake is not even zlib's usual build system, so it's odd to look for that at all.Other libraries I use, such as VTK and ITK, provide CMake variables like:
ZLIB_INCLUDE_DIR
ZLIB_LIBRARY_DEBUG
ZLIB_LIBRARY_RELEASE
Which you can just point directly to the zlib include directory, and library files. This is most flexible, and then you don't care how zlib was built.
These tickets seem related, but maybe not identical: #4614 #4904
Expected behavior
macOS provides zlib, therefore I'd expect it to be detected by default, or at least be able to point to it.
Platform (please complete the following information)
The text was updated successfully, but these errors were encountered: