Spack build fails - likely an GCC v10 issue
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 200
- Forks
- 85
- Avg merge
- 3d 21h
- Merged PRs (30d)
- 2
Description
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'
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the v0.10 Spack build on GCC 10.1.0 using the reported x86_64 CentOS 8 and OMPI 3.1.6 environment. Inspect src/common/mfu_decompress_bz2_libcircle.c, src/common/mfu_compress_bz2_libcircle.c, and the referenced spack-build-out.txt, then run make. Done means mpifileutils builds and installs without the reported multiple-definition linker errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, cmake
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100