HDFGroup / hdf5

Official HDF5® Library Repository
https://www.hdfgroup.org/
Other
592 stars 243 forks source link

Build fails without `-DHDF5_GENERATE_HEADERS:BOOL=ON` on macOS-13 Action #3114

Closed hyoklee closed 1 year ago

hyoklee commented 1 year ago

Describe the bug

If I don't specify -DHDF5_GENERATE_HEADERS:BOOL=ON (e.g., cmake --build .), build fails:

-- Configuring done (33.3s)
CMake Error at src/CMakeLists.txt:1273 (add_library):
  Cannot find source file:

    /Users/runner/work/hdf5/hdf5/src/H5Epubgen.h

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm .h
  .hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90 .f95 .f03 .hip .ispc

Expected behavior

Builds without error.

Platform (please complete the following information)

Additional context

Example output:

https://github.com/hyoklee/hdf5/actions/runs/5250703848/workflow

byrnHDF commented 1 year ago

develop does not store the generated files. Only release branches.

derobins commented 1 year ago

Yes. We do not store generated files in git.

hyoklee commented 1 year ago

Is there a way to print message "Please try release branches or generate the header using X command or reading Y documentation"?

byrnHDF commented 1 year ago

You can't expect a workable solution if you blindly undo all the default options. That is why there are default settings. You should expect a valid solution if you do not change anything.

hyoklee commented 1 year ago

INSTALL_CMake.txt says:

HDF5_GENERATE_HEADERS          "Rebuild Generated Files"    ON

.

So, I thought that all files exist.

byrnHDF commented 1 year ago

But you turned it OFF. So no files are generated. Maybe it should have been explained better. Add some text to the INSTALL_CMake.txt file in a PR?