Repository: spack/spack

Issue:
Installation issue: libxsmm (missing python build dependency)
<!-- 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! -->

I am encountering an error building libxsmm, apparently due to a missing python build dependency.

### Steps to reproduce the issue

spack install libxsmm@1.15%gcc@8.4.0 ~debug +generator ~header-only +shared 

Results in error
> ...
> ==> 4133847: libxsmm: Executing phase: 'build'
> ==> Error: ProcessError: Command exited with status 2:
>    'make' '-j16' 'CC=/software/spack/git.2020.05.14/lib/spack/env/gcc/gcc' 'CXX=/software>/spack/git.2020.05.14/lib/spack/env/gcc/g++' 'FC=/software/spack/git.2020.05.14/lib/spack/env/gcc/gfortran' 'PREFIX=/software/spack-software/2020.05.14/linux-rhel8-ivybridge/gcc-8.4.0/libxsmm-1.15-habdkyd2aklaj24zcvy5cu5t7bi7clzs' 'SYM=1' 'STATIC=0'
> See build log for details:
>   /tmp/spackswinst/spack-stage/spack-stage-libxsmm-1.15-habdkyd2aklaj24zcvy5cu5t7bi7clzs/spack-build-out.txt
> ...

The build log is more informative, with
> ==> [2020-09-04-17:33:51.044746, 4134635] 'make' '-j16' 'CC=/software/spack/git.2020.05.14/lib/spack/env/gcc/gcc' 'CXX=/software/spack/git.2020.05.14/lib/spack/env/gcc/g++' 'FC=/software/spack/git.2020.05.14/lib/spack/env/gcc/gfortran' 'PREFIX=/software/spack-software/2020.05.14/linux-rhel8-ivybridge/gcc-8.4.0/libxsmm-1.15-habdkyd2aklaj24zcvy5cu5t7bi7clzs' 'SYM=1' 'STATIC=0'
> --------------------------------------------------------------------------------
> Makefile:225: *** No Python interpreter found.  Stop.

So libxsmm seems to need python to build, but has not python build dependency in spack.



<!-- Fill in the exact spec you are trying to build and the relevant part of the error message -->
```console
$ spack install <spec>

### Information on your system
spack debug report
* **Spack:** 0.14.2
* **Python:** 3.6.8
* **Platform:** linux-rhel8-ivybridge

<!-- 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. -->
* [spack-build-env.txt](https://github.com/spack/spack/files/5189008/spack-build-env.txt)
* [spack-build-out.txt](https://github.com/spack/spack/files/5189009/spack-build-out.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
No maintainers for libxsmm
<!-- 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
- [x ] 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/libxsmm/package.py b/var/spack/repos/builtin/packages/libxsmm/package.py
--- a/var/spack/repos/builtin/packages/libxsmm/package.py
+++ b/var/spack/repos/builtin/packages/libxsmm/package.py
@@ -60,6 +60,7 @@ class Libxsmm(MakefilePackage):
             description='With generator executable(s)')
     conflicts('+header-only', when='@:1.6.2',
               msg='Header-only is available since v1.6.2!')
+    depends_on('python', type='build')
 
     @property
     def libs(self):


Test patch: