Repository: spack/spack

Issue:
Installation issue: zoltan@3.83%gcc@10.2.0
<!-- 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 zoltan
...
==> zoltan: Executing phase: 'autoreconf'
==> zoltan: Executing phase: 'configure'
==> zoltan: Executing phase: 'build'
==> Error: ProcessError: Command exited with status 2:
    'make' '-j4'

11 errors found in build log:
     1586
     1587      413 |   call MPI_Bcast(Test_Multi_Callbacks, 1, MPI_INTEGER, 0, MPI_COMM_WORLD, ierr)
     1588          |                 2
     1589    ......
     1590      424 |   call MPI_Bcast(pio_info%pdsk_root, len(pio_info%pdsk_root), MPI_CHARACTER, &
     1591          |                 1
  >> 1592    Error: Type mismatch between actual argument at (1) and actual argument at (2) (CHARACTER(1025)/INTE
             GER(4)).
     1593    /tmp/hector/spack-stage/spack-stage-zoltan-3.83-77uswzo66szkbmd2sk32mtac2qbbzvkj/spack-src/src/fdriv
             er/fdr_input.f90:426:17:
     1594
     1595      413 |   call MPI_Bcast(Test_Multi_Callbacks, 1, MPI_INTEGER, 0, MPI_COMM_WORLD, ierr)
     1596          |                 2
     1597    ......
     1598      426 |   call MPI_Bcast(pio_info%pdsk_subdir, len(pio_info%pdsk_root), MPI_CHARACTER, &
     1599          |                 1
  >> 1600    Error: Type mismatch between actual argument at (1) and actual argument at (2) (CHARACTER(1025)/INTE
             GER(4)).
     1601    /tmp/hector/spack-stage/spack-stage-zoltan-3.83-77uswzo66szkbmd2sk32mtac2qbbzvkj/spack-src/src/fdriv
             er/fdr_input.f90:428:17:
     1602
     1603      413 |   call MPI_Bcast(Test_Multi_Callbacks, 1, MPI_INTEGER, 0, MPI_COMM_WORLD, ierr)
     1604          |                 2
     1605    ......
     1606      428 |   call MPI_Bcast(pio_info%pexo_fname, len(pio_info%pdsk_root), MPI_CHARACTER, &
     1607          |                 1
  >> 1608    Error: Type mismatch between actual argument at (1) and actual argument at (2) (CHARACTER(1025)/INTE
             GER(4)).
...
```

Here is the Concretized spec:
```console
$ spack spec zoltan

zoltan@3.83%gcc@10.2.0~debug+fortran~int64+mpi+parmetis~shared arch=linux-ubuntu16.04-ivybridge
    ^autoconf@2.69%gcc@10.2.0 arch=linux-ubuntu16.04-ivybridge
        ^m4@1.4.18%gcc@10.2.0+sigsegv patches=3877ab548f88597ab2327a2230ee048d2d07ace1062efe81fc92e91b7f39cd00,fc9b61654a3ba1a8d6cd78ce087e7c96366c290bc8d2c299f09828d793b853c8 arch=linux-ubuntu16.04-ivybridge
            ^libsigsegv@2.12%gcc@10.2.0 arch=linux-ubuntu16.04-ivybridge
        ^perl@5.30.3%gcc@10.2.0+cpanm+shared+threads arch=linux-ubuntu16.04-ivybridge
            ^berkeley-db@18.1.40%gcc@10.2.0 arch=linux-ubuntu16.04-ivybridge
            ^gdbm@1.18.1%gcc@10.2.0 patches=7f569b9287e9e5a4236636eef32ff3428f0462ec17aea359e0ebee07649f1f16 arch=linux-ubuntu16.04-ivybridge
                ^readline@8.0%gcc@10.2.0 arch=linux-ubuntu16.04-ivybridge
                    ^ncurses@6.2%gcc@10.2.0~symlinks+termlib arch=linux-ubuntu16.04-ivybridge
                        ^pkgconf@1.7.3%gcc@10.2.0 arch=linux-ubuntu16.04-ivybridge
    ^automake@1.16.2%gcc@10.2.0 arch=linux-ubuntu16.04-ivybridge
    ^metis@5.1.0%gcc@10.2.0~gdb~int64~real64~shared build_type=Release patches=4991da938c1d3a1d3dea78e49bbebecba00273f98df2a656e38b83d55b281da1,b1225da886605ea558db7ac08dd8054742ea5afe5ed61ad4d0fe7a495b1270d2 arch=linux-ubuntu16.04-ivybridge
        ^cmake@3.18.2%gcc@10.2.0~doc+ncurses+openssl+ownlibs~qt arch=linux-ubuntu16.04-ivybridge
            ^openssl@1.1.1g%gcc@10.2.0+systemcerts arch=linux-ubuntu16.04-ivybridge
                ^zlib@1.2.11%gcc@10.2.0+optimize+pic+shared arch=linux-ubuntu16.04-ivybridge
    ^openmpi@4.0.4%gcc@10.2.0~atomics~cuda~cxx~cxx_exceptions+gpfs~java~legacylaunchers~lustre~memchecker~pmi~singularity~sqlite3+static~thread_multiple+vt+wrapper-rpath fabrics=none schedulers=none arch=linux-ubuntu16.04-ivybridge
        ^hwloc@2.2.0%gcc@10.2.0~cairo~cuda~gl~libudev+libxml2~netloc~nvml+pci+shared arch=linux-ubuntu16.04-ivybridge
            ^libpciaccess@0.16%gcc@10.2.0 arch=linux-ubuntu16.04-ivybridge
                ^libtool@2.4.6%gcc@10.2.0 arch=linux-ubuntu16.04-ivybridge
                ^util-macros@1.19.1%gcc@10.2.0 arch=linux-ubuntu16.04-ivybridge
            ^libxml2@2.9.10%gcc@10.2.0~python arch=linux-ubuntu16.04-ivybridge
                ^libiconv@1.16%gcc@10.2.0 arch=linux-ubuntu16.04-ivybridge
                ^xz@5.2.5%gcc@10.2.0~pic arch=linux-ubuntu16.04-ivybridge
        ^numactl@2.0.12%gcc@10.2.0 arch=linux-ubuntu16.04-ivybridge
    ^parmetis@4.0.3%gcc@10.2.0~gdb~shared build_type=RelWithDebInfo patches=4f892531eb0a807eb1b82e683a416d3e35154a455274cf9b162fb02054d11a5b,50ed2081bc939269689789942067c58b3e522c269269a430d5d34c00edbc5870,704b84f7c7444d4372cb59cca6e1209df4ef3b033bc4ee3cf50f369bce972a9d arch=linux-ubuntu16.04-ivybridge

```

### Information on your system

<!-- Please include the output of `spack debug report` -->
```console
$ spack debug report     
* **Spack:** 0.15.4-696-5d3ad70e0
* **Python:** 3.5.2
* **Platform:** linux-ubuntu16.04-ivybridge
```
<!-- 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-out.txt](https://github.com/spack/spack/files/5134280/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

<!-- 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/zoltan/package.py b/var/spack/repos/builtin/packages/zoltan/package.py
--- a/var/spack/repos/builtin/packages/zoltan/package.py
+++ b/var/spack/repos/builtin/packages/zoltan/package.py
@@ -133,13 +133,16 @@ def configure_args(self):
                 '--with-mpi-libs= '
             ])
 
+        config_fcflags = config_cflags[:]
+        if spec.satisfies('%gcc@10:+fortran'):
+            config_fcflags.append('-fallow-argument-mismatch')
         # NOTE: Early versions of Zoltan come packaged with a few embedded
         # library packages (e.g. ParMETIS, Scotch), which messes with Spack's
         # ability to descend directly into the package's source directory.
         config_args.extend([
             '--with-cflags={0}'.format(' '.join(config_cflags)),
             '--with-cxxflags={0}'.format(' '.join(config_cflags)),
-            '--with-fcflags={0}'.format(' '.join(config_cflags))
+            '--with-fcflags={0}'.format(' '.join(config_fcflags))
         ])
         return config_args
 


Test patch: