Repository: spack/spack

Issue:
Installation issue:  gosam-contrib
### Steps to reproduce the issue

```
spack install gosam-contrib

1 error found in build log:
     1094    libtool: compile:  /lib/spack/env/gcc/g++ -DHAVE_CONFIG_H -I. -I..
              -I../ninja-1.1.0/ninja -I/usr/include/c++/11 -fcx-fortran-rules -
             c cuts_utils.cc -o cuts_utils.o >/dev/null 2>&1
     1095    /bin/sh ../libtool  --tag=FC   --mode=compile /lib/spack/env/gcc/g
             fortran -DHAVE_CONFIG_H -I. -I.. -I../ninja-1.1.0/ninja    -I../av
             h_olo-3.6.1 -g -O2 -ffree-line-length-none -c -o ninjago.lo ninjag
             o.F90
     1096    libtool: compile:  /lib/spack/env/gcc/gfortran -DHAVE_CONFIG_H -I.
              -I.. -I../ninja-1.1.0/ninja -I../avh_olo-3.6.1 -g -O2 -ffree-line
             -length-none -c ninjago.F90  -fPIC -o .libs/ninjago.o
     1097    libtool: compile:  /lib/spack/env/gcc/gfortran -DHAVE_CONFIG_H -I.
              -I.. -I../ninja-1.1.0/ninja -I../avh_olo-3.6.1 -g -O2 -ffree-line
             -length-none -c ninjago.F90 -o ninjago.o >/dev/null 2>&1
     1098    /bin/sh ../libtool  --tag=FC   --mode=compile /lib/spack/env/gcc/g
             fortran -DHAVE_CONFIG_H -I. -I.. -I../ninja-1.1.0/ninja    -I../av
             h_olo-3.6.1 -g -O2 -ffree-line-length-none -c -o mninja.lo mninja.
             F90
     1099    /lib/spack/env/gcc/g++ -DHAVE_CONFIG_H -I. -I.. -I../ninja-1.1.0/n
             inja     -I/usr/include/c++/11 -fcx-fortran-rules -c -o ninja_conf
             ig.o ninja_config.cc
  >> 1100    make[3]: *** No rule to make target 'mninja.mod', needed by 'all-a
             m'.  Stop.
     1101    make[3]: *** Waiting for unfinished jobs....
     1102    libtool: compile:  /lib/spack/env/gcc/gfortran -DHAVE_CONFIG_H -I.
              -I.. -I../ninja-1.1.0/ninja -I../avh_olo-3.6.1 -g -O2 -ffree-line
             -length-none -c mninja.F90  -fPIC -o .libs/mninja.o
     1103    libtool: compile:  /lib/spack/env/gcc/gfortran -DHAVE_CONFIG_H -I.
              -I.. -I../ninja-1.1.0/ninja -I../avh_olo-3.6.1 -g -O2 -ffree-line
             -length-none -c mninja.F90 -o mninja.o >/dev/null 2>&1
     1104    libtool: compile:  /lib/spack/env/gcc/g++ -DHAVE_CONFIG_H -I. -I..
              -I../ninja-1.1.0/ninja -I/usr/include/c++/11 -fcx-fortran-rules -
             c coefficient_level_subs.cc -o coefficient_level_subs.o >/dev/null
              2>&1
     1105    libtool: compile:  /lib/spack/env/gcc/g++ -DHAVE_CONFIG_H -I. -I..
              -I../ninja-1.1.0/ninja -I/usr/include/c++/11 -fcx-fortran-rules -
             c avholo_interface.cc -o avholo_interface.o >/dev/null 2>&1
     1106    libtool: compile:  /lib/spack/env/gcc/g++ -DHAVE_CONFIG_H -I. -I..
              -I../ninja-1.1.0/ninja -I/usr/include/c++/11 -fcx-fortran-rules -
             c Xcuts.cc -o Xcuts.o >/dev/null 2>&1
```

### Information on your system

* **Spack:** 0.16.3
* **Python:** 3.9.7
* **Platform:** linux-mageia9-zen2
* **Concretizer:** clingo

### Additional information

_No response_

### 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:
this seems to be due to parallel builds not finishing the build of mninja.mod before it is required
[spack-build-env.txt](https://github.com/spack/spack/files/7342099/spack-build-env.txt)
[spack-build-out.txt](https://github.com/spack/spack/files/7342101/spack-build-out.txt)


Resolving patch:
diff --git a/var/spack/repos/builtin/packages/gosam-contrib/package.py b/var/spack/repos/builtin/packages/gosam-contrib/package.py
--- a/var/spack/repos/builtin/packages/gosam-contrib/package.py
+++ b/var/spack/repos/builtin/packages/gosam-contrib/package.py
@@ -40,3 +40,7 @@ def configure_args(self):
         args += self.enable_or_disable('libs')
 
         return args
+
+    @property
+    def parallel(self):
+        return False
diff --git a/var/spack/repos/builtin/packages/groff/package.py b/var/spack/repos/builtin/packages/groff/package.py
--- a/var/spack/repos/builtin/packages/groff/package.py
+++ b/var/spack/repos/builtin/packages/groff/package.py
@@ -58,7 +58,7 @@ class Groff(AutotoolsPackage, GNUMirrorPackage):
 
     @property
     def parallel(self):
-        return self.spec.satisfies('@1.22.4')
+        return False
 
     @classmethod
     def determine_version(cls, exe):


Test patch: