Repository: spack/spack

Issue:
Installation issue: mpich@3.4.1 ^libfabric@1.4.2
<!-- Thanks for taking the time to report this build failure. To proceed with the report please:

1. Title the issue "Installation issue: <name-of-the-package>".
2. Provide the information required below.

We encourage you to try, as much as possible, to reduce your problem to the minimal example that still reproduces the issue. That would help us a lot in fixing it quickly and effectively! -->

### Steps to reproduce the issue

<!-- Fill in the exact spec you are trying to build and the relevant part of the error message -->
```console
$ spack install mpich@3.4.1 ^libfabric@1.4.2
==> Installing mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx
==> No binary for mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx found: installing from source
==> Fetching https://mirror.spack.io/_source-cache/archive/88/8836939804ef6d492bcee7d54abafd6477d2beca247157d92688654d13779727.tar.gz
######################################################################## 100.0%
==> No patches needed for mpich
==> mpich: Executing phase: 'autoreconf'
==> mpich: Executing phase: 'configure'
==> mpich: Executing phase: 'build'
==> Error: ProcessError: Command exited with status 2:
    'gmake' '-j16' 'V=1'

6 errors found in build log:
     10112    libtool: compile:  /home/tjahns/Documents/work/dkrz/build/spack/lib/spack/env/gcc/gcc -DHAVE_C
              ONFIG_H -I. -I./src/include -I./modules/hwloc/include/private/autogen -I./modules/hwloc/includ
              e/hwloc/autogen -I./src/include -I./src/mpi/coll/allreduce_group/ -I./src/mpi/coll/transports/
              gentran -I./src/mpi/coll/transports/stubtran -I./src/mpi/coll/transports/common -I./src/mpi/co
              ll/algorithms/treealgo -I./src/mpi/coll/algorithms/recexchalgo -I./src/mpi/coll/algorithms/stu
              balgo -I./src/mpi/coll/algorithms/common -I./src/mpi/coll/include/ -I./src/mpi/datatype/typere
              p/dataloop -I./src/mpi/datatype -I./src/mpi/spawn -I./src/util -I./src/binding/cxx -I/dev/shm/
              spack_stage/tjahns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/src/bind
              ing/fortran/mpif_h -Isrc/binding/fortran/use_mpi -I/dev/shm/spack_stage/tjahns/spack-stage-mpi
              ch-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/src/binding/fortran/use_mpi_f08/wrappers_c
               -I./src/mpid/include -I./src/mpid/ch4/include -I./src/mpid/ch4/include -I./src/mpid/ch4/src -
              I./src/mpid/ch4/generic/am -I./src/mpid/ch4/netmod/include -I./src/mpid/ch4/shm/include -I./sr
              c/mpid/ch4/shm/posix -I./src/mpid/ch4/shm/src -I./src/mpid/ch4/shm/posix/release_gather -I./sr
              c/mpid/ch4/shm/posix/eager/include -I./src/mpid/ch4/shm/posix/eager/include -I./src/mpid/ch4/s
              hm/ipc/src -I./src/mpid/common/sched -I./src/mpid/common/thread -I./src/mpid/common/timers -I.
              /src/mpid/common/shm -I./src/mpid/common/bc -I./src/mpid/common/genq -I./src/pmi/simple -I./sr
              c/pmi/include -I/usr/include -DNETMOD_INLINE=__netmod_inline_ofi__ -I/dev/shm/spack_stage/tjah
              ns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/src/mpl/include -I/dev/s
              hm/spack_stage/tjahns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/src/m
              pl/include -I/dev/shm/spack_stage/tjahns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisp
              arx/spack-src/modules/yaksa/src/frontend/include -I/dev/shm/spack_stage/tjahns/spack-stage-mpi
              ch-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/modules/yaksa/src/frontend/include -I/dev/
              shm/spack_stage/tjahns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/modu
              les/json-c -I/dev/shm/spack_stage/tjahns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisp
              arx/spack-src/modules/json-c -I/sw/spack/linux-debian9-x86_64/gcc-6.3.0/hwloc/2.5.0-kgkitwa2eb
              d5gruhwckvijowqhorhbek/include -D_REENTRANT -I/dev/shm/spack_stage/tjahns/spack-stage-mpich-3.
              4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/src/mpi/romio/include -fvisibility=hidden -O2 -
              MT src/mpid/ch4/netmod/ofi/lib_libmpi_la-ofi_win.lo -MD -MP -MF src/mpid/ch4/netmod/ofi/.deps/
              lib_libmpi_la-ofi_win.Tpo -c src/mpid/ch4/netmod/ofi/ofi_win.c  -fPIC -DPIC -o src/mpid/ch4/ne
              tmod/ofi/.libs/lib_libmpi_la-ofi_win.o
     10113    libtool: compile:  /home/tjahns/Documents/work/dkrz/build/spack/lib/spack/env/gcc/gcc -DHAVE_C
              ONFIG_H -I. -I./src/include -I./modules/hwloc/include/private/autogen -I./modules/hwloc/includ
              e/hwloc/autogen -I./src/include -I./src/mpi/coll/allreduce_group/ -I./src/mpi/coll/transports/
              gentran -I./src/mpi/coll/transports/stubtran -I./src/mpi/coll/transports/common -I./src/mpi/co
              ll/algorithms/treealgo -I./src/mpi/coll/algorithms/recexchalgo -I./src/mpi/coll/algorithms/stu
              balgo -I./src/mpi/coll/algorithms/common -I./src/mpi/coll/include/ -I./src/mpi/datatype/typere
              p/dataloop -I./src/mpi/datatype -I./src/mpi/spawn -I./src/util -I./src/binding/cxx -I/dev/shm/
              spack_stage/tjahns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/src/bind
              ing/fortran/mpif_h -Isrc/binding/fortran/use_mpi -I/dev/shm/spack_stage/tjahns/spack-stage-mpi
              ch-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/src/binding/fortran/use_mpi_f08/wrappers_c
               -I./src/mpid/include -I./src/mpid/ch4/include -I./src/mpid/ch4/include -I./src/mpid/ch4/src -
              I./src/mpid/ch4/generic/am -I./src/mpid/ch4/netmod/include -I./src/mpid/ch4/shm/include -I./sr
              c/mpid/ch4/shm/posix -I./src/mpid/ch4/shm/src -I./src/mpid/ch4/shm/posix/release_gather -I./sr
              c/mpid/ch4/shm/posix/eager/include -I./src/mpid/ch4/shm/posix/eager/include -I./src/mpid/ch4/s
              hm/ipc/src -I./src/mpid/common/sched -I./src/mpid/common/thread -I./src/mpid/common/timers -I.
              /src/mpid/common/shm -I./src/mpid/common/bc -I./src/mpid/common/genq -I./src/pmi/simple -I./sr
              c/pmi/include -I/usr/include -DNETMOD_INLINE=__netmod_inline_ofi__ -I/dev/shm/spack_stage/tjah
              ns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/src/mpl/include -I/dev/s
              hm/spack_stage/tjahns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/src/m
              pl/include -I/dev/shm/spack_stage/tjahns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisp
              arx/spack-src/modules/yaksa/src/frontend/include -I/dev/shm/spack_stage/tjahns/spack-stage-mpi
              ch-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/modules/yaksa/src/frontend/include -I/dev/
              shm/spack_stage/tjahns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/modu
              les/json-c -I/dev/shm/spack_stage/tjahns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisp
              arx/spack-src/modules/json-c -I/sw/spack/linux-debian9-x86_64/gcc-6.3.0/hwloc/2.5.0-kgkitwa2eb
              d5gruhwckvijowqhorhbek/include -D_REENTRANT -I/dev/shm/spack_stage/tjahns/spack-stage-mpich-3.
              4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/src/mpi/romio/include -fvisibility=hidden -O2 -
              MT src/mpid/ch4/netmod/ofi/lib_libmpi_la-ofi_spawn.lo -MD -MP -MF src/mpid/ch4/netmod/ofi/.dep
              s/lib_libmpi_la-ofi_spawn.Tpo -c src/mpid/ch4/netmod/ofi/ofi_spawn.c  -fPIC -DPIC -o src/mpid/
              ch4/netmod/ofi/.libs/lib_libmpi_la-ofi_spawn.o
     10114    mv -f src/mpid/ch4/src/.deps/lib_libmpi_la-mpid_ch4_net_array.Tpo src/mpid/ch4/src/.deps/lib_l
              ibmpi_la-mpid_ch4_net_array.Plo
     10115    /bin/bash ./libtool  --tag=CC   --mode=compile /home/tjahns/Documents/work/dkrz/build/spack/li
              b/spack/env/gcc/gcc -DHAVE_CONFIG_H -I. -I./src/include -I./modules/hwloc/include/private/auto
              gen -I./modules/hwloc/include/hwloc/autogen  -I./src/include -I./src/mpi/coll/allreduce_group/
               -I./src/mpi/coll/transports/gentran -I./src/mpi/coll/transports/stubtran -I./src/mpi/coll/tra
              nsports/common -I./src/mpi/coll/algorithms/treealgo -I./src/mpi/coll/algorithms/recexchalgo -I
              ./src/mpi/coll/algorithms/stubalgo -I./src/mpi/coll/algorithms/common -I./src/mpi/coll/include
              / -I./src/mpi/datatype/typerep/dataloop -I./src/mpi/datatype -I./src/mpi/spawn -I./src/util -I
              ./src/binding/cxx -I/dev/shm/spack_stage/tjahns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpko
              biuyisparx/spack-src/src/binding/fortran/mpif_h -Isrc/binding/fortran/use_mpi -I/dev/shm/spack
              _stage/tjahns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/src/binding/f
              ortran/use_mpi_f08/wrappers_c -I./src/mpid/include     -I./src/mpid/ch4/include -I./src/mpid/c
              h4/include -I./src/mpid/ch4/src -I./src/mpid/ch4/generic/am -I./src/mpid/ch4/netmod/include -I
              ./src/mpid/ch4/shm/include -I./src/mpid/ch4/shm/posix -I./src/mpid/ch4/shm/src -I./src/mpid/ch
              4/shm/posix/release_gather -I./src/mpid/ch4/shm/posix/eager/include -I./src/mpid/ch4/shm/posix
              /eager/include -I./src/mpid/ch4/shm/ipc/src -I./src/mpid/common/sched -I./src/mpid/common/thre
              ad -I./src/mpid/common/timers -I./src/mpid/common/shm -I./src/mpid/common/bc -I./src/mpid/comm
              on/genq  -I./src/pmi/simple -I./src/pmi/include  -I/usr/include -DNETMOD_INLINE=__netmod_inlin
              e_ofi__ -I/dev/shm/spack_stage/tjahns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx
              /spack-src/src/mpl/include -I/dev/shm/spack_stage/tjahns/spack-stage-mpich-3.4.1-5kl23iuybtu44
              gweczlpkobiuyisparx/spack-src/src/mpl/include -I/dev/shm/spack_stage/tjahns/spack-stage-mpich-
              3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/modules/yaksa/src/frontend/include -I/dev/shm
              /spack_stage/tjahns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/modules
              /yaksa/src/frontend/include -I/dev/shm/spack_stage/tjahns/spack-stage-mpich-3.4.1-5kl23iuybtu4
              4gweczlpkobiuyisparx/spack-src/modules/json-c -I/dev/shm/spack_stage/tjahns/spack-stage-mpich-
              3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/modules/json-c -I/sw/spack/linux-debian9-x86_
              64/gcc-6.3.0/hwloc/2.5.0-kgkitwa2ebd5gruhwckvijowqhorhbek/include -D_REENTRANT -I/dev/shm/spac
              k_stage/tjahns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/src/mpi/romi
              o/include -fvisibility=hidden  -O2 -MT src/mpid/ch4/netmod/ofi/lib_libmpi_la-ofi_events.lo -MD
               -MP -MF src/mpid/ch4/netmod/ofi/.deps/lib_libmpi_la-ofi_events.Tpo -c -o src/mpid/ch4/netmod/
              ofi/lib_libmpi_la-ofi_events.lo `test -f 'src/mpid/ch4/netmod/ofi/ofi_events.c' || echo './'`s
              rc/mpid/ch4/netmod/ofi/ofi_events.c
     10116    libtool: compile:  /home/tjahns/Documents/work/dkrz/build/spack/lib/spack/env/gcc/gcc -DHAVE_C
              ONFIG_H -I. -I./src/include -I./modules/hwloc/include/private/autogen -I./modules/hwloc/includ
              e/hwloc/autogen -I./src/include -I./src/mpi/coll/allreduce_group/ -I./src/mpi/coll/transports/
              gentran -I./src/mpi/coll/transports/stubtran -I./src/mpi/coll/transports/common -I./src/mpi/co
              ll/algorithms/treealgo -I./src/mpi/coll/algorithms/recexchalgo -I./src/mpi/coll/algorithms/stu
              balgo -I./src/mpi/coll/algorithms/common -I./src/mpi/coll/include/ -I./src/mpi/datatype/typere
              p/dataloop -I./src/mpi/datatype -I./src/mpi/spawn -I./src/util -I./src/binding/cxx -I/dev/shm/
              spack_stage/tjahns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/src/bind
              ing/fortran/mpif_h -Isrc/binding/fortran/use_mpi -I/dev/shm/spack_stage/tjahns/spack-stage-mpi
              ch-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/src/binding/fortran/use_mpi_f08/wrappers_c
               -I./src/mpid/include -I./src/mpid/ch4/include -I./src/mpid/ch4/include -I./src/mpid/ch4/src -
              I./src/mpid/ch4/generic/am -I./src/mpid/ch4/netmod/include -I./src/mpid/ch4/shm/include -I./sr
              c/mpid/ch4/shm/posix -I./src/mpid/ch4/shm/src -I./src/mpid/ch4/shm/posix/release_gather -I./sr
              c/mpid/ch4/shm/posix/eager/include -I./src/mpid/ch4/shm/posix/eager/include -I./src/mpid/ch4/s
              hm/ipc/src -I./src/mpid/common/sched -I./src/mpid/common/thread -I./src/mpid/common/timers -I.
              /src/mpid/common/shm -I./src/mpid/common/bc -I./src/mpid/common/genq -I./src/pmi/simple -I./sr
              c/pmi/include -I/usr/include -DNETMOD_INLINE=__netmod_inline_ofi__ -I/dev/shm/spack_stage/tjah
              ns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/src/mpl/include -I/dev/s
              hm/spack_stage/tjahns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/src/m
              pl/include -I/dev/shm/spack_stage/tjahns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisp
              arx/spack-src/modules/yaksa/src/frontend/include -I/dev/shm/spack_stage/tjahns/spack-stage-mpi
              ch-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/modules/yaksa/src/frontend/include -I/dev/
              shm/spack_stage/tjahns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/modu
              les/json-c -I/dev/shm/spack_stage/tjahns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisp
              arx/spack-src/modules/json-c -I/sw/spack/linux-debian9-x86_64/gcc-6.3.0/hwloc/2.5.0-kgkitwa2eb
              d5gruhwckvijowqhorhbek/include -D_REENTRANT -I/dev/shm/spack_stage/tjahns/spack-stage-mpich-3.
              4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/src/mpi/romio/include -fvisibility=hidden -O2 -
              MT src/mpid/ch4/generic/am/lib_libmpi_la-mpidig_am_comm_abort.lo -MD -MP -MF src/mpid/ch4/gene
              ric/am/.deps/lib_libmpi_la-mpidig_am_comm_abort.Tpo -c src/mpid/ch4/generic/am/mpidig_am_comm_
              abort.c -o src/mpid/ch4/generic/am/lib_libmpi_la-mpidig_am_comm_abort.o >/dev/null 2>&1
     10117    src/mpid/ch4/netmod/ofi/ofi_init.c: In function 'update_global_settings':
  >> 10118    src/mpid/ch4/netmod/ofi/ofi_init.c:1693:65: error: 'FI_MR_VIRT_ADDR' undeclared (first use in 
              this function)
     10119     1693 |                                prov_use->domain_attr->mr_mode & FI_MR_VIRT_ADDR);
     10120          |                                                                 ^~~~~~~~~~~~~~~
     10121    src/mpid/ch4/netmod/ofi/ofi_init.c:1668:70: note: in definition of macro 'UPDATE_SETTING_BY_IN
              FO'
     10122     1668 |     MPIDI_OFI_global.settings.cap = MPIDI_OFI_global.settings.cap && info_cond
     10123          |                                                                      ^~~~~~~~~
     10124    src/mpid/ch4/netmod/ofi/ofi_init.c:1693:65: note: each undeclared identifier is reported only 
              once for each function it appears in
     10125     1693 |                                prov_use->domain_attr->mr_mode & FI_MR_VIRT_ADDR);
     10126          |                                                                 ^~~~~~~~~~~~~~~
     10127    src/mpid/ch4/netmod/ofi/ofi_init.c:1668:70: note: in definition of macro 'UPDATE_SETTING_BY_IN
              FO'
     10128     1668 |     MPIDI_OFI_global.settings.cap = MPIDI_OFI_global.settings.cap && info_cond
     10129          |                                                                      ^~~~~~~~~
  >> 10130    src/mpid/ch4/netmod/ofi/ofi_init.c:1695:65: error: 'FI_MR_ALLOCATED' undeclared (first use in 
              this function)
     10131     1695 |                                prov_use->domain_attr->mr_mode & FI_MR_ALLOCATED);
     10132          |                                                                 ^~~~~~~~~~~~~~~
     10133    src/mpid/ch4/netmod/ofi/ofi_init.c:1668:70: note: in definition of macro 'UPDATE_SETTING_BY_IN
              FO'
     10134     1668 |     MPIDI_OFI_global.settings.cap = MPIDI_OFI_global.settings.cap && info_cond
     10135          |                                                                      ^~~~~~~~~
  >> 10136    src/mpid/ch4/netmod/ofi/ofi_init.c:1696:85: error: 'FI_MR_PROV_KEY' undeclared (first use in t
              his function)
     10137     1696 |         UPDATE_SETTING_BY_INFO(enable_mr_prov_key, prov_use->domain_attr->mr_mode & FI
              _MR_PROV_KEY);
     10138          |                                                                                     ^~
              ~~~~~~~~~~~~
     10139    src/mpid/ch4/netmod/ofi/ofi_init.c:1668:70: note: in definition of macro 'UPDATE_SETTING_BY_IN
              FO'
     10140     1668 |     MPIDI_OFI_global.settings.cap = MPIDI_OFI_global.settings.cap && info_cond
     10141          |                                                                      ^~~~~~~~~
     10142    Makefile:33720: recipe for target 'src/mpid/ch4/netmod/ofi/lib_libmpi_la-ofi_init.lo' failed
  >> 10143    make[2]: *** [src/mpid/ch4/netmod/ofi/lib_libmpi_la-ofi_init.lo] Error 1
     10144    make[2]: *** Waiting for unfinished jobs....
     10145    libtool: compile:  /home/tjahns/Documents/work/dkrz/build/spack/lib/spack/env/gcc/gcc -DHAVE_C
              ONFIG_H -I. -I./src/include -I./modules/hwloc/include/private/autogen -I./modules/hwloc/includ
              e/hwloc/autogen -I./src/include -I./src/mpi/coll/allreduce_group/ -I./src/mpi/coll/transports/
              gentran -I./src/mpi/coll/transports/stubtran -I./src/mpi/coll/transports/common -I./src/mpi/co
              ll/algorithms/treealgo -I./src/mpi/coll/algorithms/recexchalgo -I./src/mpi/coll/algorithms/stu
              balgo -I./src/mpi/coll/algorithms/common -I./src/mpi/coll/include/ -I./src/mpi/datatype/typere
              p/dataloop -I./src/mpi/datatype -I./src/mpi/spawn -I./src/util -I./src/binding/cxx -I/dev/shm/
              spack_stage/tjahns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/src/bind
              ing/fortran/mpif_h -Isrc/binding/fortran/use_mpi -I/dev/shm/spack_stage/tjahns/spack-stage-mpi
              ch-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/src/binding/fortran/use_mpi_f08/wrappers_c
               -I./src/mpid/include -I./src/mpid/ch4/include -I./src/mpid/ch4/include -I./src/mpid/ch4/src -
              I./src/mpid/ch4/generic/am -I./src/mpid/ch4/netmod/include -I./src/mpid/ch4/shm/include -I./sr
              c/mpid/ch4/shm/posix -I./src/mpid/ch4/shm/src -I./src/mpid/ch4/shm/posix/release_gather -I./sr
              c/mpid/ch4/shm/posix/eager/include -I./src/mpid/ch4/shm/posix/eager/include -I./src/mpid/ch4/s
              hm/ipc/src -I./src/mpid/common/sched -I./src/mpid/common/thread -I./src/mpid/common/timers -I.
              /src/mpid/common/shm -I./src/mpid/common/bc -I./src/mpid/common/genq -I./src/pmi/simple -I./sr
              c/pmi/include -I/usr/include -DNETMOD_INLINE=__netmod_inline_ofi__ -I/dev/shm/spack_stage/tjah
              ns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/src/mpl/include -I/dev/s
              hm/spack_stage/tjahns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/src/m
              pl/include -I/dev/shm/spack_stage/tjahns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisp
              arx/spack-src/modules/yaksa/src/frontend/include -I/dev/shm/spack_stage/tjahns/spack-stage-mpi
              ch-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/modules/yaksa/src/frontend/include -I/dev/
              shm/spack_stage/tjahns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/modu
              les/json-c -I/dev/shm/spack_stage/tjahns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisp
              arx/spack-src/modules/json-c -I/sw/spack/linux-debian9-x86_64/gcc-6.3.0/hwloc/2.5.0-kgkitwa2eb
              d5gruhwckvijowqhorhbek/include -D_REENTRANT -I/dev/shm/spack_stage/tjahns/spack-stage-mpich-3.
              4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/src/mpi/romio/include -fvisibility=hidden -O2 -
              MT src/mpid/ch4/netmod/ofi/lib_libmpi_la-ofi_events.lo -MD -MP -MF src/mpid/ch4/netmod/ofi/.de
              ps/lib_libmpi_la-ofi_events.Tpo -c src/mpid/ch4/netmod/ofi/ofi_events.c  -fPIC -DPIC -o src/mp
              id/ch4/netmod/ofi/.libs/lib_libmpi_la-ofi_events.o
     10146    libtool: compile:  /home/tjahns/Documents/work/dkrz/build/spack/lib/spack/env/gcc/gcc -DHAVE_C
              ONFIG_H -I. -I./src/include -I./modules/hwloc/include/private/autogen -I./modules/hwloc/includ
              e/hwloc/autogen -I./src/include -I./src/mpi/coll/allreduce_group/ -I./src/mpi/coll/transports/
              gentran -I./src/mpi/coll/transports/stubtran -I./src/mpi/coll/transports/common -I./src/mpi/co
              ll/algorithms/treealgo -I./src/mpi/coll/algorithms/recexchalgo -I./src/mpi/coll/algorithms/stu
              balgo -I./src/mpi/coll/algorithms/common -I./src/mpi/coll/include/ -I./src/mpi/datatype/typere
              p/dataloop -I./src/mpi/datatype -I./src/mpi/spawn -I./src/util -I./src/binding/cxx -I/dev/shm/
              spack_stage/tjahns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/src/bind
              ing/fortran/mpif_h -Isrc/binding/fortran/use_mpi -I/dev/shm/spack_stage/tjahns/spack-stage-mpi
              ch-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/src/binding/fortran/use_mpi_f08/wrappers_c
               -I./src/mpid/include -I./src/mpid/ch4/include -I./src/mpid/ch4/include -I./src/mpid/ch4/src -
              I./src/mpid/ch4/generic/am -I./src/mpid/ch4/netmod/include -I./src/mpid/ch4/shm/include -I./sr
              c/mpid/ch4/shm/posix -I./src/mpid/ch4/shm/src -I./src/mpid/ch4/shm/posix/release_gather -I./sr
              c/mpid/ch4/shm/posix/eager/include -I./src/mpid/ch4/shm/posix/eager/include -I./src/mpid/ch4/s
              hm/ipc/src -I./src/mpid/common/sched -I./src/mpid/common/thread -I./src/mpid/common/timers -I.
              /src/mpid/common/shm -I./src/mpid/common/bc -I./src/mpid/common/genq -I./src/pmi/simple -I./sr
              c/pmi/include -I/usr/include -DNETMOD_INLINE=__netmod_inline_ofi__ -I/dev/shm/spack_stage/tjah
              ns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/src/mpl/include -I/dev/s
              hm/spack_stage/tjahns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/src/m
              pl/include -I/dev/shm/spack_stage/tjahns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisp
              arx/spack-src/modules/yaksa/src/frontend/include -I/dev/shm/spack_stage/tjahns/spack-stage-mpi
              ch-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/modules/yaksa/src/frontend/include -I/dev/
              shm/spack_stage/tjahns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/modu
              les/json-c -I/dev/shm/spack_stage/tjahns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisp
              arx/spack-src/modules/json-c -I/sw/spack/linux-debian9-x86_64/gcc-6.3.0/hwloc/2.5.0-kgkitwa2eb
              d5gruhwckvijowqhorhbek/include -D_REENTRANT -I/dev/shm/spack_stage/tjahns/spack-stage-mpich-3.
              4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/src/mpi/romio/include -fvisibility=hidden -O2 -
              MT src/mpid/ch4/netmod/ofi/lib_libmpi_la-ofi_comm.lo -MD -MP -MF src/mpid/ch4/netmod/ofi/.deps
              /lib_libmpi_la-ofi_comm.Tpo -c src/mpid/ch4/netmod/ofi/ofi_comm.c -o src/mpid/ch4/netmod/ofi/l
              ib_libmpi_la-ofi_comm.o >/dev/null 2>&1
     10147    mv -f src/mpid/ch4/generic/am/.deps/lib_libmpi_la-mpidig_am_globals.Tpo src/mpid/ch4/generic/a
              m/.deps/lib_libmpi_la-mpidig_am_globals.Plo
     10148    libtool: compile:  /home/tjahns/Documents/work/dkrz/build/spack/lib/spack/env/gcc/gcc -DHAVE_C
              ONFIG_H -I. -I./src/include -I./modules/hwloc/include/private/autogen -I./modules/hwloc/includ
              e/hwloc/autogen -I./src/include -I./src/mpi/coll/allreduce_group/ -I./src/mpi/coll/transports/
              gentran -I./src/mpi/coll/transports/stubtran -I./src/mpi/coll/transports/common -I./src/mpi/co
              ll/algorithms/treealgo -I./src/mpi/coll/algorithms/recexchalgo -I./src/mpi/coll/algorithms/stu
              balgo -I./src/mpi/coll/algorithms/common -I./src/mpi/coll/include/ -I./src/mpi/datatype/typere
              p/dataloop -I./src/mpi/datatype -I./src/mpi/spawn -I./src/util -I./src/binding/cxx -I/dev/shm/
              spack_stage/tjahns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/src/bind
              ing/fortran/mpif_h -Isrc/binding/fortran/use_mpi -I/dev/shm/spack_stage/tjahns/spack-stage-mpi
              ch-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/src/binding/fortran/use_mpi_f08/wrappers_c
               -I./src/mpid/include -I./src/mpid/ch4/include -I./src/mpid/ch4/include -I./src/mpid/ch4/src -
              I./src/mpid/ch4/generic/am -I./src/mpid/ch4/netmod/include -I./src/mpid/ch4/shm/include -I./sr
              c/mpid/ch4/shm/posix -I./src/mpid/ch4/shm/src -I./src/mpid/ch4/shm/posix/release_gather -I./sr
              c/mpid/ch4/shm/posix/eager/include -I./src/mpid/ch4/shm/posix/eager/include -I./src/mpid/ch4/s
              hm/ipc/src -I./src/mpid/common/sched -I./src/mpid/common/thread -I./src/mpid/common/timers -I.
              /src/mpid/common/shm -I./src/mpid/common/bc -I./src/mpid/common/genq -I./src/pmi/simple -I./sr
              c/pmi/include -I/usr/include -DNETMOD_INLINE=__netmod_inline_ofi__ -I/dev/shm/spack_stage/tjah
              ns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/src/mpl/include -I/dev/s
              hm/spack_stage/tjahns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/src/m
              pl/include -I/dev/shm/spack_stage/tjahns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisp
              arx/spack-src/modules/yaksa/src/frontend/include -I/dev/shm/spack_stage/tjahns/spack-stage-mpi
              ch-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/modules/yaksa/src/frontend/include -I/dev/
              shm/spack_stage/tjahns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/modu
              les/json-c -I/dev/shm/spack_stage/tjahns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisp
              arx/spack-src/modules/json-c -I/sw/spack/linux-debian9-x86_64/gcc-6.3.0/hwloc/2.5.0-kgkitwa2eb
              d5gruhwckvijowqhorhbek/include -D_REENTRANT -I/dev/shm/spack_stage/tjahns/spack-stage-mpich-3.
              4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/src/mpi/romio/include -fvisibility=hidden -O2 -
              MT src/mpid/ch4/netmod/ofi/lib_libmpi_la-ofi_op.lo -MD -MP -MF src/mpid/ch4/netmod/ofi/.deps/l
              ib_libmpi_la-ofi_op.Tpo -c src/mpid/ch4/netmod/ofi/ofi_op.c -o src/mpid/ch4/netmod/ofi/lib_lib
              mpi_la-ofi_op.o >/dev/null 2>&1
     10149    libtool: compile:  /home/tjahns/Documents/work/dkrz/build/spack/lib/spack/env/gcc/gcc -DHAVE_C
              ONFIG_H -I. -I./src/include -I./modules/hwloc/include/private/autogen -I./modules/hwloc/includ
              e/hwloc/autogen -I./src/include -I./src/mpi/coll/allreduce_group/ -I./src/mpi/coll/transports/
              gentran -I./src/mpi/coll/transports/stubtran -I./src/mpi/coll/transports/common -I./src/mpi/co
              ll/algorithms/treealgo -I./src/mpi/coll/algorithms/recexchalgo -I./src/mpi/coll/algorithms/stu
              balgo -I./src/mpi/coll/algorithms/common -I./src/mpi/coll/include/ -I./src/mpi/datatype/typere
              p/dataloop -I./src/mpi/datatype -I./src/mpi/spawn -I./src/util -I./src/binding/cxx -I/dev/shm/
              spack_stage/tjahns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/src/bind
              ing/fortran/mpif_h -Isrc/binding/fortran/use_mpi -I/dev/shm/spack_stage/tjahns/spack-stage-mpi
              ch-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/src/binding/fortran/use_mpi_f08/wrappers_c
               -I./src/mpid/include -I./src/mpid/ch4/include -I./src/mpid/ch4/include -I./src/mpid/ch4/src -
              I./src/mpid/ch4/generic/am -I./src/mpid/ch4/netmod/include -I./src/mpid/ch4/shm/include -I./sr
              c/mpid/ch4/shm/posix -I./src/mpid/ch4/shm/src -I./src/mpid/ch4/shm/posix/release_gather -I./sr
              c/mpid/ch4/shm/posix/eager/include -I./src/mpid/ch4/shm/posix/eager/include -I./src/mpid/ch4/s
              hm/ipc/src -I./src/mpid/common/sched -I./src/mpid/common/thread -I./src/mpid/common/timers -I.
              /src/mpid/common/shm -I./src/mpid/common/bc -I./src/mpid/common/genq -I./src/pmi/simple -I./sr
              c/pmi/include -I/usr/include -DNETMOD_INLINE=__netmod_inline_ofi__ -I/dev/shm/spack_stage/tjah
              ns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/src/mpl/include -I/dev/s
              hm/spack_stage/tjahns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/src/m
              pl/include -I/dev/shm/spack_stage/tjahns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisp
              arx/spack-src/modules/yaksa/src/frontend/include -I/dev/shm/spack_stage/tjahns/spack-stage-mpi
              ch-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/modules/yaksa/src/frontend/include -I/dev/
              shm/spack_stage/tjahns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/modu
              les/json-c -I/dev/shm/spack_stage/tjahns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisp
              arx/spack-src/modules/json-c -I/sw/spack/linux-debian9-x86_64/gcc-6.3.0/hwloc/2.5.0-kgkitwa2eb
              d5gruhwckvijowqhorhbek/include -D_REENTRANT -I/dev/shm/spack_stage/tjahns/spack-stage-mpich-3.
              4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/src/mpi/romio/include -fvisibility=hidden -O2 -
              MT src/mpid/ch4/netmod/ofi/lib_libmpi_la-ofi_datatype.lo -MD -MP -MF src/mpid/ch4/netmod/ofi/.
              deps/lib_libmpi_la-ofi_datatype.Tpo -c src/mpid/ch4/netmod/ofi/ofi_datatype.c -o src/mpid/ch4/
              netmod/ofi/lib_libmpi_la-ofi_datatype.o >/dev/null 2>&1

     ...

     10167    libtool: compile:  /home/tjahns/Documents/work/dkrz/build/spack/lib/spack/env/gcc/gcc -DHAVE_C
              ONFIG_H -I. -I./src/include -I./modules/hwloc/include/private/autogen -I./modules/hwloc/includ
              e/hwloc/autogen -I./src/include -I./src/mpi/coll/allreduce_group/ -I./src/mpi/coll/transports/
              gentran -I./src/mpi/coll/transports/stubtran -I./src/mpi/coll/transports/common -I./src/mpi/co
              ll/algorithms/treealgo -I./src/mpi/coll/algorithms/recexchalgo -I./src/mpi/coll/algorithms/stu
              balgo -I./src/mpi/coll/algorithms/common -I./src/mpi/coll/include/ -I./src/mpi/datatype/typere
              p/dataloop -I./src/mpi/datatype -I./src/mpi/spawn -I./src/util -I./src/binding/cxx -I/dev/shm/
              spack_stage/tjahns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/src/bind
              ing/fortran/mpif_h -Isrc/binding/fortran/use_mpi -I/dev/shm/spack_stage/tjahns/spack-stage-mpi
              ch-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/src/binding/fortran/use_mpi_f08/wrappers_c
               -I./src/mpid/include -I./src/mpid/ch4/include -I./src/mpid/ch4/include -I./src/mpid/ch4/src -
              I./src/mpid/ch4/generic/am -I./src/mpid/ch4/netmod/include -I./src/mpid/ch4/shm/include -I./sr
              c/mpid/ch4/shm/posix -I./src/mpid/ch4/shm/src -I./src/mpid/ch4/shm/posix/release_gather -I./sr
              c/mpid/ch4/shm/posix/eager/include -I./src/mpid/ch4/shm/posix/eager/include -I./src/mpid/ch4/s
              hm/ipc/src -I./src/mpid/common/sched -I./src/mpid/common/thread -I./src/mpid/common/timers -I.
              /src/mpid/common/shm -I./src/mpid/common/bc -I./src/mpid/common/genq -I./src/pmi/simple -I./sr
              c/pmi/include -I/usr/include -DNETMOD_INLINE=__netmod_inline_ofi__ -I/dev/shm/spack_stage/tjah
              ns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/src/mpl/include -I/dev/s
              hm/spack_stage/tjahns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/src/m
              pl/include -I/dev/shm/spack_stage/tjahns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisp
              arx/spack-src/modules/yaksa/src/frontend/include -I/dev/shm/spack_stage/tjahns/spack-stage-mpi
              ch-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/modules/yaksa/src/frontend/include -I/dev/
              shm/spack_stage/tjahns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/modu
              les/json-c -I/dev/shm/spack_stage/tjahns/spack-stage-mpich-3.4.1-5kl23iuybtu44gweczlpkobiuyisp
              arx/spack-src/modules/json-c -I/sw/spack/linux-debian9-x86_64/gcc-6.3.0/hwloc/2.5.0-kgkitwa2eb
              d5gruhwckvijowqhorhbek/include -D_REENTRANT -I/dev/shm/spack_stage/tjahns/spack-stage-mpich-3.
              4.1-5kl23iuybtu44gweczlpkobiuyisparx/spack-src/src/mpi/romio/include -fvisibility=hidden -O2 -
              MT src/util/lib_libmpi_la-mpir_cvars.lo -MD -MP -MF src/util/.deps/lib_libmpi_la-mpir_cvars.Tp
              o -c src/util/mpir_cvars.c -o src/util/lib_libmpi_la-mpir_cvars.o >/dev/null 2>&1
     10168    mv -f src/mpid/ch4/src/.deps/lib_libmpi_la-ch4r_rma_target_callbacks.Tpo src/mpid/ch4/src/.dep
              s/lib_libmpi_la-ch4r_rma_target_callbacks.Plo
     10169    mv -f src/mpid/ch4/netmod/ofi/.deps/lib_libmpi_la-ofi_events.Tpo src/mpid/ch4/netmod/ofi/.deps
              /lib_libmpi_la-ofi_events.Plo
     10170    mv -f src/util/.deps/lib_libmpi_la-mpir_cvars.Tpo src/util/.deps/lib_libmpi_la-mpir_cvars.Plo
     10171    make[2]: Leaving directory '/dev/shm/spack_stage/tjahns/spack-stage-mpich-3.4.1-5kl23iuybtu44g
              weczlpkobiuyisparx/spack-src'
     10172    Makefile:43558: recipe for target 'all-recursive' failed
  >> 10173    make[1]: *** [all-recursive] Error 1
     10174    make[1]: Leaving directory '/dev/shm/spack_stage/tjahns/spack-stage-mpich-3.4.1-5kl23iuybtu44g
              weczlpkobiuyisparx/spack-src'
  >> 10175    gmake: *** [all] Error 2
```

### Information on your system

<!-- Please include the output of `spack debug report` -->
* **Spack:** 0.16.2-3198-732180f54e
* **Python:** 3.5.3
* **Platform:** linux-debian9-sandybridge
* **Concretizer:** original

<!-- If you have any relevant configuration detail (custom `packages.yaml` or `modules.yaml`, etc.) you can add that here as well. -->

This is simply an omission: ofi from recent mpich requires symbols only present in libfabric 1.5 and newer.

### Additional information

<!-- Please upload the following files. They should be present in the stage directory of the failing build. Also upload any config.log or similar file if one exists. -->
* [spack-build-out.txt]()
* [spack-build-env.txt]()
I'll retrieve these from the build system if necessary. But I think the error is easy enough to reproduce.

<!-- Some packages have maintainers who have volunteered to debug build failures. Run `spack maintainers <name-of-the-package>` and @mention them here if they exist. -->
@raffenet  @yfguo

### General information

<!-- These boxes can be checked by replacing [ ] with [x] or by clicking them after submitting the issue. -->
- [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
- [ ] 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:
We'll need to raise the minimum libfabric version, I think. Let me double check what's required.
> We'll need to raise the minimum libfabric version, I think. Let me double check what's required.

We need minimum 1.5.0 for MPICH 3.4[.x].

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py
--- a/var/spack/repos/builtin/packages/mpich/package.py
+++ b/var/spack/repos/builtin/packages/mpich/package.py
@@ -198,6 +198,7 @@ class Mpich(AutotoolsPackage, CudaPackage, ROCmPackage):
     # The ch3 ofi netmod results in crashes with libfabric 1.7
     # See https://github.com/pmodels/mpich/issues/3665
     depends_on("libfabric@:1.6", when="device=ch3 netmod=ofi")
+    depends_on("libfabric@1.5:", when="@3.4: device=ch4 netmod=ofi")
 
     depends_on("ucx", when="netmod=ucx")
     depends_on("mxm", when="netmod=mxm")


Test patch: