Repository: spack/spack

Issue:
Trilinos build fails on Power8/9 nodes with XL compilers
## Summary

On either Power8+ or Power 9 nodes:
`spack install trilinos % xl@13.1 ^netlib-lapack`

fails with errors like
`  >> 1864  /projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-7vhcchc4al4fi5kig73qojgub7jtaqu7/Trilinos-trilinos-release-12-12-1/packages/tpetra/core/src/Tpetra_Details_libGemm.cpp:148:3: error: no matching function for call to 'dgemm'
`

### Expected Result

Successful Trilinos build.

### Actual Result

Trilinos crashes in the build phase at 35% complete.

```
==> Building trilinos [CMakePackage]
==> Executing phase: 'cmake'
==> Executing phase: 'build'
==> Error: ProcessError: Command exited with status 2:
    'make'

6 errors found in build log:
     [ ... ]
     1864  [ 35%] Building CXX object packages/tpetra/core/src/CMakeFiles/tpetra.dir/Tpetra_Details_iallreduce.cpp.o
     1865  cd /tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/tpetra/core/src && /projects/opt/ppc64le/openmpi/2.1.0-gcc_7.1.0/bin/mpic++  -Dtpetra_EXPORTS -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/core/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/core/src/kokkos_refactor -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/tpetra/core/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/tsqr/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/tpetra/tsqr/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/classic/LinAlg -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/classic/NodeAPI -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/tpetra/classic/NodeAPI -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/tpetra/classic/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/classic/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/teuchos/kokkoscomm/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/teuchos/kokkoscomm/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/teuchos/kokkoscompat/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/teuchos/kokkoscompat/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/teuchos/parameterlist/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/teuchos/core/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/teuchos/core/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/kokkos/core/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/kokkos/core/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/teuchos/comm/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/teuchos/remainder/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/teuchos/remainder/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/teuchos/numerics/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/epetra/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/epetra/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/kokkos-kernels/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/kokkos-kernels/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/kokkos-kernels/src/impl -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/kokkos-kernels/src/stage/graph -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/kokkos-kernels/src/stage/graph/impl -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/kokkos-kernels/src/stage/graph/utils -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/kokkos/algorithms/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/kokkos/algorithms/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/kokkos/containers/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/kokkos/containers/src  -std=c++11 -O2 -g -DNDEBUG -fPIC   -o CMakeFiles/tpetra.dir/Tpetra_Details_iallreduce.cpp.o -c /projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/core/src/Tpetra_Details_iallreduce.cpp
     1866  [ 35%] Building CXX object packages/tpetra/core/src/CMakeFiles/tpetra.dir/Tpetra_Details_isInterComm.cpp.o
     1867  cd /tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/tpetra/core/src && /projects/opt/ppc64le/openmpi/2.1.0-gcc_7.1.0/bin/mpic++  -Dtpetra_EXPORTS -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/core/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/core/src/kokkos_refactor -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/tpetra/core/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/tsqr/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/tpetra/tsqr/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/classic/LinAlg -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/classic/NodeAPI -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/tpetra/classic/NodeAPI -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/tpetra/classic/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/classic/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/teuchos/kokkoscomm/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/teuchos/kokkoscomm/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/teuchos/kokkoscompat/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/teuchos/kokkoscompat/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/teuchos/parameterlist/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/teuchos/core/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/teuchos/core/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/kokkos/core/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/kokkos/core/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/teuchos/comm/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/teuchos/remainder/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/teuchos/remainder/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/teuchos/numerics/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/epetra/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/epetra/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/kokkos-kernels/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/kokkos-kernels/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/kokkos-kernels/src/impl -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/kokkos-kernels/src/stage/graph -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/kokkos-kernels/src/stage/graph/impl -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/kokkos-kernels/src/stage/graph/utils -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/kokkos/algorithms/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/kokkos/algorithms/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/kokkos/containers/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/kokkos/containers/src  -std=c++11 -O2 -g -DNDEBUG -fPIC   -o CMakeFiles/tpetra.dir/Tpetra_Details_isInterComm.cpp.o -c /projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/core/src/Tpetra_Details_isInterComm.cpp
     1868  [ 35%] Building CXX object packages/tpetra/core/src/CMakeFiles/tpetra.dir/Tpetra_Details_libGemm.cpp.o
     1869  cd /tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/tpetra/core/src && /projects/opt/ppc64le/openmpi/2.1.0-gcc_7.1.0/bin/mpic++  -Dtpetra_EXPORTS -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/core/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/core/src/kokkos_refactor -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/tpetra/core/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/tsqr/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/tpetra/tsqr/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/classic/LinAlg -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/classic/NodeAPI -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/tpetra/classic/NodeAPI -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/tpetra/classic/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/classic/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/teuchos/kokkoscomm/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/teuchos/kokkoscomm/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/teuchos/kokkoscompat/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/teuchos/kokkoscompat/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/teuchos/parameterlist/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/teuchos/core/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/teuchos/core/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/kokkos/core/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/kokkos/core/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/teuchos/comm/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/teuchos/remainder/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/teuchos/remainder/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/teuchos/numerics/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/epetra/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/epetra/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/kokkos-kernels/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/kokkos-kernels/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/kokkos-kernels/src/impl -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/kokkos-kernels/src/stage/graph -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/kokkos-kernels/src/stage/graph/impl -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/kokkos-kernels/src/stage/graph/utils -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/kokkos/algorithms/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/kokkos/algorithms/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/kokkos/containers/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/kokkos/containers/src  -std=c++11 -O2 -g -DNDEBUG -fPIC   -o CMakeFiles/tpetra.dir/Tpetra_Details_libGemm.cpp.o -c /projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/core/src/Tpetra_Details_libGemm.cpp
  >> 1870  /projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/core/src/Tpetra_Details_libGemm.cpp:148:3: error: no matching function for call to 'dgemm'
     1871    TPETRACORE_DGEMM (&transA, &transB, &m, &n, &k, &alpha, A, &lda, B, &ldb, &beta, C, &ldc);
     1872    ^~~~~~~~~~~~~~~~
     1873  /projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/core/src/Tpetra_Details_libGemm.cpp:70:53: note: expanded from macro 'TPETRACORE_DGEMM'
     1874  #define TPETRACORE_DGEMM TPETRACORE_F77_BLAS_MANGLE(dgemm,DGEMM)
     1875                                                      ^~~~~
     1876  /tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/tpetra/core/src/TpetraCore_config.h:171:49: note: expanded from macro 'TPETRACORE_F77_BLAS_MANGLE'
     1877  #  define TPETRACORE_F77_BLAS_MANGLE(name,NAME) name
     1878                                                  ^~~~
     1879  /projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/core/src/Tpetra_Details_libGemm.cpp:134:1: note: candidate function not viable: no known conversion from 'const char *' to 'const char' for 1st argument; remove &
     1880  dgemm (const char transA,
     1881  ^
  >> 1882  /projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/core/src/Tpetra_Details_libGemm.cpp:166:3: error: no matching function for call to 'sgemm'
     1883    TPETRACORE_SGEMM (&transA, &transB, &m, &n, &k, &alpha, A, &lda, B, &ldb, &beta, C, &ldc);
     1884    ^~~~~~~~~~~~~~~~
     1885  /projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/core/src/Tpetra_Details_libGemm.cpp:80:53: note: expanded from macro 'TPETRACORE_SGEMM'
     1886  #define TPETRACORE_SGEMM TPETRACORE_F77_BLAS_MANGLE(sgemm,SGEMM)
     1887                                                      ^~~~~
     1888  /tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/tpetra/core/src/TpetraCore_config.h:171:49: note: expanded from macro 'TPETRACORE_F77_BLAS_MANGLE'
     1889  #  define TPETRACORE_F77_BLAS_MANGLE(name,NAME) name
     1890                                                  ^~~~
     1891  /projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/core/src/Tpetra_Details_libGemm.cpp:152:1: note: candidate function not viable: no known conversion from 'const char *' to 'const char' for 1st argument; remove &
     1892  sgemm (const char transA,
     1893  ^
     1894  2 errors generated.
  >> 1895  Error while processing /projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/core/src/Tpetra_Details_libGemm.cpp.
  >> 1896  make[2]: *** [packages/tpetra/core/src/CMakeFiles/tpetra.dir/Tpetra_Details_libGemm.cpp.o] Error 1
     1897  make[2]: Leaving directory `/ram/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build'
  >> 1898  make[1]: *** [packages/tpetra/core/src/CMakeFiles/tpetra.dir/all] Error 2
     1899  make[1]: Leaving directory `/ram/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build'
  >> 1900  make: *** [all] Error 2

```

### Steps to reproduce the issue

```console
$ spack install trilinos % xl@13.1 ^netlib-lapack
...
```

### Information on your system
```
dantopa@cn2021:spack.power9-0.11.1 $ uname -a
Linux cn2021 4.11.0-44.4.1.el7a.ppc64le #1 SMP Sat Dec 9 02:17:51 EST 2017 ppc64le ppc64le ppc64le GNU/Linux

 dantopa@darwin-fe1.lanl.gov:~ $ squeue -u dantopa
            JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)
           3380178   power8+     bash  dantopa  R       0:08      1 cn2001
           3380177    power9     bash  dantopa  R       0:22      1 cn2021
```
Trilinos flavor
```
  trilinos:
    variants: +nox~boost~exodus~gtest~hypre~muelu~mumps~sacado~suite-sparse
    buildable: true
    paths: {}
    providers: {}
    modules: {}
    version: []
    compiler: []
```
log files from `spack -d install`
[spack-cc-trilinos-7vhcchc.in.log](https://github.com/spack/spack/files/1729062/spack-cc-trilinos-7vhcchc.in.log)
[spack-cc-trilinos-7vhcchc.out.log](https://github.com/spack/spack/files/1729063/spack-cc-trilinos-7vhcchc.out.log)

`spack-build.*`
[spack-build.env.txt](https://github.com/spack/spack/files/1729068/spack-build.env.txt)
[spack-build.out.txt](https://github.com/spack/spack/files/1729069/spack-build.out.txt)

`*.yaml`
[compilers.yaml.txt](https://github.com/spack/spack/files/1729080/compilers.yaml.txt)
[config.yaml.txt](https://github.com/spack/spack/files/1729082/config.yaml.txt)
[modules.yaml.txt](https://github.com/spack/spack/files/1729083/modules.yaml.txt)
[packages.yaml.txt](https://github.com/spack/spack/files/1729084/packages.yaml.txt)

-----

https://darwin.lanl.gov/projects/darwin/wiki


Discussion:
please try reporting this at trilinos mailing list https://trilinos.org/community/mail-lists/ This does not look Spack specific, but would certainly be good to fix 👍 
Thanks for the URL. Bug report submitted. 
so what was the fix?

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py
--- a/var/spack/repos/builtin/packages/trilinos/package.py
+++ b/var/spack/repos/builtin/packages/trilinos/package.py
@@ -251,8 +251,10 @@ class Trilinos(CMakePackage):
     depends_on('swig', when='+python')
 
     patch('umfpack_from_suitesparse.patch', when='@11.14.1:12.8.1')
-    patch('xlf_seacas.patch', when='@12.10.1%xl')
-    patch('xlf_seacas.patch', when='@12.10.1%xl_r')
+    patch('xlf_seacas.patch', when='@12.10.1:%xl')
+    patch('xlf_seacas.patch', when='@12.10.1:%xl_r')
+    patch('xlf_tpetra.patch', when='@12.12.1:%xl')
+    patch('xlf_tpetra.patch', when='@12.12.1:%xl_r')
 
     def url_for_version(self, version):
         url = "https://github.com/trilinos/Trilinos/archive/trilinos-release-{0}.tar.gz"


Test patch: