Repository: spack/spack

Issue:
phist@1.9.3 build fails for power9le: -march=native not recognized
`phist@1.9.3` fails to build optimized for `power9le` using `spack@develop` (d978d72e19574dc46dce84704349b716469babe2 from `Fri Apr 2 16:56:16 2021 +0200`)

Concrete spec: [phist.spec.yaml.txt](https://github.com/spack/spack/files/6250511/phist.spec.yaml.txt)
Full build log: [phist-build-out.txt](https://github.com/spack/spack/files/6250471/phist-build-out.txt)

```
$> spack install -f ./phist.spec.yaml
...
==> Installing phist-1.9.3-jxrqv52bq6ybd3j7rykmcoh25x4b57vi
==> Fetching https://spack-llnl-mirror.s3-us-west-2.amazonaws.com/_source-cache/archive/3a/3ab7157e9f535a4c8537846cb11b516271ef13f82d0f8ebb7f96626fb9ab86cf.tar.gz
######################################################################################################################################################################### 100.0%
==> Applied patch /opt/spack/var/spack/repos/builtin/packages/phist/sbang.patch
==> phist: Executing phase: 'cmake'
==> phist: Executing phase: 'build'
==> Error: ProcessError: Command exited with status 2:
    'make' '-j32'
...
  >> 421    gfortran: error: unrecognized command line option '-march=native'; did you mean '-mcpu=native'?
  >> 422    make[2]: *** [fortran_bindings/CMakeFiles/phist_fort.dir/build.make:760: fortran_bindings/CMakeFiles/phist_fort.dir/phist_types.F90.o] Error 1
     423    make[2]: *** Waiting for unfinished jobs....
  >> 424    gfortran: error: unrecognized command line option '-march=native'; did you mean '-mcpu=native'?
  >> 425    make[2]: *** [fortran_bindings/CMakeFiles/phist_fort.dir/build.make:773: fortran_bindings/CMakeFiles/phist_fort.dir/phist_testing.F90.o] Error 1
     426    make[2]: Leaving directory '/tmp/root/spack-stage/spack-stage-phist-1.9.3-jxrqv52bq6ybd3j7rykmcoh25x4b57vi/spack-build-jxrqv52'
  >> 427    make[1]: *** [CMakeFiles/Makefile2:3182: fortran_bindings/CMakeFiles/phist_fort.dir/all] Error 2
     428    make[1]: Leaving directory '/tmp/root/spack-stage/spack-stage-phist-1.9.3-jxrqv52bq6ybd3j7rykmcoh25x4b57vi/spack-build-jxrqv52'
     429    make: *** [Makefile:185: all] Error 2

See build log for details:
  /tmp/root/spack-stage/spack-stage-phist-1.9.3-jxrqv52bq6ybd3j7rykmcoh25x4b57vi/spack-build-out.txt
```

This was in an `Ubuntu 20.04 w/ GCC 9.3.0` environment, but I observe the same in `RHEL 7.6 w/ GCC 9.3.0`.

@jthies 





Discussion:
a curious error since you're using gcc/gfortran and they both have "-march" and "-mcpu" according to the --help option, and using -mcpu is discouraged in favor of -mtune. Seems odd that I have to check the CPU vendor before setting the -march/cpu=native option?
I'm pretty sure you can't use march=native on power-- you have to use -mcpu. At least this is what I have to do when building optimized tensorflow binaries for power w gcc
Hi Eugene,

I pushed a better way to determine this flag (via cmake feature tests) to the phist devel branch, if you could try it (by installing phist@develop via spack) it would be great because I don't have an IBM system at hand. If it solves the problem I will add a patch to spack for the previous releases.

Jonas
> I pushed a better way to determine this flag (via cmake feature tests) to the phist devel branch, if you could try it (by installing phist@develop via spack) it would be great

Sorry for the late response! I missed your reply earlier. Thank you for pushing a fix. I tried the build again, for `power9le`, this morning. I used `phist@develop` and it failed during the cmake stage with the error below.

Using `spack@develop` (0d73fd2b117c61d8c4d36e7b3ad8a46c837649be from `Sat Jun 12 07:44:51 2021 -0400`)

Full concrete spec: [phist.spec.yaml.txt](https://github.com/spack/spack/files/6642812/phist.spec.yaml.txt)
Full build log: [phist-build-out.txt](https://github.com/spack/spack/files/6642813/phist-build-out.txt)

```
$> git clone https://github.com/spack/spack
$> (cd spack && git checkout 0d73fd2b117c61d8c4d36e7b3ad8a46c837649be)
$> spack install -f ./phist.spec.yaml
...
==> Installing phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm
==> No binary for phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm found: installing from source
==> Applied patch /spack/var/spack/repos/builtin/packages/phist/sbang.patch
==> phist: Executing phase: 'cmake'
==> phist: Executing phase: 'build'
==> Error: ProcessError: Command exited with status 2:
    'make' '-j16'

5 errors found in build log:
     1127    [ 34%] Building Fortran object CMakeFiles/phist_kernels_builtin.dir/src/kernels/builtin/axpy_kernels.F90.o
     1128    /spack/lib/spack/env/gcc/g++ -Dphist_kernels_builtin_EXPORTS -I/spack/opt/spack/linux-ubuntu20.04-power9le/gcc-9.3.0/openblas-
             0.3.10-z7xr3bw5zoy5aigm6j66qt7bb2uh5sov/include -I/spack/opt/spack/linux-ubuntu20.04-power9le/gcc-9.3.0/mpich-3.4.1-wdqkjfaohv
             p4qukb4g7zpskkirsocsyp/include -I/tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-src/dr
             ivers/matfuncs -I/tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-src/drivers/matfuncs/s
             camac -I/tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-build-xcpdp4s/drivers/matfuncs/
             scamac -I/tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-build-xcpdp4s -I/tmp/root/spac
             k-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-src/src/kernels -I/tmp/root/spack-stage/spack-stage-p
             hist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-src/src/kernels/builtin -I/tmp/root/spack-stage/spack-stage-phist-develop-
             xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-src/src/kernels/trilinos_interface -I/tmp/root/spack-stage/spack-stage-phist-develop-xc
             pdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-src/src/tools -I/tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox
             6pmxcpm/spack-src/src/core -I/tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-src/src/kr
             ylov -I/tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-src/src/jada -I/tmp/root/spack-s
             tage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-src/src/precon -I/tmp/root/spack-stage/spack-stage-phist
             -develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-src/drivers -I/tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrj
             cegtz2iox6pmxcpm/spack-build-xcpdp4s/cxx_bindings -I/tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6
             pmxcpm/spack-src/lib/googletest-master-12-2015 -I/tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmx
             cpm/spack-src/src -fopenmp -O3 -fno-math-errno -ffinite-math-only -fno-signed-zeros -fno-trapping-math     -g -fPIC -std=gnu++
             11 -MD -MT CMakeFiles/phist_kernels_builtin.dir/src/kernels/builtin/colpack.cpp.o -MF CMakeFiles/phist_kernels_builtin.dir/src
             /kernels/builtin/colpack.cpp.o.d -o CMakeFiles/phist_kernels_builtin.dir/src/kernels/builtin/colpack.cpp.o -c /tmp/root/spack-
             stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-src/src/kernels/builtin/colpack.cpp
     1129    /spack/lib/spack/env/gcc/gfortran -Dphist_kernels_builtin_EXPORTS -I/spack/opt/spack/linux-ubuntu20.04-power9le/gcc-9.3.0/open
             blas-0.3.10-z7xr3bw5zoy5aigm6j66qt7bb2uh5sov/include -I/spack/opt/spack/linux-ubuntu20.04-power9le/gcc-9.3.0/mpich-3.4.1-wdqkj
             faohvp4qukb4g7zpskkirsocsyp/include -I/tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-s
             rc/drivers/matfuncs -I/tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-src/drivers/matfu
             ncs/scamac -I/tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-build-xcpdp4s/drivers/matf
             uncs/scamac -I/tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-build-xcpdp4s -I/tmp/root
             /spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-src/src/kernels -I/tmp/root/spack-stage/spack-st
             age-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-src/src/kernels/builtin -I/tmp/root/spack-stage/spack-stage-phist-dev
             elop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-src/src/kernels/trilinos_interface -I/tmp/root/spack-stage/spack-stage-phist-devel
             op-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-src/src/tools -I/tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegt
             z2iox6pmxcpm/spack-src/src/core -I/tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-src/s
             rc/krylov -I/tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-src/src/jada -I/tmp/root/sp
             ack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-src/src/precon -I/tmp/root/spack-stage/spack-stage-
             phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-src/drivers -I/tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfn
             kiwrjcegtz2iox6pmxcpm/spack-build-xcpdp4s/cxx_bindings -I/tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz
             2iox6pmxcpm/spack-src/lib/googletest-master-12-2015 -I/tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2io
             x6pmxcpm/spack-src/src -ffree-line-length-none  -fopenmp -O3 -fno-math-errno -ffinite-math-only -fno-signed-zeros -fno-trappin
             g-math -g -fPIC -c /tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-src/src/kernels/buil
             tin/axpy_kernels.F90 -o CMakeFiles/phist_kernels_builtin.dir/src/kernels/builtin/axpy_kernels.F90.o
     1130    [ 34%] Building C object CMakeFiles/phist_kernels_builtin.dir/src/kernels/builtin/axpy_kernels_nt.c.o
     1131    /spack/lib/spack/env/gcc/gcc -Dphist_kernels_builtin_EXPORTS -I/spack/opt/spack/linux-ubuntu20.04-power9le/gcc-9.3.0/openblas-
             0.3.10-z7xr3bw5zoy5aigm6j66qt7bb2uh5sov/include -I/spack/opt/spack/linux-ubuntu20.04-power9le/gcc-9.3.0/mpich-3.4.1-wdqkjfaohv
             p4qukb4g7zpskkirsocsyp/include -I/tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-src/dr
             ivers/matfuncs -I/tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-src/drivers/matfuncs/s
             camac -I/tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-build-xcpdp4s/drivers/matfuncs/
             scamac -I/tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-build-xcpdp4s -I/tmp/root/spac
             k-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-src/src/kernels -I/tmp/root/spack-stage/spack-stage-p
             hist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-src/src/kernels/builtin -I/tmp/root/spack-stage/spack-stage-phist-develop-
             xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-src/src/kernels/trilinos_interface -I/tmp/root/spack-stage/spack-stage-phist-develop-xc
             pdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-src/src/tools -I/tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox
             6pmxcpm/spack-src/src/core -I/tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-src/src/kr
             ylov -I/tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-src/src/jada -I/tmp/root/spack-s
             tage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-src/src/precon -I/tmp/root/spack-stage/spack-stage-phist
             -develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-src/drivers -I/tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrj
             cegtz2iox6pmxcpm/spack-build-xcpdp4s/cxx_bindings -I/tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6
             pmxcpm/spack-src/lib/googletest-master-12-2015 -I/tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmx
             cpm/spack-src/src -fopenmp -O3 -fno-math-errno -ffinite-math-only -fno-signed-zeros -fno-trapping-math       -g -fPIC -std=gnu
             99 -MD -MT CMakeFiles/phist_kernels_builtin.dir/src/kernels/builtin/axpy_kernels_nt.c.o -MF CMakeFiles/phist_kernels_builtin.d
             ir/src/kernels/builtin/axpy_kernels_nt.c.o.d -o CMakeFiles/phist_kernels_builtin.dir/src/kernels/builtin/axpy_kernels_nt.c.o -
             c /tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-src/src/kernels/builtin/axpy_kernels_
             nt.c
     1132    In file included from /tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-src/src/kernels/b
             uiltin/axpy_kernels_nt.c:22:
  >> 1133    /usr/lib/gcc/powerpc64le-linux-gnu/9/include/emmintrin.h:56:2: error: #error "Please read comment above.  Use -DNO_WARN_X86_IN
             TRINSICS to disable this error."
     1134       56 | #error "Please read comment above.  Use -DNO_WARN_X86_INTRINSICS to disable this error."
     1135          |  ^~~~~
     1136    In file included from /usr/lib/gcc/powerpc64le-linux-gnu/9/include/emmintrin.h:66,
     1137                     from /tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-src/src/kernels/b
             uiltin/axpy_kernels_nt.c:22:
  >> 1138    /usr/lib/gcc/powerpc64le-linux-gnu/9/include/xmmintrin.h:54:2: error: #error "Please read comment above.  Use -DNO_WARN_X86_IN
             TRINSICS to disable this error."
     1139       54 | #error "Please read comment above.  Use -DNO_WARN_X86_INTRINSICS to disable this error."
     1140          |  ^~~~~
     1141    In file included from /usr/lib/gcc/powerpc64le-linux-gnu/9/include/xmmintrin.h:79,
     1142                     from /usr/lib/gcc/powerpc64le-linux-gnu/9/include/emmintrin.h:66,
     1143                     from /tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-src/src/kernels/b
             uiltin/axpy_kernels_nt.c:22:
  >> 1144    /usr/lib/gcc/powerpc64le-linux-gnu/9/include/mmintrin.h:52:2: error: #error "Please read comment above.  Use -DNO_WARN_X86_INT
             RINSICS to disable this error."
     1145       52 | #error "Please read comment above.  Use -DNO_WARN_X86_INTRINSICS to disable this error."
     1146          |  ^~~~~
     1147    [ 34%] Building Fortran object CMakeFiles/phist_kernels_builtin.dir/src/kernels/builtin/gather_scatter_kernels.F90.o
     1148    /spack/lib/spack/env/gcc/gfortran -Dphist_kernels_builtin_EXPORTS -I/spack/opt/spack/linux-ubuntu20.04-power9le/gcc-9.3.0/open
             blas-0.3.10-z7xr3bw5zoy5aigm6j66qt7bb2uh5sov/include -I/spack/opt/spack/linux-ubuntu20.04-power9le/gcc-9.3.0/mpich-3.4.1-wdqkj
             faohvp4qukb4g7zpskkirsocsyp/include -I/tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-s
             rc/drivers/matfuncs -I/tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-src/drivers/matfu
             ncs/scamac -I/tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-build-xcpdp4s/drivers/matf
             uncs/scamac -I/tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-build-xcpdp4s -I/tmp/root
             /spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-src/src/kernels -I/tmp/root/spack-stage/spack-st
             age-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-src/src/kernels/builtin -I/tmp/root/spack-stage/spack-stage-phist-dev
             elop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-src/src/kernels/trilinos_interface -I/tmp/root/spack-stage/spack-stage-phist-devel
             op-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-src/src/tools -I/tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegt
             z2iox6pmxcpm/spack-src/src/core -I/tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-src/s
             rc/krylov -I/tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-src/src/jada -I/tmp/root/sp
             ack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-src/src/precon -I/tmp/root/spack-stage/spack-stage-
             phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-src/drivers -I/tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfn
             kiwrjcegtz2iox6pmxcpm/spack-build-xcpdp4s/cxx_bindings -I/tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz
             2iox6pmxcpm/spack-src/lib/googletest-master-12-2015 -I/tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2io
             x6pmxcpm/spack-src/src -ffree-line-length-none  -fopenmp -O3 -fno-math-errno -ffinite-math-only -fno-signed-zeros -fno-trappin
             g-math -g -fPIC -c /tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-src/src/kernels/buil
             tin/gather_scatter_kernels.F90 -o CMakeFiles/phist_kernels_builtin.dir/src/kernels/builtin/gather_scatter_kernels.F90.o
     1149    In file included from /usr/include/string.h:495,
     1150                     from /tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-src/src/kernels/p
             hist_driver_utils.c:9:

     ...

     1156    In file included from /tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-src/src/tools/phi
             st_gen_all.h:9,
     1157                     from /tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-src/src/kernels/p
             hist_driver_utils.c:58:
     1158    /tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-src/src/kernels/phist_driver_utils_def.
             h: In function 'phist_Dcreate_matrix':
     1159    /tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-src/src/kernels/phist_driver_utils_def.
             h:442:13: note: length computed here
     1160      442 |     int len=strlen(problem+pos);
     1161          |             ^~~~~~~~~~~~~~~~~~~
  >> 1162    make[2]: *** [CMakeFiles/phist_kernels_builtin.dir/build.make:292: CMakeFiles/phist_kernels_builtin.dir/src/kernels/builtin/ax
             py_kernels_nt.c.o] Error 1
     1163    make[2]: *** Waiting for unfinished jobs....
     1164    make[2]: Leaving directory '/tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-build-xcpdp
             4s'
  >> 1165    make[1]: *** [CMakeFiles/Makefile2:805: CMakeFiles/phist_kernels_builtin.dir/all] Error 2
     1166    make[1]: Leaving directory '/tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-build-xcpdp
             4s'
     1167    make: *** [Makefile:169: all] Error 2

See build log for details:
  /tmp/root/spack-stage/spack-stage-phist-develop-xcpdp4sshfnkiwrjcegtz2iox6pmxcpm/spack-build-out.txt
```





Resolving patch:
diff --git a/var/spack/repos/builtin/packages/phist/package.py b/var/spack/repos/builtin/packages/phist/package.py
--- a/var/spack/repos/builtin/packages/phist/package.py
+++ b/var/spack/repos/builtin/packages/phist/package.py
@@ -103,8 +103,10 @@ class Phist(CMakePackage):
 
     # ###################### Patches ##########################
 
+    # resolve #22758: while SSE instructions are handled correctly, but a compile-time
+    # error will occur unless -DNO_WARN_X86_INTRINSICS is defined.
+    patch('ppc64_sse.patch', when='@1.7.4:1.9.4')
     patch('update_tpetra_gotypes.patch', when='@:1.8')
-
     patch('sbang.patch', when='+fortran')
 
     # ###################### Dependencies ##########################


Test patch: