cray-mpich +cuda fails to build applications for Spack v0.19.0
bcumming opened this issue · comments
Ben Cumming commented
Building MPI packages with cray-mpich-binary+cuda
fails for v0.19.0
and later of Spack.
The mpicc
(specifically C language) compiler wrapper fails during the linking stage with the errors like the following:
/usr/bin/ld: /user-environment/linux-sles15-zen2/gcc-11.3.0/cray-mpich-binary-8.1.21.1-gcc-4k7oxj3rl75ztwko5s3lamdttacaue4p/lib/libmpi_gtl_cuda.so: undefined reference to `__gxx_personality_v0'
__gxx_personality
is defined in libstdc++
.
Two manual fixes have been shown to fix the issue:
- Patching the
mpicc
wrapper to add-lstdc++
- Patching
libmpi_gtl_cuda.so
to resolve its own dependencypatchelf --add-needed libstdc++.so libmpi_gtl_cuda.so
Of these, the second is more robust, and can be implemented in cray-mpich-binary/package.py
.