-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Build HDF5 1.14.0 for mingw-w64 #15033
Conversation
Sure. How does that work? Do we still need to copy the mod files? |
Does using that option replace what we are doing with this copy command?
|
ArchLinux seems to install Fortran .mod files directly in the Should we do the same? I.e.,
Yes, these copy commands would no longer be needed, I'd guess. |
I think we should probably still deploy the mod files to |
Do we have some other precedent in MSYS2/MINGW where Fortran users would expect .mod files to be in the include folder? |
E.g., IIUC, it is up to the project if they prefer installing their headers directly in |
Are there actually any .mod files that are copied by that command? Does it fail to install the .mod files if those commands are removed? |
Correct. That would be fixed by setting Continuing, @mkitti started to look at other parts of the build rules. Those might be worth checking now, too, imho. |
I used the new option and cleaned up the patch files. |
@@ -125,6 +130,8 @@ | ||
--- a/config/cmake/HDFMacros.cmake 2023-01-13 04:34:01.443034400 -0500 | ||
+++ b/config/cmake/HDFMacros.cmake 2023-01-13 04:36:14.419475400 -0500 | ||
@@ -126,10 +126,12 @@ | ||
OUTPUT_NAME_RELEASE ${LIB_RELEASE_NAME} | ||
OUTPUT_NAME_MINSIZEREL ${LIB_RELEASE_NAME} | ||
OUTPUT_NAME_RELWITHDEBINFO ${LIB_RELEASE_NAME} | ||
+ RUNTIME_OUTPUT_NAME ${LIB_RELEASE_NAME}-0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These two lines can probably be removed: RUNTIME_OUTPUT_NAME
can be replaced w/ -DCMAKE_SHARED_LIBRARY_NAME_WITH_VERSION=ON
in PKGBUILD, and default ARCHIVE_OUTPUT_NAME
should be correct already?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, so basically remove the patch and just add the option in PKGBUILD?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a bit weird... So either we bite the bullet, use the same SOVERSION as other platforms and rebuild, or leave things as is...
Edit: Perhaps it makes sense to leave as is for now, and actually try to address that unnecessary WIN32/MINGW/CYGWIN complexity/misunderstandings upstream first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw, the SOVERSION did change between 1.12.2 and 1.14.0, so keeping this artificially at -0
makes no sense at all. A rebuild is needed anyway.
Or don't bump to 1.14 now and wait for 1.12.3 instead...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw, the SOVERSION did change between 1.12.2 and 1.14.0, so keeping this artificially at
-0
makes no sense at all. A rebuild is needed anyway.
The package grokker only pointed out that mingw-w64-python-h5py
would need to be rebuilt. (Maybe, that is the only package that uses a function for which the SOVERSION was bumped upstream?)
I think we may be trying to do too much here. Could some of this be deferred to a |
@@ -125,6 +130,8 @@ | ||
--- a/config/cmake/HDFMacros.cmake 2023-01-13 04:34:01.443034400 -0500 | ||
+++ b/config/cmake/HDFMacros.cmake 2023-01-13 04:36:14.419475400 -0500 | ||
@@ -126,10 +126,12 @@ | ||
OUTPUT_NAME_RELEASE ${LIB_RELEASE_NAME} | ||
OUTPUT_NAME_MINSIZEREL ${LIB_RELEASE_NAME} | ||
OUTPUT_NAME_RELWITHDEBINFO ${LIB_RELEASE_NAME} | ||
+ RUNTIME_OUTPUT_NAME ${LIB_RELEASE_NAME}-0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw, the SOVERSION did change between 1.12.2 and 1.14.0, so keeping this artificially at
-0
makes no sense at all. A rebuild is needed anyway.
The package grokker only pointed out that mingw-w64-python-h5py
would need to be rebuilt. (Maybe, that is the only package that uses a function for which the SOVERSION was bumped upstream?)
According to the package grokker results, you'll still need to bump the pkgrel of |
Sorry, I misunderstood. I've bumped it in 0907e25 |
Please take this opportunity to remove the nonsense -0 versioning. |
I agree that this could probably be removed (unless there are some dependent packages that need the library to have a SOVERSION). But I also agree with @mkitti that it might be better to defer this to a subsequent PR because it would require to rebuild all of the reverse dependencies. |
They are asking about the so version upstream as well: I'll try dropping the |
We're going to need a new h5py release with h5py/h5py#2194 for hdf5 1.14.0 compatibility |
h5py upstream looks for |
Maybe we should bump to |
Here's the PR that added the search for cygwin uses |
Building h5py/h5py@01be823 with this patch works...
It does look like we're going to need a h5py release though to get the h5py package to work with HDF5 1.14. |
Without h5py master, I get the following error:
The fix for this is h5py/h5py#2187 which is now merged to h5py master branch. Do we cherry pick this, pull h5py master, or wait for h5py to release a new version before proceeding? |
I cherry picked h5py/h5py#2194 We can now
|
If you prefer to remove the SOVERSION suffix now, you'll need to rebuild all dependers as part of this PR. And check that the respective configuration steps are still able to detect the library without the suffix. |
Apparently, at least h5py is looking for the .dll. |
mingw-w64-python-h5py/PKGBUILD
Outdated
@@ -23,16 +23,20 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-cython" | |||
"${MINGW_PACKAGE_PREFIX}-pkg-config") | |||
source=(https://github.com/h5py/h5py/releases/download/${pkgver}/h5py-${pkgver}.tar.gz | |||
001-mingw-python.patch | |||
002-Merge-pull-request-2194-from-h5py-libhdf5-1.14.patch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, use spaces instead of tab for indentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When cherry-picking a patch from upstream, it is preferable to download the patch directly instead of checking in a copy here:
002-Merge-pull-request-2194-from-h5py-libhdf5-1.14.patch | |
002-Merge-pull-request-2194-from-h5py-libhdf5-1.14.patch::https://github.com/h5py/h5py/commit/3dc3d7c089acaa4532f43ad2283e65a440ec55ac.patch |
That will also make it clearer where this patch came from
That is, in case it applies as-is. If it does, don't forget to update the checksums if necessary and remove the patch from the repository.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I literally git cherry-picked
it from the master branch on to the 3.7.0 tag since I did not know if the the patch would apply directly. Let me see if I can generate the patch directly from the commit and have it apply.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how to download the patch directly because it is a merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, use spaces instead of tab for indentation.
Fixed in 0461af9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how to download the patch directly because it is a merge.
Does the suggested change not download a patch that suffices. On a superficial look, the only difference to the merge is changes to their CI (which we don't need). Did I miss something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the annotation in 76568a0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With that changed, please delete the checked in copy of the patch (both locally and from the repository) and update with updpkgsums
.
Edit: Maybe also change the name of the patch if you think that makes sense.
There is a license file currently packaged at |
In that case, nevermind. Leave it as is. 👍 |
I installed the MINGW64 build artifact from this PR and tried to re-run the test suite of Octave.
It is likely that some (or all?) of the dependent packages need to be rebuilt even without the SOVERSION bump. For a list of packages that likely need a pkgrel bump, see e.g. the |
The PR doesn't apply again. That might be because of the merge commit. Could you please try to strip that (and maybe rebase your changes instead)? Additionally,
That looks like a typo in one of our patches to me:
That should probably be unsigned (not usigned ). I wonder why that didn't fail before.
|
Let's get this working first, and then I'll rebase. Do you want the pkgrel bumps all in one commit or multiple? |
Whatever you prefer. But keep in mind that stripping a merge commit might be getting more and more complicated if you push further changes on top of it.
Whatever works best for you. I personally often separate commits if they are more than "just" a pkgrel bump. |
Please, wait a second with further pushes. I opened #15223 which will hopefully "future proof" the |
64d6f6c
to
3432e83
Compare
Sorry. I did not see your comment until just now. I rebased without a rebuild for adios2 incorporated to see if there are any other challenges ahead. |
Good idea. 👍 Let's see how that fares. In the meantime, #15223 is merged. When the current CI run has finished, please rebase again and bump the pkgrel of the updated adios2 package. |
The pkgrel of Octave also needs to get bumped. (That might have gone lost when you rebased.) But that might have been a "lucky error" in the current test run because it takes pretty long to compile. If we are lucky, the CI will finish without it before the 6(?) hours timeout. |
CI timed out. But at least until that point, it didn't fail... I asked on Discord if it would be ok to merge anyway (after the pkgrel of Octave and ADIOS2 is bumped again). |
3432e83
to
c21d429
Compare
I rebased, bumped the pkgrel of the remaining packages and merged. @mkitti: Thank you very much! |
We missed the opportunity to enable SOVERSION for HDF5. |
We can still do that in another PR. |
Keeping |
Sorry. That wasn't clear to me. I'd thought this was because some packages seemed to look for a hard-coded |
But I agree: The way how the library refuses to work if the version in the public headers doesn't match the library essentially means that it requires a SOVERSION. |
h5py seems to allow a range of single digit numbers for the SOVERSION. Frankly, the patch applied to h5py was intended specifically for msys2. It seems they would be happy to accommodate whatever scheme is determined here. Before coming up with our own scheme, I also suggest researching what happens on other platforms. I can communicate with The HDF Group directly regarding their opinion on the matter as well. |
vigra failed to build, as it doesn't find boost python (despiteit being there) and then later on fails when fixing up the then missing cmake files.
edit: #15231 |
This adapts the mingw-w64-hdf5 script for version 1.14.0 of the HDF5 C library.
Note that a 1.12.3 release is also expected in the near future.
Patch hdf5-fix-pkgconfig.patch was already applied upstream.