Repository: spack/spack

Issue:
Installation issue: blis %nvhpc
### Steps to reproduce the issue

```console
$ spack spec -I blis %nvhpc
Input spec
--------------------------------
 -   blis%nvhpc

Concretized
--------------------------------
 -   blis@0.8.1%nvhpc@22.3+blas+cblas+shared+static threads=none arch=linux-rocky8-sandybridge
[+]      ^python@3.9.10%gcc@11.2.0+bz2+ctypes+dbm~debug+ensurepip+libxml2+lzma~nis~optimizations+pic+pyexpat+pythoncmd+readline+shared+sqlite3~ssl~tix~tkinter~ucs4+uuid+zlib patches=0d98e93,4c24573,f2fd060 arch=linux-rocky8-sandybridge
[+]          ^bzip2@1.0.8%gcc@11.2.0~debug~pic+shared arch=linux-rocky8-sandybridge
[+]              ^diffutils@3.8%gcc@11.2.0 arch=linux-rocky8-sandybridge
[+]                  ^libiconv@1.16%gcc@11.2.0 libs=shared,static arch=linux-rocky8-sandybridge
[+]          ^expat@2.4.6%gcc@11.2.0+libbsd arch=linux-rocky8-sandybridge
[+]              ^libbsd@0.11.5%gcc@11.2.0 arch=linux-rocky8-sandybridge
[+]                  ^libmd@1.0.4%gcc@11.2.0 arch=linux-rocky8-sandybridge
[+]          ^gdbm@1.23%gcc@11.2.0 arch=linux-rocky8-sandybridge
[+]              ^readline@8.1%gcc@11.2.0 arch=linux-rocky8-sandybridge
[+]                  ^ncurses@6.2%gcc@11.2.0~symlinks+termlib abi=none arch=linux-rocky8-sandybridge
[+]                      ^pkgconf@1.8.0%gcc@11.2.0 arch=linux-rocky8-sandybridge
[+]          ^gettext@0.21%gcc@11.2.0+bzip2+curses+git~libunistring+libxml2+tar+xz arch=linux-rocky8-sandybridge
[+]              ^libxml2@2.9.12%gcc@11.2.0~python arch=linux-rocky8-sandybridge
[+]                  ^xz@5.2.5%gcc@11.2.0~pic libs=shared,static arch=linux-rocky8-sandybridge
[+]                  ^zlib@1.2.11%gcc@11.2.0+optimize+pic+shared arch=linux-rocky8-sandybridge
[+]              ^tar@1.34%gcc@11.2.0 arch=linux-rocky8-sandybridge
[+]          ^libffi@3.4.2%gcc@11.2.0 arch=linux-rocky8-sandybridge
[+]          ^sqlite@3.37.2%gcc@11.2.0+column_metadata+dynamic_extensions+fts~functions+rtree arch=linux-rocky8-sandybridge
[+]          ^util-linux-uuid@2.37.4%gcc@11.2.0 arch=linux-rocky8-sandybridge

$ spack install blis%nvhpc
[+] /home/bc/spack/opt/spack/linux-rocky8-sandybridge/gcc-11.2.0/libiconv-1.16-oucchwp4auhxf67wmqcszwjvfvlhxo2t
[+] /home/bc/spack/opt/spack/linux-rocky8-sandybridge/gcc-11.2.0/libmd-1.0.4-rk5ucrveho4hfual5ti2yhsx7agnxo2p
[+] /home/bc/spack/opt/spack/linux-rocky8-sandybridge/gcc-11.2.0/pkgconf-1.8.0-nybi3pwdcko6c3k2zd7hjh2lb36cx7zi
[+] /home/bc/spack/opt/spack/linux-rocky8-sandybridge/gcc-11.2.0/xz-5.2.5-zgv4736fni7yckqa6rj5m2vibhhxzlpt
[+] /home/bc/spack/opt/spack/linux-rocky8-sandybridge/gcc-11.2.0/zlib-1.2.11-s7nm3fffftvpjpspvcms4jxy7kmnreww
[+] /home/bc/spack/opt/spack/linux-rocky8-sandybridge/gcc-11.2.0/libffi-3.4.2-kdqxbv6nck2ojmawfyzj45f7j7lgh26h
[+] /home/bc/spack/opt/spack/linux-rocky8-sandybridge/gcc-11.2.0/diffutils-3.8-kv6p5s34ymnfzsgrzxaw2ijkzhkb33xr
[+] /home/bc/spack/opt/spack/linux-rocky8-sandybridge/gcc-11.2.0/tar-1.34-72bbojvetbdmqrpcdmouz4escsbbhblh
[+] /home/bc/spack/opt/spack/linux-rocky8-sandybridge/gcc-11.2.0/libbsd-0.11.5-wh5542ixbkba2rbn5t7aukvfubgqbmux
[+] /home/bc/spack/opt/spack/linux-rocky8-sandybridge/gcc-11.2.0/util-linux-uuid-2.37.4-6sbuvsx46rgf6wgox4ureodd4q4jtzm2
[+] /home/bc/spack/opt/spack/linux-rocky8-sandybridge/gcc-11.2.0/ncurses-6.2-57ozoiixveh4y2hvhnzwl66lse5d7vbb
[+] /home/bc/spack/opt/spack/linux-rocky8-sandybridge/gcc-11.2.0/libxml2-2.9.12-5gxm6lvzpmosxbi3hcvem5dgtefdvfgs
[+] /home/bc/spack/opt/spack/linux-rocky8-sandybridge/gcc-11.2.0/bzip2-1.0.8-xn5xpbofu2iwg2mzi5h4m6nezrcisfrw
[+] /home/bc/spack/opt/spack/linux-rocky8-sandybridge/gcc-11.2.0/expat-2.4.6-7xd4kommrxxh4nhiep5e7dewm23acpon
[+] /home/bc/spack/opt/spack/linux-rocky8-sandybridge/gcc-11.2.0/readline-8.1-6g3vb5mvchqgqbaifw3icyy4xumecae6
[+] /home/bc/spack/opt/spack/linux-rocky8-sandybridge/gcc-11.2.0/gettext-0.21-fdpco7rm2q6twoyer4lq577mgcuhh3rs
[+] /home/bc/spack/opt/spack/linux-rocky8-sandybridge/gcc-11.2.0/sqlite-3.37.2-xzw5377seh6d4nldrgdujq6k5tyfkkym
[+] /home/bc/spack/opt/spack/linux-rocky8-sandybridge/gcc-11.2.0/gdbm-1.23-3oo6tqu5uvotwsbq3ebjiupx7tsz6vkq
[+] /home/bc/spack/opt/spack/linux-rocky8-sandybridge/gcc-11.2.0/python-3.9.10-mbtpigjr4scstiyl3vpijo3ieirzd7gn
==> Installing blis-0.8.1-fs6ojzsiibqq6jg63dkefuk3anxaw6pv
==> No binary for blis-0.8.1-fs6ojzsiibqq6jg63dkefuk3anxaw6pv found: installing from source
==> Using cached archive: /home/bc/spack/var/spack/cache/_source-cache/archive/72/729694128719801e82fae7b5f2489ab73e4a467f46271beff09588c9265a697b.tar.gz
==> No patches needed for blis
==> blis: Executing phase: 'configure'
==> blis: Executing phase: 'build'
==> Error: ProcessError: Command exited with status 2:
    'make' '-j12'

1 error found in build log:
     120    configure: creating makefile fragments in ./obj/sandybridge/kernels/sandybridge
     121    configure: creating makefile fragments in ./obj/sandybridge/ref_kernels
     122    configure: creating makefile fragments in ./obj/sandybridge/frame
     123    configure: configured to build within top-level directory of source distribution.
     124    ==> blis: Executing phase: 'build'
     125    ==> [2022-04-07-16:40:12.795159] 'make' '-j12'
  >> 126    config/sandybridge/make_defs.mk:78: *** gcc, icc, or clang is required for this configuration..  Stop.

See build log for details:
  /tmp/bc/spack-stage/spack-stage-blis-0.8.1-fs6ojzsiibqq6jg63dkefuk3anxaw6pv/spack-build-out.txt
```


### Error message

<details><summary>Error message</summary><pre>
  >> 126    config/sandybridge/make_defs.mk:78: *** gcc, icc, or clang is required for this configuration..  Stop.
</pre></details>


### Information on your system

* **Spack:** 0.18.0.dev0 (a7e365536be06c0af6cd91feb05aeb7b5de13fe3)
* **Python:** 3.6.8
* **Platform:** linux-rocky8-sandybridge
* **Concretizer:** clingo


### Additional information

[spack-build-out.txt](https://github.com/spack/spack/files/8446016/spack-build-out.txt)
[spack-build-env.txt](https://github.com/spack/spack/files/8446017/spack-build-env.txt)

### General information

- [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:
BLIS has a `make_defs.mk` file that defines compiler flags for each of its ~30 supported architectures. From a quick glance, gcc and clang are supported on most architectures, icc is supported for Intel, and aocc is supported for AMD.
Adding the whole arch:compilers map to spack's package is probably out of the question, but `nvc` isn't supported at all.
Please make an issue at their repo requesting support

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/blis/package.py b/var/spack/repos/builtin/packages/blis/package.py
--- a/var/spack/repos/builtin/packages/blis/package.py
+++ b/var/spack/repos/builtin/packages/blis/package.py
@@ -51,6 +51,9 @@ class BlisBase(Package):
     provides('blas', when="+blas")
     provides('blas', when="+cblas")
 
+    conflicts('%nvhpc')
+    conflicts('%pgi')
+
     phases = ['configure', 'build', 'install']
 
     def configure_args(self):


Test patch: