-
-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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 incomplete without building with CMake #157078
Comments
@jpfeuffer how do we stop it from compiling in hardcoded paths for everything though? |
Cool! Thanks for starting this. |
Do you mean paths to shared libraries? In that case I would need to know what the policies for homebrew are. |
No, shared libraries seem fine. What I'm looking for is things like: $ strings /opt/homebrew/bin/h5diff | grep /opt
Installation point: /opt/homebrew/Cellar/hdf5/1.14.3
C Compiler: /opt/homebrew/Library/Homebrew/shims/mac/super/clang 15.0.0.15000100 Not sure what the install point is used for, but the compiler shim is not useful for anyone. |
I totally agree.. unfortunately there seem to be A LOT of hardcoded paths in the different binaries. I asked on the HDF5 forum for now. One thing I saw is that you are currently not enabling C++ and Fortran (but I think they should not be necessary for h5cc). |
Hi! I just wanted to revive this discussion. Meanwhile I received an answer from the HDF5 staff that confirms that the hardcoded build information is not used by the programs and is therefore no issue for the functionality of the binaries. The build information seemingly comes from this file, that is only included in the binaries with the CMake build. It seems merely informative for debugging. I think the strings to the source files come from the Is this a hard rule for homebrew or can we ignore/acknowledge this problem and continue if it does not affect functionality? |
The way Homebrew builds and in doing so intercepts compiler calls, this information will be pretty useless to most people. For autotools we could still override it, but for CMake it'll likely just make it much harder to use HDF5. |
Sorry, but can you elaborate? If it is a strict rule however, we should file a bug report at HDF5 GitHub and ask the developers if they are willing to change that. They probably need to reimplement the |
You can also just add And the H5build_settings.cmake.c.in file that I mentioned in my previous comment can be easily grepped to remove the information that you think is harmful before starting the build (or even replaced with a completely blank string probably). |
It'll say something like |
Regarding error messages from macros: My suggestion still stands. You can use Regarding shims, you are replacing the shims for autotools as well, so why don't you replace them for Cmake? You just need to choose another file.
becomes
And of course you have to run this before the build. |
My bad, see my comment in the PR. You apparently want to do it after cmake configuration, when the actual paths are already in the file. In this case your path |
I'm not aware offhand of a single linux distro that uses anything but the autotools files to build hdf5. Usually with notes that the cmake build is badly broken.
Linux distros are so convinced that the cmake build of hdf5 is irreparably broken that they will even configure with cmake just to generate the pkg-config files, install the pkg-config files on their own using |
brew gist-logs <formula>
link ORbrew config
ANDbrew doctor
output❯ brew gist-logs hdf5 Error: No logs. # but should be irrelevant since the installation is successful but incomplete (please read further)
Verification
brew doctor
output" saysYour system is ready to brew.
and am still able to reproduce my issue.brew update
and am still able to reproduce my issue.brew doctor
and that did not fix my problem.What were you trying to do (and why)?
In CMake:
find_package(HDF5 CONFIG ... )
To find HDF5 in my tool/lib.
What happened (include all command output)?
Fail.
What did you expect to happen?
Find HDF5 successfully.
Requirement would be the config files that hdf5 comes with if you built it with CMake.
https://forum.hdfgroup.org/t/can-we-retire-the-autotools/10362
Looks like many people are in favour of retiring autotools.
Also ".pc" files were requested before, which are only available with CMake:
#61490
And one can IMHO not say anymore that autotools is "the recommended" way (rather the other way round).
(Especially since the then-opened issue was one of the first ever and has not been addressed in their autotools build in almost 4 years HDFGroup/hdf5#8 )
Step-by-step reproduction instructions (by running
brew
commands)The text was updated successfully, but these errors were encountered: