While INSTALL has NOTE TO MAC OS users, which basically says "use real gcc" (without explicitly saying "use real gcc, not apple's clang pretending to be gcc"), people mixing clang and gfortran are potentially in trouble. One ends up with having both libomp and libgomp linked to libmsolve, which isn't what one wants.
clang doesn't work with libgomp, it needs libomp, and gfortran can work with libomp, so one needs to be careful with passing -fopenmp to gfortran in linking mode (?).
Here is a reproducer, on Linux:
CC=clang ./configure --prefix=/tmp/
CC=clang make
ldd /tmp/lib/libmsolve.so
linux-vdso.so.1 (0x00007f27771cf000)
libneogb.so.0 => /usr/local/lib/libneogb.so.0 (0x00007f2777141000)
libflint.so.19 => /usr/lib64/libflint.so.19 (0x00007f2776600000)
libmpfr.so.6 => /usr/lib64/libmpfr.so.6 (0x00007f277654b000)
libgmp.so.10 => /usr/lib64/libgmp.so.10 (0x00007f27764a7000)
libm.so.6 => /usr/lib64/libm.so.6 (0x00007f27763f1000)
libomp.so => /usr/lib64/libomp.so (0x00007f27762c0000)
libc.so.6 => /usr/lib64/libc.so.6 (0x00007f27760eb000)
libgomp.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/14/libgomp.so.1 (0x00007f2776095000)
libcblas.so.3 => /usr/lib64/libcblas.so.3 (0x00007f277605b000)
/lib64/ld-linux-x86-64.so.2 (0x00007f27771d1000)
libblas.so.3 => /usr/lib64/libblas.so.3 (0x00007f2775fb4000)
libgfortran.so.5 => /usr/lib/gcc/x86_64-pc-linux-gnu/14/libgfortran.so.5 (0x00007f2775c00000)
libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/14/libgcc_s.so.1 (0x00007f2775f86000)
Here is a related story for OpenBLAS: OpenMathLib/OpenBLAS#5169
and OpenMathLib/OpenBLAS#5180
While
INSTALLhasNOTE TO MAC OS users, which basically says "use real gcc" (without explicitly saying "use real gcc, not apple's clang pretending to be gcc"), people mixing clang and gfortran are potentially in trouble. One ends up with having bothlibompandlibgomplinked tolibmsolve, which isn't what one wants.clang doesn't work with
libgomp, it needslibomp, and gfortran can work withlibomp, so one needs to be careful with passing-fopenmptogfortranin linking mode (?).Here is a reproducer, on Linux:
Here is a related story for OpenBLAS: OpenMathLib/OpenBLAS#5169
and OpenMathLib/OpenBLAS#5180