-
Notifications
You must be signed in to change notification settings - Fork 15
Update to 2.0.0 with a switch to cmake for the build. #66
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
base: devel
Are you sure you want to change the base?
Conversation
This avoids bloating the package with an extra copy of the statically-linked HDF5 library just to get the library version.
Also updated docs and vignette.
…rent arch. In the context of the BBS, I'm not sure if this is problematic or not; are we building binaries for anything other than ucrt on Modern Windows machines?
This cuts down on the build times as we don't have to build it ourselves.
|
Hello @LTLA ; thank you for this PR. While testing it for Debian, I see that the expectation is that Any thoughts on removing the need to set Also, the tests fail for me on Debian with this PR: |
|
You shouldn't have to set It seems that in your case, setting it would be inappropriate, at least for the purposes of package testing - your HDF5 system library is 1.14.5 while the expected version in the tests is 1.14.6. |
|
Does anyone know @grimbough's ETA until he's back? |
I tested again without setting at build-time RHDF5LIB_USE_SYSTEM_LIBRARY nor at test-time, and a post installation test fails: |
|
CHECK passes fine for me. I don't even have a |
The only patch I'm testing with is this PR. As a reminder, I doing this from a Debian packaging perspective; not that of a system administrator or user. |
|
Not sure what to tell you, works fine for me: if ( requireNamespace("tinytest", quietly=TRUE) ) {
tinytest::test_package("Rhdf5lib")
}
## test_library_version.R........ 2 tests OK 30ms
## test_link_flags.R............. 8 tests OK 0.2s
## All ok, 10 results (0.2s)You might want to run expect_silent(libver <- Rhdf5lib::getHdf5Version())
expect_identical(libver, "1.14.6")As you can see, |
|
Alright, now that 3.22 has hit the ground, we should probably get this ball rolling again. Note that in the README for https://github.com/HDFGroup/hdf5, they have switched to Cmake-only builds for the HDF5 library, so sooner or later you will need to make a similar switch in Rhdf5lib. |
|
Yes, I agree it would be good to get this for 3.23. I still need to work out the specific timeline as I have other high-priority items that need to be addressed as well. Am I correct the urgency has somewhat waned for you because of kanaverse/scran.js#98 (comment) (i.e., it doesn't fix the performance problems you are seeing), @LTLA? My first reaction to this is that I would like to decouple the different issues raised in Huber-group-EMBL/rhdf5#147 and tackle them sequentially rather than in a single PR:
How does this sound? |
That's correct. However, it would still be best to get it in sooner rather than later as I'm waiting for this update to be done before making some PRs to rhdf5 for improved support of compound data types.
It's up to you, though I think that we can afford to be more adventurous given that we're at the very start of the devel cycle. From the perspective of a downstream user/developer, there's likely to be breaking changes from both the switch to CMake and the update to the HDF5 library. So might as well just do both changes at once and get all the breaking out of the way. You'll also have to check if the CMake options changed between HDF5 1.10 and 1.14. I don't think they did, but you never know. IMO it's just easier to jump straight to 1.14, given that no one's really asking for CMake specifically for 1.10. |
…ackage installation.
|
Just updated this PR to vendor in 2.0.0. Some comments:
|
Just making this PR for discussion at this point, and so that we don't forget about it when Mike gets back.
Anyway, this PR updates Rhdf5lib to the latest HDF5 (
1.14.62.0.0), using the (somewhat recent) biocmake package to handle the build process without any manual fiddling withautoconf, etc.It also allows administrators of R installations to override the compilation and instead use the system HDF5 via
pkg-config, for those who are confident that they have the appropriate system libaries.We introduce a
PKG_CPP_FLAGSoption inpkgconfig(), to be used instead of relying onLinkingTo's automatic-Iflags. This ensures that administrator-level overrides are respected in Rhdf5lib's downstream packages.Additional environment variables are also introduced to override specific aspects of
pkgconfig(), e.g., someone could setRHDF5_PKG_CXX_LIBSto point to a different set of HDF5 C++ libraries. Might be useful.getHdf5Version()has been updated to just peek at thelibhdf5.settingsfile to get the version, rather than creating a rather large binary (~13 MB) just to extract the version number. In the presence of an administrator override, the version is instead retrieved viapkg-config.A side effect of this change is that, now that
autoconfis no longer used, some of the advice in the vignette aboutconfigure.argswon't be accurate. Not sure whether this can be accurately translated into the CMake world... or if it's even necessary to try to do so.Passes CHECK on Linux. I no longer have a Mac to try on. Will try Windows later.