mpifileutils icon indicating copy to clipboard operation
mpifileutils copied to clipboard

Spack build fails - likely an GCC v10 issue

Open alex--m opened this issue 4 years ago • 4 comments

I built the package (v0.10) using Spack, and got the error below. I suspect the issue is building with GCC v10.1.0, since it has been changed to reject previously accepted coding patterns (I had similar issues with other packages, but not this specific error). Other possibly relevant info: x86_64, CentOS 8, OMPI v3.1.6

==> 6789: Installing mpifileutils
==> Using cached archive: /mnt/central/spack/var/spack/cache/_source-cache/archive/5a/5a71a9acd9841c3c258fc0eaea942f18abcb40098714cc90462b57696c07e3c5.tar.gz
==> Staging archive: /mnt/central/spack/var/spack/stage/root/spack-stage-mpifileutils-0.10-cae3chqbft5lshdgtdiny5pmswpass2h/v0.10.tar.gz
==> Created stage in /mnt/central/spack/var/spack/stage/root/spack-stage-mpifileutils-0.10-cae3chqbft5lshdgtdiny5pmswpass2h
==> No patches needed for mpifileutils
==> 6789: mpifileutils: Building mpifileutils [Package]
==> 6789: mpifileutils: Executing phase: 'install'
==> Error: ProcessError: Command exited with status 2:
    'make'

3 errors found in build log:
     148    CMakeFiles/mfu_o.dir/mfu_decompress_bz2_libcircle.c.o:/mnt/central/spack/var/spack/stage/root/spack-stage-mpifileutils-0.10-cae3chqbft5lshdgtdiny
            5pmswpass2h/spack-src/src/common/mfu_decompress_bz2_libcircle.c:31: multiple definition of `src_name'
     149    CMakeFiles/mfu_o.dir/mfu_compress_bz2_libcircle.c.o:/mnt/central/spack/var/spack/stage/root/spack-stage-mpifileutils-0.10-cae3chqbft5lshdgtdiny5p
            mswpass2h/spack-src/src/common/mfu_compress_bz2_libcircle.c:47: first defined here
     150    CMakeFiles/mfu_o.dir/mfu_decompress_bz2_libcircle.c.o:/mnt/central/spack/var/spack/stage/root/spack-stage-mpifileutils-0.10-cae3chqbft5lshdgtdiny
            5pmswpass2h/spack-src/src/common/mfu_decompress_bz2_libcircle.c:34: multiple definition of `fd_out'
     151    CMakeFiles/mfu_o.dir/mfu_compress_bz2_libcircle.c.o:/mnt/central/spack/var/spack/stage/root/spack-stage-mpifileutils-0.10-cae3chqbft5lshdgtdiny5p
            mswpass2h/spack-src/src/common/mfu_compress_bz2_libcircle.c:50: first defined here
     152    CMakeFiles/mfu_o.dir/mfu_decompress_bz2_libcircle.c.o:/mnt/central/spack/var/spack/stage/root/spack-stage-mpifileutils-0.10-cae3chqbft5lshdgtdiny
            5pmswpass2h/spack-src/src/common/mfu_decompress_bz2_libcircle.c:32: multiple definition of `dst_name'
     153    CMakeFiles/mfu_o.dir/mfu_compress_bz2_libcircle.c.o:/mnt/central/spack/var/spack/stage/root/spack-stage-mpifileutils-0.10-cae3chqbft5lshdgtdiny5p
            mswpass2h/spack-src/src/common/mfu_compress_bz2_libcircle.c:48: first defined here
  >> 154    collect2: error: ld returned 1 exit status
  >> 155    make[2]: *** [src/common/CMakeFiles/mfu.dir/build.make:139: src/common/libmfu.so] Error 1
     156    make[2]: Leaving directory '/mnt/central/spack/var/spack/stage/root/spack-stage-mpifileutils-0.10-cae3chqbft5lshdgtdiny5pmswpass2h/spack-src/buil
            d'
  >> 157    make[1]: *** [CMakeFiles/Makefile2:502: src/common/CMakeFiles/mfu.dir/all] Error 2
     158    make[1]: Leaving directory '/mnt/central/spack/var/spack/stage/root/spack-stage-mpifileutils-0.10-cae3chqbft5lshdgtdiny5pmswpass2h/spack-src/buil
            d'
     159    make: *** [Makefile:153: all] Error 2

See build log for details:
  /mnt/central/spack/var/spack/stage/root/spack-stage-mpifileutils-0.10-cae3chqbft5lshdgtdiny5pmswpass2h/spack-build-out.txt

==> Error: Failed to install mpifileutils due to ChildError: ProcessError: Command exited with status 2:
    'make'
3 errors found in build log:
     148    CMakeFiles/mfu_o.dir/mfu_decompress_bz2_libcircle.c.o:/mnt/central/spack/var/spack/stage/root/spack-stage-mpifileutils-0.10-cae3chqbft5lshdgtdiny
            5pmswpass2h/spack-src/src/common/mfu_decompress_bz2_libcircle.c:31: multiple definition of `src_name'
     149    CMakeFiles/mfu_o.dir/mfu_compress_bz2_libcircle.c.o:/mnt/central/spack/var/spack/stage/root/spack-stage-mpifileutils-0.10-cae3chqbft5lshdgtdiny5p
            mswpass2h/spack-src/src/common/mfu_compress_bz2_libcircle.c:47: first defined here
     150    CMakeFiles/mfu_o.dir/mfu_decompress_bz2_libcircle.c.o:/mnt/central/spack/var/spack/stage/root/spack-stage-mpifileutils-0.10-cae3chqbft5lshdgtdiny
            5pmswpass2h/spack-src/src/common/mfu_decompress_bz2_libcircle.c:34: multiple definition of `fd_out'
     151    CMakeFiles/mfu_o.dir/mfu_compress_bz2_libcircle.c.o:/mnt/central/spack/var/spack/stage/root/spack-stage-mpifileutils-0.10-cae3chqbft5lshdgtdiny5p
            mswpass2h/spack-src/src/common/mfu_compress_bz2_libcircle.c:50: first defined here
     152    CMakeFiles/mfu_o.dir/mfu_decompress_bz2_libcircle.c.o:/mnt/central/spack/var/spack/stage/root/spack-stage-mpifileutils-0.10-cae3chqbft5lshdgtdiny
            5pmswpass2h/spack-src/src/common/mfu_decompress_bz2_libcircle.c:32: multiple definition of `dst_name'
     153    CMakeFiles/mfu_o.dir/mfu_compress_bz2_libcircle.c.o:/mnt/central/spack/var/spack/stage/root/spack-stage-mpifileutils-0.10-cae3chqbft5lshdgtdiny5p
            mswpass2h/spack-src/src/common/mfu_compress_bz2_libcircle.c:48: first defined here
  >> 154    collect2: error: ld returned 1 exit status
  >> 155    make[2]: *** [src/common/CMakeFiles/mfu.dir/build.make:139: src/common/libmfu.so] Error 1
     156    make[2]: Leaving directory '/mnt/central/spack/var/spack/stage/root/spack-stage-mpifileutils-0.10-cae3chqbft5lshdgtdiny5pmswpass2h/spack-src/buil
            d'
  >> 157    make[1]: *** [CMakeFiles/Makefile2:502: src/common/CMakeFiles/mfu.dir/all] Error 2
     158    make[1]: Leaving directory '/mnt/central/spack/var/spack/stage/root/spack-stage-mpifileutils-0.10-cae3chqbft5lshdgtdiny5pmswpass2h/spack-src/buil
            d'
     159    make: *** [Makefile:153: all] Error 2

See build log for details:
  /mnt/central/spack/var/spack/stage/root/spack-stage-mpifileutils-0.10-cae3chqbft5lshdgtdiny5pmswpass2h/spack-build-out.txt
Traceback (most recent call last):
  File "/mnt/central/spack/lib/spack/spack/build_environment.py", line 813, in child_process
    return_value = function()
  File "/mnt/central/spack/lib/spack/spack/installer.py", line 1130, in build_process
    phase(pkg.spec, pkg.prefix)
  File "/mnt/central/spack/lib/spack/spack/package.py", line 108, in phase_wrapper
    phase(spec, prefix)
  File "/mnt/central/spack/lib/spack/spack/multimethod.py", line 133, in __call__
    return spec_method(package_self, *args, **kwargs)
  File "/mnt/central/spack/var/spack/repos/builtin/packages/mpifileutils/package.py", line 95, in install
    make('install')
  File "/mnt/central/spack/lib/spack/spack/build_environment.py", line 131, in __call__
    return super(MakeExecutable, self).__call__(*args, **kwargs)
  File "/mnt/central/spack/lib/spack/spack/util/executable.py", line 189, in __call__
    proc.returncode, long_msg)
spack.util.executable.ProcessError: Command exited with status 2:
    'make'

alex--m avatar Jun 21 '20 20:06 alex--m

Thanks for the report @alex--m . Yes, it looks like it's tripping over variable names that are reused.

I will clean this up. We have a 0.10.1 release in the works, so this will fit nicely into that.

Are you able to get by with older compilers until then?

adammoody avatar Jun 22 '20 18:06 adammoody

@adammoody Yeah, I built with an older GCC for now, so I don't mind waiting. Thank you for including a fix into the roadmap!

alex--m avatar Jun 22 '20 18:06 alex--m

I don't have easy access to a gcc v10 compiler, but I found I could reproduce those errors with older gcc by adding the -fno-common flag during the build. I have a PR going here: https://github.com/hpc/mpifileutils/pull/347

adammoody avatar Jun 23 '20 19:06 adammoody

Decided to go ahead and merge this PR in. So in theory the spack build of master might work for gcc v10 now.

adammoody avatar Jun 23 '20 20:06 adammoody