-
-
Notifications
You must be signed in to change notification settings - Fork 666
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
Hdf5 1.14.5 #4940
base: master
Are you sure you want to change the base?
Hdf5 1.14.5 #4940
Conversation
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 is a WIP commit that indicates this PR is not yet ready for review, so I made it a draft.
8b902b8
to
e5217e3
Compare
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.
Generally looks good
@@ -64,6 +63,23 @@ set(HDF_TEST_EXPRESS OFF CACHE INTERNAL "Control testing framework (0-3)") | |||
set(BUILD_STATIC_EXECS OFF CACHE INTERNAL "Build Static Executables") | |||
set(BUILD_USER_DEFINED_LIBS OFF CACHE INTERNAL "Build user defined libs") | |||
|
|||
set (HDF5_DIMENSION_SCALES_NEW_REF OFF CACHE INTERNAL "Use new-style references with dimension scale APIs" ) | |||
set (HDF5_EXTERNAL_LIB_PREFIX "itk" CACHE INTERNAL "Use prefix for custom library naming.") |
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.
@jcfr this has a potential to interact with Slicer@aacaefd and other Slicer customizations.
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.
Same of them have made their way into official repo, e.g. #4102.
set( HDF5_ENABLE_MAP_API OFF CACHE INTERNAL "Build the map API") | ||
set( HDF5_ENABLE_WARNINGS_AS_ERRORS OFF CACHE INTERNAL "Interpret some warnings as errors") | ||
#set( HDF5_MINGW_STATIC_GCC_LIBS OFF CACHE INTERNAL "") | ||
set( HDF5_MSVC_NAMING_CONVENTION OFF CACHE INTERNAL "Use MSVC Naming conventions for Shared Libraries") |
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.
Does this matter for Windows/MSVC?
@@ -1,5 +1,11 @@ | |||
cmake_minimum_required (VERSION 3.12) | |||
project (HDF5_SRC C) | |||
# ITK --start | |||
set(MANGLE_PREFIX itk) |
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.
Should we make MANGLE_PREFIX
an ITK top-level option?
e5217e3
to
7cbd8d6
Compare
The following command can be run to show the local changes in the third party library: There are only a couple changes that appear to be needed locally still: |
The CI for the builds are passing 🎉 However ghost flow checker as a couple issues:
It's going to be difficult to change the initial sub-tree commit and redo the merge. I want to make sure I have all the necessary changes done in the correct order before going through that process again. |
Ensure that #4716 modifications are also included in this PR. |
It is better to make changes to |
Code extracted from: https://github.com/HDFGroup/hdf5.git at commit 106fb56936d1d785ca96147601a3608e433ddc3b (hdf5-1_12_3).
* upstream-HDF5: HDF5 2023-11-06 (106fb569) Using "theirs" to resolve conflicts and prefer upstream changes over local modifications.
Remove code modifications in library infavor of setting internal cache variables at top level CMakeLists.txt file. Update to set HDF5 new BUILD_STATIC_LIBS variable.. Update to set COMP_LIBS for ITK's ZLIB. Remove local modified cmake policiy changes integrated into upstream.
Code extracted from: https://github.com/HDFGroup/hdf5.git at commit 0fe0459fc24d71be13d5f266513c2832b525671b (hdf5_1.14.5).
* upstream-HDF5: HDF5 2024-09-30 (0fe0459f)
7cbd8d6
to
e3940a7
Compare
@@ -2,3 +2,5 @@ src/itkhdf5/src/H5C.c hooks-max-size=500000 | |||
src/itkhdf5/src/H5Dchunk.c hooks-max-size=500000 | |||
src/itkhdf5/src/H5Shyper.c hooks-max-size=600000 | |||
src/itkhdf5/src/H5Tconv.c hooks-max-size=500000 | |||
src/itkhdf5/src/H5Ppublic.h hooks-max-size=500000 | |||
src/H5Odtype.c no-lf-at-eof |
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.
This attribute did not work to remove the Ghostflow checker error. The error comes from the sub tree. Likely the attribute should be in the subtree not the main tree. I don't think it's worth the effort to redo the merge again to address this.
Remove unused HDF5 variables. Used the following command to help locate CMake variable no longer used in HDF5: for i in $(grep 'set\s*(' CMakeLists.txt | sed -n 's/set\s*(\s*\(HDF5[^ ]*\).*/\1/p'); do echo $i; git grep -c $i; done
e3940a7
to
408628d
Compare
Build the HDF5 libraries on OSX, and Linux ARM64, in both debug and release mode. Then aggregated all the symbols with the exsiting ones.
408628d
to
ac0abad
Compare
/* (Must be defined _after_ the function prototype) */ | ||
/* (And must only defined when included in application code, not the library) */ | ||
#ifndef H5A_MODULE | ||
#define H5Acreate_async(...) HD5_MANGLE_PREFIX##_H5Acreate_async(__FILE__, __func__, __LINE__, __VA_ARGS__) |
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.
@thewtex @dzenanz These definitions like this are problematic for the name mangling. The current redefinitions work, but produce warnings. Each header ( 8-ish) has a "?_MODULE" conditional so that the definitional are applied externally/publicly but not applied when building the library.
My current thought is to add #undef before each of these secondary definitions. But this will be a lot of local modifications. Any other suggestions?
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 haven't looked at HDF5 mangling in a long time. Do what you think is best.
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.
If possible, pre-processor updates are added to itk_hdf5_mangle.h.in
and this is included first. If this approach can be adapted to apply for this issue (?), this will keep the modifications in one place outside the upstream code, which would ease maintenance.
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.
Unfortunately, you can not redefine a definition. It's rather unfortunate that the "internal" function name and the public CPP define are the same symbol and I can not thing of a way to name mangle it without the code modifications in the latest update.
4182de9
to
f48fc47
Compare
The HDF5 library is adding a C-Preprocessor redefinitons pf function to automatically add context based information.
f48fc47
to
4ee1977
Compare
no longer WIP in commit messages.
This PR is done as far as I am currently aware now. |
Were the cross-platform name mangling symbol checks described in itk_hdf5_mangle.h.in run? |
I ran the process on OSX arm and linux arm. |
We should cover Windows amd64, Linux amd64. There are often new symbols with an update. |
@thewtex Do you have a windows box for doing the mangling? |
I have a Windows computer, but I expect to be quite busy on Monday and Tuesday. |
Merging before the final symbols are updated should not cause problems with the CIs or regular builds. The only issue would be for applications used ITK master and are integrating with other untangled HDF5 libraries. |
I am traveling now, but I could take a look next week.
These symbols have caused crashes in Slicer, and there are likely similar applications out there. I would prefer not to merge until all the platforms have been checked. CC @jcfr |
Some of my nightly ITK builds on cdash build against VTK too, so they might catch any duplicate symbols. Thanks for working on this. I took a stab at a smaller update here but got stuck on various cmake stuff I did not understand. I could clone this PR locally and try building my own app & test suite against it... |
With
|
Turning So for me, this is in good shape, just needs a fix for |
PR Checklist
Refer to the ITK Software Guide for
further development details if necessary.