Repository: spack/spack

Issue:
unifyfs fails to build, unknown type 'MPI_Fint'
Package `unifyfs` fails to build on Ubuntu 18.04, x86_64 with Spack develop (e3b357ad87). The full spack-build-log is attached, but the error is shown below. I've tried with both `mpich` and `openmpi` -- same error either way.

Full build log: [unifyfs-build-out.txt](https://github.com/spack/spack/files/4276893/unifyfs-build-out.txt)

**Error:**
```
make[3]: Entering directory '/tmp/walker/spack-stage/spack-stage-unifyfs-0.9.0-yqx3hsbr465azvv6lwnq7q5vp7r5st3p/spack-src/spack-build/client/src'
  CC       libunifyfs_la-margo_client.lo
  CC       libunifyfs_la-unifyfs.lo
  CC       libunifyfs_la-unifyfs-dirops.lo
  CC       libunifyfs_la-unifyfs-fixed.lo
  CC       libunifyfs_la-unifyfs-stack.lo
  CC       libunifyfs_la-unifyfs-stdio.lo
  CC       libunifyfs_la-unifyfs-sysio.lo
  CC       libunifyfs_la-pmpi_wrappers.lo
In file included from /tmp/walker/spack-stage/spack-stage-unifyfs-0.9.0-yqx3hsbr465azvv6lwnq7q5vp7r5st3p/spack-src/client/src/pmpi_wrappers.c:15:0:
/tmp/walker/spack-stage/spack-stage-unifyfs-0.9.0-yqx3hsbr465azvv6lwnq7q5vp7r5st3p/spack-src/client/src/pmpi_wrappers.h:21:16: error: unknown type name 'MPI_Fint'
 void mpi_init_(MPI_Fint* ierr);
                ^~~~~~~~
/tmp/walker/spack-stage/spack-stage-unifyfs-0.9.0-yqx3hsbr465azvv6lwnq7q5vp7r5st3p/spack-src/client/src/pmpi_wrappers.h:26:20: error: unknown type name 'MPI_Fint'
 void mpi_finalize_(MPI_Fint* ierr);
                    ^~~~~~~~
Makefile:646: recipe for target 'libunifyfs_la-pmpi_wrappers.lo' failed
make[3]: *** [libunifyfs_la-pmpi_wrappers.lo] Error 1
make[3]: Leaving directory '/tmp/walker/spack-stage/spack-stage-unifyfs-0.9.0-yqx3hsbr465azvv6lwnq7q5vp7r5st3p/spack-src/spack-build/client/src'
Makefile:460: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/tmp/walker/spack-stage/spack-stage-unifyfs-0.9.0-yqx3hsbr465azvv6lwnq7q5vp7r5st3p/spack-src/spack-build/client'
Makefile:490: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/tmp/walker/spack-stage/spack-stage-unifyfs-0.9.0-yqx3hsbr465azvv6lwnq7q5vp7r5st3p/spack-src/spack-build'
Makefile:400: recipe for target 'all' failed
make: *** [all] Error 2
```

@CamStan 


Discussion:
@eugeneswalker, this appears to be a bug with our `auto-mount` feature that is enabled by default. For now, try installing without it while we figure this out:
```
spack install unifyfs~auto-mount
```

I have opened a corresponding issue in UnifyFS to track this ([#467](https://github.com/LLNL/UnifyFS/issues/467)).

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/unifyfs/package.py b/var/spack/repos/builtin/packages/unifyfs/package.py
--- a/var/spack/repos/builtin/packages/unifyfs/package.py
+++ b/var/spack/repos/builtin/packages/unifyfs/package.py
@@ -28,7 +28,6 @@ class Unifyfs(AutotoolsPackage):
     variant('pmi', default='False', description='Enable PMI2 build options')
     variant('pmix', default='False', description='Enable PMIx build options')
 
-    depends_on('openssl')
     depends_on('autoconf',  type='build')
     depends_on('automake',  type='build')
     depends_on('libtool',   type='build')
@@ -44,6 +43,7 @@ class Unifyfs(AutotoolsPackage):
     depends_on('margo')
     depends_on('mercury+bmi+sm')
     depends_on('mpi')
+    depends_on('openssl')
 
     # Optional dependencies
     depends_on('hdf5', when='+hdf5')
@@ -54,6 +54,10 @@ class Unifyfs(AutotoolsPackage):
     conflicts('%intel', when='+fortran')
     conflicts('%xl', when='+fortran')
 
+    # Fix broken --enable-mpi-mount config option for version 0.9.0
+    # See https://github.com/LLNL/UnifyFS/issues/467
+    patch('auto-mount.patch', when='@0.9.0')
+
     # Parallel disabled to prevent tests from being run out-of-order when
     # installed with the --test={root, all} option.
     parallel = False


Test patch: