Repository: spack/spack

Issue:
Installation issue: fftw 3.3.9, pfft-3.3.5.patch cannot be applied
<!-- 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 debug report
* **Spack:** 0.16.1-2051-c43407b128
* **Python:** 3.6.8
* **Platform:** linux-centos8-zen2
* **Concretizer:** original

$ spack install fftw
==> Installing fftw-3.3.9-zdtfijautiahziyciqece2p7yu42j426
==> No binary for fftw-3.3.9-zdtfijautiahziyciqece2p7yu42j426 found: installing from source
==> Warning: included configuration files should be updated manually [files=./config/]
2 out of 3 hunks FAILED -- saving rejects to file mpi/transpose-pairwise.c.rej
==> Using cached archive: /var/lib/localadmin/spack/cache/_source-cache/archive/bf/bf2c7ce40b04ae811af714deb512510cc2c17b9ab9d6ddcf49fe4487eea7af3d.tar.gz
==> Patch /var/lib/localadmin/stack/stack.v0.16.x/spack/var/spack/repos/builtin/packages/fftw/pfft-3.3.5.patch failed.
==> Error: ProcessError: Command exited with status 1:
    '/usr/bin/patch' '-s' '-p' '0' '-i' '/var/lib/localadmin/stack/stack.v0.16.x/spack/var/spack/repos/builtin/packages/fftw/pfft-3.3.5.patch' '-d' '.'
```

### Information on your system

<!-- Please include the output of `spack debug report` -->

<!-- If you have any relevant configuration detail (custom `packages.yaml` or `modules.yaml`, etc.) you can add that here as well. -->

### 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. -->

<!-- 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. -->

### 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:

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/fftw/package.py b/var/spack/repos/builtin/packages/fftw/package.py
--- a/var/spack/repos/builtin/packages/fftw/package.py
+++ b/var/spack/repos/builtin/packages/fftw/package.py
@@ -226,7 +226,8 @@ class Fftw(FftwBase):
     provides('fftw-api@2', when='@2.1.5')
     provides('fftw-api@3', when='@3:')
 
-    patch('pfft-3.3.5.patch', when="@3.3.5:+pfft_patches", level=0)
+    patch('pfft-3.3.9.patch', when="@3.3.9:+pfft_patches", level=0)
+    patch('pfft-3.3.5.patch', when="@3.3.5:3.3.8+pfft_patches", level=0)
     patch('pfft-3.3.4.patch', when="@3.3.4+pfft_patches", level=0)
     patch('pgi-3.3.6-pl2.patch', when="@3.3.6-pl2%pgi", level=0)
     patch('intel-configure.patch', when="@3:3.3.8%intel", level=0)


Test patch: