hdf5 icon indicating copy to clipboard operation
hdf5 copied to clipboard

1.14 Redefines `ssize_t` on Windows WSL w/ Conda-Forge (GCC) Compilers

Open ax3l opened this issue 11 months ago • 1 comments

Describe the bug We have developers developing our C++ code on Windows WSL (Ubuntu) using the Conda-Forge compilers (GCC 13.3).

We noticed an error in H5public.H, where HDF5 declares a public typedef on a type named ssize_t, which breaks compiles (because it is default in the C++ standard lib, too). https://github.com/ECP-WarpX/impactx/issues/799

https://github.com/HDFGroup/hdf5/blob/hdf5_1.14.4.3/src/H5public.h#L267-L290

Image

Expected behavior Should not add a public define.

Platform (please complete the following information)

  • HDF5 version: seen with 1.14.4, but I googled and found while googlind that others had the same issue also with 1.14.0
  • OS and version: Windows 11, WSL with Ubuntu, Conda-Forge Compilers (G++/GCC)
  • Compiler: G++/GCC 13.3
  • Build system: autotools (HDF5 recipe on conda-forge), downstream I then use CMake for my app
  • Any configure options you specified: no MPI
  • MPI library and version (parallel HDF5): serial

Additional context The code in question is a DOE SciDAC-5 supported accelerator modeling code, ImpactX. The same problem would also show in other SciDAC-5 codes that use this, e.g., WarpX, Synergia.

https://github.com/ECP-WarpX/impactx/issues/799

ax3l avatar Jan 16 '25 19:01 ax3l

This is how conda-forge builds HDF5 for Linux/macOS (which is the package we use in WSL): https://github.com/conda-forge/hdf5-feedstock/blob/main/recipe/build.sh

ax3l avatar Jan 17 '25 01:01 ax3l