-
Guilherme Amadio authored
Using -ffast-math is causing linking problems like the one below in the nightly builds with Clang 7 + GCC 6.2: CMakeFiles/VecOps.dir/src/TVec.cxx.o: In function `exp': /.../include/c++/6.2.0/cmath:246: undefined reference to `__expf_finite' This is because when linking with -ffast-math, the compiler is expecting the symbol __expf_finite to be in libm.so, but it is not there: $ nm -D /lib/libm-2.12.so | grep expf 00012010 W cexpf 00010aa0 W expf 000141d0 W frexpf 00014240 W ldexpf The vectorized math functions were only introduced in glibc-2.22, so on a machine with a more recent glibc, however, the symbols are there: $ nm -D /lib/libm-2.26.so | grep expf 000000000004d5d0 W cexpf 000000000006bbe0 W cexpf128 000000000000f930 W expf 000000000006fb10 W expf128 0000000000050f20 T __expf128_finite 0000000000040de0 T __expf_finite 00000000000489b0 W frexpf 0000000000064080 W frexpf128 0000000000048a60 W ldexpf 00000000000641b0 W ldexpf128 More information: https://sourceware.org/glibc/wiki/libmvec
Guilherme Amadio authoredUsing -ffast-math is causing linking problems like the one below in the nightly builds with Clang 7 + GCC 6.2: CMakeFiles/VecOps.dir/src/TVec.cxx.o: In function `exp': /.../include/c++/6.2.0/cmath:246: undefined reference to `__expf_finite' This is because when linking with -ffast-math, the compiler is expecting the symbol __expf_finite to be in libm.so, but it is not there: $ nm -D /lib/libm-2.12.so | grep expf 00012010 W cexpf 00010aa0 W expf 000141d0 W frexpf 00014240 W ldexpf The vectorized math functions were only introduced in glibc-2.22, so on a machine with a more recent glibc, however, the symbols are there: $ nm -D /lib/libm-2.26.so | grep expf 000000000004d5d0 W cexpf 000000000006bbe0 W cexpf128 000000000000f930 W expf 000000000006fb10 W expf128 0000000000050f20 T __expf128_finite 0000000000040de0 T __expf_finite 00000000000489b0 W frexpf 0000000000064080 W frexpf128 0000000000048a60 W ldexpf 00000000000641b0 W ldexpf128 More information: https://sourceware.org/glibc/wiki/libmvec