Repository: spack/spack

Issue:
Installation issue: automake@1.16.3
<!-- 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 automake@1.16.3%intel@19.0.4.243 arch=linux-rhel7-broadwell
...
2 errors found in build log:
     100      GEN      bin/aclocal-1.16
     101      GEN      doc/aclocal-1.16.1
     102      GEN      bin/automake-1.16
     103      GEN      doc/automake-1.16.1
     104    help2man: can't get `--help' info from aclocal-1.16
     105    Try `--no-discard-stderr' if option outputs to stderr
  >> 106    make: *** [doc/aclocal-1.16.1] Error 126
     107    make: *** Waiting for unfinished jobs....
     108    help2man: can't get `--help' info from automake-1.16
     109    Try `--no-discard-stderr' if option outputs to stderr
  >> 110    make: *** [doc/automake-1.16.1] Error 126
```

### Information on your system

<!-- Please include the output of `spack debug report` -->
* **Spack:** 0.16.0-281-a879c875d
* **Python:** 3.6.3
* **Platform:** linux-rhel7-broadwell
* **Concretizer:** original

<!-- If you have any relevant configuration detail (custom `packages.yaml` or `modules.yaml`, etc.) you can add that here as well. -->

### Additional information

This was found during a build of paraview%intel, but I will test with gcc too. automake@1.16.2 builds fine. I can provide more information if needed. Just wanted to get this up before I forget about it. 

<!-- 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]() -->

<!-- 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 
Doesn't look like there are maintainers listed.
- [ ] 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:
I get the same error with `gcc@7.4.0`
I just started hitting this today as well
Same here.
I have got the same error

 I am currently seeing it and this prevents Spack from building the latest `gcc`. 
According to the Spack git log, the cause must be purely in the change in the automake between .2 and .3.
After the holidays, could this be checked promptly, as this seems to be affecting lots of packages?

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/automake/package.py b/var/spack/repos/builtin/packages/automake/package.py
--- a/var/spack/repos/builtin/packages/automake/package.py
+++ b/var/spack/repos/builtin/packages/automake/package.py
@@ -39,8 +39,13 @@ def patch(self):
         if '@:1.15.1' in self.spec:
             files_to_be_patched_fmt = 't/wrap/{0}.in'
 
+        if '@1.16.3:' in self.spec:
+            shebang_string = '^#!@PERL@'
+        else:
+            shebang_string = '^#!@PERL@ -w'
+
         for file in ('aclocal', 'automake'):
-            filter_file('^#!@PERL@ -w',
+            filter_file(shebang_string,
                         '#!/usr/bin/env perl',
                         files_to_be_patched_fmt.format(file))
 


Test patch: