Repository: spack/spack

Issue:
Installation issue: xdmf3
### Steps to reproduce the issue

```console
spack install xdmf3 arch=linux-centos7-x86_64
```


### Error message

<details><summary>Error message</summary><pre>
spack install xdmf3 arch=linux-centos7-x86_64
[+] /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/bzip2-1.0.8-4qapdht5wq2ed7mqmdfuxqq6ofjwsy3q
[+] /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/zlib-1.2.11-qmjcsbqhku2wr27pgqqgztfi4ntr7tc2
[+] /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/ncurses-6.2-5pzbfymot7xcojvmgofsv2p5uporhipi
[+] /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/libpciaccess-0.16-douo7ibqp3rkfh2vnyivc3l2qnvl7w2j
[+] /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/libiconv-1.16-v4qawwterouokuwlz573tk75xe5ushqs
[+] /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/xz-5.2.5-fxlvlize72y2ztjkaavumg7nn2qr3xbj
[+] /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/numactl-2.0.14-zsmhidr2c4ou6kyxawofmxwx3a4q5sb4
[+] /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/pkgconf-1.7.4-dyuenhmqwadpb57wtk34uviynsth5ue2
[+] /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/openssl-1.1.1k-kurakbmtftshqiynleedj6bgcq4grj3t
[+] /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/boost-1.76.0-3h3k7uq3rt7phsxkkix6y63cc7hkxded
[+] /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/libedit-3.1-20210216-6n7zcuba7nelimuo3z62rqt5j4gkuxmx
[+] /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/libxml2-2.9.10-dmwqejbqylrvctorqfhri7sbnoz5rbzy
[+] /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/cmake-3.20.1-pmdhlht3xgtxgbzenykbv3g4w6pi37ot
[+] /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/libevent-2.1.12-62a4sqciufilzm77lel66rqbd54jvg5i
[+] /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/openssh-8.5p1-2yt7uuivn7pu2t266kaecscwi76whj4n
[+] /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/hwloc-2.4.1-qrvwgsllzfptqqmkoduusjaevkht5k6k
[+] /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/openmpi-4.0.5-7jbl46xp2k2hmpk3trwi55roue4gq6bi
[+] /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/hdf5-1.12.2-2bdha3hiusf5kduekapqh35dwx5dbijz
==> Installing xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3
==> No binary for xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3 found: installing from source
==> Using cached archive: /opt/ohpc/pub/spack/var/spack/cache/_source-cache/git//xdmf/xdmf.git/8d9c98081d89ac77a132d56bc8bef53581db4078.tar.gz
==> Warning: Fetching from mirror without a checksum!
  This package is normally checked out from a version control system, but it has been archived on a spack mirror.  This means we cannot know a checksum for the tarball in advance. Be sure that your connection to this mirror is secure!
==> No patches needed for xdmf3
==> xdmf3: Executing phase: 'cmake'
==> xdmf3: Executing phase: 'build'
==> Error: ProcessError: Command exited with status 2:
    'make' '-j4'

6 errors found in build log:
     592    cd /tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-build-k2es3kb/core && /opt/ohpc/pub/spack/lib/spack/env/gcc/g++ -DH5_BUILT_AS_DYNAMIC_LIB -DXdmfCore_EXPORTS -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200809L -I/tmp/spack/spack-stage/spack-stage-xdmf3-
            2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-src -I/tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-build-k2es3kb -I/tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-src/CMake/VersionSuite -I/tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7
            ymtqjhebiip3/spack-src/core -I/tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-build-k2es3kb/core -I/opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/boost-1.76.0-3h3k7uq3rt7phsxkkix6y63cc7hkxded/include -I/opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/openmpi-4.0.5-7jbl46xp2k2hmpk3t
            rwi55roue4gq6bi/include -I/opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/libxml2-2.9.10-dmwqejbqylrvctorqfhri7sbnoz5rbzy/include/libxml2 -isystem /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/hdf5-1.12.2-2bdha3hiusf5kduekapqh35dwx5dbijz/include -O2 -g -DNDEBUG -fPIC -MD -MT core/CMakeFiles/XdmfCore.dir/XdmfFunction.cpp.o
             -MF CMakeFiles/XdmfCore.dir/XdmfFunction.cpp.o.d -o CMakeFiles/XdmfCore.dir/XdmfFunction.cpp.o -c /tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-src/core/XdmfFunction.cpp
     593    [  4%] Building CXX object core/CMakeFiles/XdmfCore.dir/XdmfHDF5Controller.cpp.o
     594    cd /tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-build-k2es3kb/core && /opt/ohpc/pub/spack/lib/spack/env/gcc/g++ -DH5_BUILT_AS_DYNAMIC_LIB -DXdmfCore_EXPORTS -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200809L -I/tmp/spack/spack-stage/spack-stage-xdmf3-
            2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-src -I/tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-build-k2es3kb -I/tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-src/CMake/VersionSuite -I/tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7
            ymtqjhebiip3/spack-src/core -I/tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-build-k2es3kb/core -I/opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/boost-1.76.0-3h3k7uq3rt7phsxkkix6y63cc7hkxded/include -I/opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/openmpi-4.0.5-7jbl46xp2k2hmpk3t
            rwi55roue4gq6bi/include -I/opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/libxml2-2.9.10-dmwqejbqylrvctorqfhri7sbnoz5rbzy/include/libxml2 -isystem /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/hdf5-1.12.2-2bdha3hiusf5kduekapqh35dwx5dbijz/include -O2 -g -DNDEBUG -fPIC -MD -MT core/CMakeFiles/XdmfCore.dir/XdmfHDF5Controller
            .cpp.o -MF CMakeFiles/XdmfCore.dir/XdmfHDF5Controller.cpp.o.d -o CMakeFiles/XdmfCore.dir/XdmfHDF5Controller.cpp.o -c /tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-src/core/XdmfHDF5Controller.cpp
     595    [  5%] Building CXX object core/CMakeFiles/XdmfCore.dir/XdmfHDF5Writer.cpp.o
     596    cd /tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-build-k2es3kb/core && /opt/ohpc/pub/spack/lib/spack/env/gcc/g++ -DH5_BUILT_AS_DYNAMIC_LIB -DXdmfCore_EXPORTS -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200809L -I/tmp/spack/spack-stage/spack-stage-xdmf3-
            2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-src -I/tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-build-k2es3kb -I/tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-src/CMake/VersionSuite -I/tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7
            ymtqjhebiip3/spack-src/core -I/tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-build-k2es3kb/core -I/opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/boost-1.76.0-3h3k7uq3rt7phsxkkix6y63cc7hkxded/include -I/opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/openmpi-4.0.5-7jbl46xp2k2hmpk3t
            rwi55roue4gq6bi/include -I/opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/libxml2-2.9.10-dmwqejbqylrvctorqfhri7sbnoz5rbzy/include/libxml2 -isystem /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/hdf5-1.12.2-2bdha3hiusf5kduekapqh35dwx5dbijz/include -O2 -g -DNDEBUG -fPIC -MD -MT core/CMakeFiles/XdmfCore.dir/XdmfHDF5Writer.cpp
            .o -MF CMakeFiles/XdmfCore.dir/XdmfHDF5Writer.cpp.o.d -o CMakeFiles/XdmfCore.dir/XdmfHDF5Writer.cpp.o -c /tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-src/core/XdmfHDF5Writer.cpp
     597    In file included from /tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-src/core/XdmfHDF5Controller.cpp:32:
  >> 598    /tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-src/core/XdmfHDF5Controller.hpp:36:17: error: conflicting declaration 'typedef int hid_t'
     599       36 |     typedef int hid_t;
     600          |                 ^~~~~
     601    In file included from /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/hdf5-1.12.2-2bdha3hiusf5kduekapqh35dwx5dbijz/include/H5Apublic.h:21,
     602                     from /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/hdf5-1.12.2-2bdha3hiusf5kduekapqh35dwx5dbijz/include/hdf5.h:23,
     603                     from /tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-src/core/XdmfHDF5Controller.cpp:25:
     604    /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/hdf5-1.12.2-2bdha3hiusf5kduekapqh35dwx5dbijz/include/H5Ipublic.h:61:17: note: previous declaration as 'typedef int64_t hid_t'
     605       61 | typedef int64_t hid_t;
     606          |                 ^~~~~
  >> 607    make[2]: *** [core/CMakeFiles/XdmfCore.dir/XdmfHDF5Controller.cpp.o] Error 1
     608    make[2]: *** Waiting for unfinished jobs....
     609    In file included from /tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-src/core/XdmfHDF5Writer.cpp:36:
  >> 610    /tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-src/core/XdmfHDF5Controller.hpp:36:17: error: conflicting declaration 'typedef int hid_t'
     611       36 |     typedef int hid_t;
     612          |                 ^~~~~
     613    In file included from /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/hdf5-1.12.2-2bdha3hiusf5kduekapqh35dwx5dbijz/include/H5Apublic.h:21,
     614                     from /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/hdf5-1.12.2-2bdha3hiusf5kduekapqh35dwx5dbijz/include/hdf5.h:23,
     615                     from /tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-src/core/XdmfHDF5Writer.cpp:25:
     616    /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/hdf5-1.12.2-2bdha3hiusf5kduekapqh35dwx5dbijz/include/H5Ipublic.h:61:17: note: previous declaration as 'typedef int64_t hid_t'
     617       61 | typedef int64_t hid_t;
     618          |                 ^~~~~
  >> 619    make[2]: *** [core/CMakeFiles/XdmfCore.dir/XdmfHDF5Writer.cpp.o] Error 1
     620    make[2]: Leaving directory `/tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-build-k2es3kb'
  >> 621    make[1]: *** [core/CMakeFiles/XdmfCore.dir/all] Error 2
     622    make[1]: Leaving directory `/tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-build-k2es3kb'
  >> 623    make: *** [all] Error 2

See build log for details:
  /tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-build-out.txt

</pre></details>


### Information on your system

* **Spack:** 0.19.0
* **Python:** 3.6.8
* **Platform:** linux-centos7-broadwell
* **Concretizer:** clingo

### Additional information

[spack-build-env.txt](https://github.com/spack/spack/files/10768244/spack-build-env.txt)
[spack-build-out.txt](https://github.com/spack/spack/files/10768245/spack-build-out.txt)


### General information

- [X] I have run `spack debug report` and reported the version of Spack/Python/Platform
- [X] I have run `spack maintainers <name-of-the-package>` and **@mentioned** any maintainers
- [X] I have uploaded the build log and environment files
- [X] I have searched the issues of this repo and believe this is not a duplicate
Installation issue: xdmf3
### Steps to reproduce the issue

```console
spack install xdmf3 arch=linux-centos7-x86_64
```


### Error message

<details><summary>Error message</summary><pre>
spack install xdmf3 arch=linux-centos7-x86_64
[+] /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/bzip2-1.0.8-4qapdht5wq2ed7mqmdfuxqq6ofjwsy3q
[+] /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/zlib-1.2.11-qmjcsbqhku2wr27pgqqgztfi4ntr7tc2
[+] /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/ncurses-6.2-5pzbfymot7xcojvmgofsv2p5uporhipi
[+] /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/libpciaccess-0.16-douo7ibqp3rkfh2vnyivc3l2qnvl7w2j
[+] /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/libiconv-1.16-v4qawwterouokuwlz573tk75xe5ushqs
[+] /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/xz-5.2.5-fxlvlize72y2ztjkaavumg7nn2qr3xbj
[+] /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/numactl-2.0.14-zsmhidr2c4ou6kyxawofmxwx3a4q5sb4
[+] /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/pkgconf-1.7.4-dyuenhmqwadpb57wtk34uviynsth5ue2
[+] /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/openssl-1.1.1k-kurakbmtftshqiynleedj6bgcq4grj3t
[+] /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/boost-1.76.0-3h3k7uq3rt7phsxkkix6y63cc7hkxded
[+] /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/libedit-3.1-20210216-6n7zcuba7nelimuo3z62rqt5j4gkuxmx
[+] /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/libxml2-2.9.10-dmwqejbqylrvctorqfhri7sbnoz5rbzy
[+] /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/cmake-3.20.1-pmdhlht3xgtxgbzenykbv3g4w6pi37ot
[+] /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/libevent-2.1.12-62a4sqciufilzm77lel66rqbd54jvg5i
[+] /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/openssh-8.5p1-2yt7uuivn7pu2t266kaecscwi76whj4n
[+] /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/hwloc-2.4.1-qrvwgsllzfptqqmkoduusjaevkht5k6k
[+] /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/openmpi-4.0.5-7jbl46xp2k2hmpk3trwi55roue4gq6bi
[+] /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/hdf5-1.12.2-2bdha3hiusf5kduekapqh35dwx5dbijz
==> Installing xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3
==> No binary for xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3 found: installing from source
==> Using cached archive: /opt/ohpc/pub/spack/var/spack/cache/_source-cache/git//xdmf/xdmf.git/8d9c98081d89ac77a132d56bc8bef53581db4078.tar.gz
==> Warning: Fetching from mirror without a checksum!
  This package is normally checked out from a version control system, but it has been archived on a spack mirror.  This means we cannot know a checksum for the tarball in advance. Be sure that your connection to this mirror is secure!
==> No patches needed for xdmf3
==> xdmf3: Executing phase: 'cmake'
==> xdmf3: Executing phase: 'build'
==> Error: ProcessError: Command exited with status 2:
    'make' '-j4'

6 errors found in build log:
     592    cd /tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-build-k2es3kb/core && /opt/ohpc/pub/spack/lib/spack/env/gcc/g++ -DH5_BUILT_AS_DYNAMIC_LIB -DXdmfCore_EXPORTS -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200809L -I/tmp/spack/spack-stage/spack-stage-xdmf3-
            2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-src -I/tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-build-k2es3kb -I/tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-src/CMake/VersionSuite -I/tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7
            ymtqjhebiip3/spack-src/core -I/tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-build-k2es3kb/core -I/opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/boost-1.76.0-3h3k7uq3rt7phsxkkix6y63cc7hkxded/include -I/opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/openmpi-4.0.5-7jbl46xp2k2hmpk3t
            rwi55roue4gq6bi/include -I/opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/libxml2-2.9.10-dmwqejbqylrvctorqfhri7sbnoz5rbzy/include/libxml2 -isystem /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/hdf5-1.12.2-2bdha3hiusf5kduekapqh35dwx5dbijz/include -O2 -g -DNDEBUG -fPIC -MD -MT core/CMakeFiles/XdmfCore.dir/XdmfFunction.cpp.o
             -MF CMakeFiles/XdmfCore.dir/XdmfFunction.cpp.o.d -o CMakeFiles/XdmfCore.dir/XdmfFunction.cpp.o -c /tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-src/core/XdmfFunction.cpp
     593    [  4%] Building CXX object core/CMakeFiles/XdmfCore.dir/XdmfHDF5Controller.cpp.o
     594    cd /tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-build-k2es3kb/core && /opt/ohpc/pub/spack/lib/spack/env/gcc/g++ -DH5_BUILT_AS_DYNAMIC_LIB -DXdmfCore_EXPORTS -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200809L -I/tmp/spack/spack-stage/spack-stage-xdmf3-
            2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-src -I/tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-build-k2es3kb -I/tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-src/CMake/VersionSuite -I/tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7
            ymtqjhebiip3/spack-src/core -I/tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-build-k2es3kb/core -I/opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/boost-1.76.0-3h3k7uq3rt7phsxkkix6y63cc7hkxded/include -I/opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/openmpi-4.0.5-7jbl46xp2k2hmpk3t
            rwi55roue4gq6bi/include -I/opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/libxml2-2.9.10-dmwqejbqylrvctorqfhri7sbnoz5rbzy/include/libxml2 -isystem /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/hdf5-1.12.2-2bdha3hiusf5kduekapqh35dwx5dbijz/include -O2 -g -DNDEBUG -fPIC -MD -MT core/CMakeFiles/XdmfCore.dir/XdmfHDF5Controller
            .cpp.o -MF CMakeFiles/XdmfCore.dir/XdmfHDF5Controller.cpp.o.d -o CMakeFiles/XdmfCore.dir/XdmfHDF5Controller.cpp.o -c /tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-src/core/XdmfHDF5Controller.cpp
     595    [  5%] Building CXX object core/CMakeFiles/XdmfCore.dir/XdmfHDF5Writer.cpp.o
     596    cd /tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-build-k2es3kb/core && /opt/ohpc/pub/spack/lib/spack/env/gcc/g++ -DH5_BUILT_AS_DYNAMIC_LIB -DXdmfCore_EXPORTS -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200809L -I/tmp/spack/spack-stage/spack-stage-xdmf3-
            2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-src -I/tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-build-k2es3kb -I/tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-src/CMake/VersionSuite -I/tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7
            ymtqjhebiip3/spack-src/core -I/tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-build-k2es3kb/core -I/opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/boost-1.76.0-3h3k7uq3rt7phsxkkix6y63cc7hkxded/include -I/opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/openmpi-4.0.5-7jbl46xp2k2hmpk3t
            rwi55roue4gq6bi/include -I/opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/libxml2-2.9.10-dmwqejbqylrvctorqfhri7sbnoz5rbzy/include/libxml2 -isystem /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/hdf5-1.12.2-2bdha3hiusf5kduekapqh35dwx5dbijz/include -O2 -g -DNDEBUG -fPIC -MD -MT core/CMakeFiles/XdmfCore.dir/XdmfHDF5Writer.cpp
            .o -MF CMakeFiles/XdmfCore.dir/XdmfHDF5Writer.cpp.o.d -o CMakeFiles/XdmfCore.dir/XdmfHDF5Writer.cpp.o -c /tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-src/core/XdmfHDF5Writer.cpp
     597    In file included from /tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-src/core/XdmfHDF5Controller.cpp:32:
  >> 598    /tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-src/core/XdmfHDF5Controller.hpp:36:17: error: conflicting declaration 'typedef int hid_t'
     599       36 |     typedef int hid_t;
     600          |                 ^~~~~
     601    In file included from /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/hdf5-1.12.2-2bdha3hiusf5kduekapqh35dwx5dbijz/include/H5Apublic.h:21,
     602                     from /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/hdf5-1.12.2-2bdha3hiusf5kduekapqh35dwx5dbijz/include/hdf5.h:23,
     603                     from /tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-src/core/XdmfHDF5Controller.cpp:25:
     604    /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/hdf5-1.12.2-2bdha3hiusf5kduekapqh35dwx5dbijz/include/H5Ipublic.h:61:17: note: previous declaration as 'typedef int64_t hid_t'
     605       61 | typedef int64_t hid_t;
     606          |                 ^~~~~
  >> 607    make[2]: *** [core/CMakeFiles/XdmfCore.dir/XdmfHDF5Controller.cpp.o] Error 1
     608    make[2]: *** Waiting for unfinished jobs....
     609    In file included from /tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-src/core/XdmfHDF5Writer.cpp:36:
  >> 610    /tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-src/core/XdmfHDF5Controller.hpp:36:17: error: conflicting declaration 'typedef int hid_t'
     611       36 |     typedef int hid_t;
     612          |                 ^~~~~
     613    In file included from /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/hdf5-1.12.2-2bdha3hiusf5kduekapqh35dwx5dbijz/include/H5Apublic.h:21,
     614                     from /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/hdf5-1.12.2-2bdha3hiusf5kduekapqh35dwx5dbijz/include/hdf5.h:23,
     615                     from /tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-src/core/XdmfHDF5Writer.cpp:25:
     616    /opt/ohpc/pub/spack/opt/spack/linux-centos7-x86_64/gcc-9.4.0/hdf5-1.12.2-2bdha3hiusf5kduekapqh35dwx5dbijz/include/H5Ipublic.h:61:17: note: previous declaration as 'typedef int64_t hid_t'
     617       61 | typedef int64_t hid_t;
     618          |                 ^~~~~
  >> 619    make[2]: *** [core/CMakeFiles/XdmfCore.dir/XdmfHDF5Writer.cpp.o] Error 1
     620    make[2]: Leaving directory `/tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-build-k2es3kb'
  >> 621    make[1]: *** [core/CMakeFiles/XdmfCore.dir/all] Error 2
     622    make[1]: Leaving directory `/tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-build-k2es3kb'
  >> 623    make: *** [all] Error 2

See build log for details:
  /tmp/spack/spack-stage/spack-stage-xdmf3-2019-01-14-k2es3kbmfklzjnthaxy7ymtqjhebiip3/spack-build-out.txt

</pre></details>


### Information on your system

* **Spack:** 0.19.0
* **Python:** 3.6.8
* **Platform:** linux-centos7-broadwell
* **Concretizer:** clingo

### Additional information

[spack-build-env.txt](https://github.com/spack/spack/files/10768244/spack-build-env.txt)
[spack-build-out.txt](https://github.com/spack/spack/files/10768245/spack-build-out.txt)


### General information

- [X] I have run `spack debug report` and reported the version of Spack/Python/Platform
- [X] I have run `spack maintainers <name-of-the-package>` and **@mentioned** any maintainers
- [X] I have uploaded the build log and environment files
- [X] I have searched the issues of this repo and believe this is not a duplicate


Discussion:

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/xdmf3/package.py b/var/spack/repos/builtin/packages/xdmf3/package.py
--- a/var/spack/repos/builtin/packages/xdmf3/package.py
+++ b/var/spack/repos/builtin/packages/xdmf3/package.py
@@ -30,8 +30,10 @@ class Xdmf3(CMakePackage):
     # See https://github.com/spack/spack/pull/22303 for reference
     depends_on(Boost.with_default_variants)
     depends_on("mpi", when="+mpi")
-    depends_on("hdf5+mpi", when="+mpi")
-    depends_on("hdf5~mpi", when="~mpi")
+    depends_on("hdf5@1.10:+mpi", when="+mpi")
+    depends_on("hdf5@1.10:~mpi", when="~mpi")
+    # motivated by discussion in https://gitlab.kitware.com/xdmf/xdmf/-/issues/28
+    patch("fix_hdf5_hid_t.diff")
 
     def cmake_args(self):
         """Populate cmake arguments for XDMF."""
@@ -42,7 +44,7 @@ def cmake_args(self):
             "-DXDMF_BUILD_UTILS=ON",
             "-DXDMF_WRAP_JAVA=OFF",
             "-DXDMF_WRAP_PYTHON=OFF",
-            "-DXDMF_BUILD_TESTING=ON",
+            "-DXDMF_BUILD_TESTING=OFF",
         ]
 
         return cmake_args


Test patch: