Repository: spack/spack

Issue:
Installation issue: fails to build abinit due to FFT library errrors
### Steps to reproduce the issue

```console
$ spack spec abinit %gcc@8.3.0
Input spec
--------------------------------
abinit%gcc@8.3.0

Concretized
--------------------------------
abinit@8.10.3%gcc@8.3.0~hdf5~mpi+openmp~scalapack arch=linux-centos7-skylake_avx512
    ^fftw@3.3.8%gcc@8.3.0~mpi+openmp~pfft_patches precision=float arch=linux-centos7-skylake_avx512
    ^libxc@2.2.2%gcc@8.3.0 arch=linux-centos7-skylake_avx512
    ^openblas@0.3.7%gcc@8.3.0+avx2+avx512 cpu_target=auto ~ilp64+pic+shared threads=openmp ~virtual_machine arch=linux-centos7-skylake_avx512
$ spack install abinit %gcc@8.3.0
...
==> Fetching http://spack.pi.sjtu.edu.cn/mirror/abinit/abinit-8.10.3.tar.gz
######################################################################## 100.0%
==> Staging archive: /tmp/hpc-jianwen/spack-stage-abinit-8.10.3-dkc2snr6flq7svfuifayqvkzgmqeort2/abinit-8.10.3.tar.gz
==> Created stage in /tmp/hpc-jianwen/spack-stage-abinit-8.10.3-dkc2snr6flq7svfuifayqvkzgmqeort2
==> No patches needed for abinit
==> Building abinit [AutotoolsPackage]
==> Executing phase: 'autoreconf'
==> Executing phase: 'configure'
==> Error: ProcessError: Command exited with status 1:
    '/tmp/hpc-jianwen/spack-stage-abinit-8.10.3-dkc2snr6flq7svfuifayqvkzgmqeort2/spack-src/configure' '--prefix=/lustre/home/acct-hpc/hpc-jianwen/opt/cascadelake/linux-centos7-skylake_avx512/gcc-8.3.0/abinit-8.10.3-dkc2snr6flq7svfuifayqvkzgmqeort2' '--enable-openmp=yes' '--with-linalg-flavor=custom' '--with-linalg-libs=-L/lustre/home/acct-hpc/hpc-jianwen/opt/cascadelake/linux-centos7-skylake_avx512/gcc-8.3.0/openblas-0.3.7-paog42mpv4e5re4aypej77asddpq2ra7/lib -lopenblas' '--with-fft-flavor=fftw3-threads' '--with-fft-incs=-I/lustre/home/acct-hpc/hpc-jianwen/opt/cascadelake/linux-centos7-skylake_avx512/gcc-8.3.0/fftw-3.3.8-5lzzx4jvxvpus3zpc3pr3dazrhkrheb2/include' '--with-fft-libs=-L/lustre/home/acct-hpc/hpc-jianwen/opt/cascadelake/linux-centos7-skylake_avx512/gcc-8.3.0/fftw-3.3.8-5lzzx4jvxvpus3zpc3pr3dazrhkrheb2/lib -lfftw3_omp -lfftw3 -lfftw3f' '--with-dft-flavor=atompaw+libxc' 'with_libxc_incs=-I/lustre/home/acct-hpc/hpc-jianwen/opt/cascadelake/linux-centos7-skylake_avx512/gcc-8.3.0/libxc-2.2.2-7dys7gfyvqopin2uzeazbuo2eqwbzytq/include' 'with_libxc_libs=-L/lustre/home/acct-hpc/hpc-jianwen/opt/cascadelake/linux-centos7-skylake_avx512/gcc-8.3.0/libxc-2.2.2-7dys7gfyvqopin2uzeazbuo2eqwbzytq/lib -lxcf90 -lxc -lm' '--with-trio-flavor=none'

1 error found in build log:
     358            | configure; please see the section associated to              |
     359            | connectors in ~abinit/doc/build/config-template.ac for       |
     360            | details.                                                     |
     361            |                                                              |
     362            +--------------------------------------------------------------+
     363
  >> 364    configure: error: the specified FFT libraries do not work

See build log for details:
  /tmp/hpc-jianwen/spack-stage-abinit-8.10.3-dkc2snr6flq7svfuifayqvkzgmqeort2/spack-build-out.txt
```

### Platform and user environment

Please report your OS here:
```commandline
$ uname -a 
Linux 3.10.0-862.el7.x86_64 #1 SMP Fri Apr 20 16:44:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
$ lsb_release -d
Description:    CentOS Linux release 7.5.1804 (Core)
``` 




Discussion:
A workaround is to specify `precision=float,double` for `fftw`:

```console
$ spack install abinit %gcc@8.3.0 ^fftw precision=float,double
```

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/abinit/package.py b/var/spack/repos/builtin/packages/abinit/package.py
--- a/var/spack/repos/builtin/packages/abinit/package.py
+++ b/var/spack/repos/builtin/packages/abinit/package.py
@@ -71,7 +71,7 @@ class Abinit(AutotoolsPackage):
     # depends_on('elpa~openmp', when='+elpa+mpi~openmp')
     # depends_on('elpa+openmp', when='+elpa+mpi+openmp')
 
-    depends_on('fftw precision=float')
+    depends_on('fftw precision=float,double')
     depends_on('fftw~openmp', when='~openmp')
     depends_on('fftw+openmp', when='+openmp')
 


Test patch: