Compilation error for pastix+mpi
When trying to install pastix,
spack install pastix+mpi
I have a compilation Error:
[ 9%] Building C object spm/CMakeFiles/spm.dir/src/p_spm.c.o
cd /tmp/test/spack-stage/spack-stage-tMmrK3/pastix/spack-build/spm && /home/test/Installed/newspack/lib/spack/env/gcc/gcc -DCBLAS_HAS_CGEMM3M -DCBLAS_HAS_ZGEMM3M -Dspm_EXPORTS -I/home/test/pkgspack/linux-ubuntu16.04-x86_64/gcc-5.4.0/hwloc-1.11.9-gjjmk2lkg6s7ezidzrcljkh64rqilhp2/include -I/home/test/pkgspack/linux-ubuntu16.04-x86_64/gcc-5.4.0/libpciaccess-0.13.5-5urc6tcjae26fbbd2wyfohoszhgxtbmc/include -I/home/test/pkgspack/linux-ubuntu16.04-x86_64/gcc-5.4.0/libxml2-2.9.8-wpexsphdmfayxqxd4up5vgwuqgu5woo7/include/libxml2 -I/home/test/pkgspack/linux-ubuntu16.04-x86_64/gcc-5.4.0/openmpi-3.1.1-lmdzeojhveb4utlzwacuxrjc5zvrx5jq/include -I/home/test/pkgspack/linux-ubuntu16.04-x86_64/gcc-5.4.0/scotch-6.0.6-p5xne3pyxkuvl7sx4pz2tmuapg7yg4jh/include -I/home/test/Installed/newspack/var/spack/stage/pastix-solverstack-x33wutyrehx4ubaime3aoguitnfnpbam/pastix/spm/include -I/home/test/Installed/newspack/var/spack/stage/pastix-solverstack-x33wutyrehx4ubaime3aoguitnfnpbam/pastix/spm/src -I/tmp/test/spack-stage/spack-stage-tMmrK3/pastix/spack-build/spm/src -Wall -Wextra -mcx16 -O2 -g -DNDEBUG -g3 -g3 -fPIC -fexceptions;-pthread -DPRECISION_p -UPRECISION_s -UPRECISION_d -UPRECISION_c -UPRECISION_z -o CMakeFiles/spm.dir/src/p_spm.c.o -c /tmp/test/spack-stage/spack-stage-tMmrK3/pastix/spack-build/spm/src/p_spm.c
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: error: ld returned 1 exit status
/bin/sh: 1: -pthread: not found
There is a -fexceptions;-pthread
somewhere in the command line causing the error. Looks like a cmake error, where the flags MPI_CXX_COMPILE_OPTIONS
, MPI_C_COMPILE_OPTIONS
and MPI_Fortran_COMPILE_OPTIONS
are set to -fexceptions;-pthread and then written directly in the compilation line.
NB: It does not occur when using pastix~mpi (default).