Finite math, fftw3, lld and Arch Linux

Florian Weimer fweimer@redhat.com
Wed May 13 09:17:28 GMT 2020


* Jean-Michaël Celerier via Libc-alpha:

> $ readelf -dW /usr/lib64/libfftw3.so
> Dynamic section at offset 0x2445d0 contains 24 entries:
>   Tag        Type                         Name/Value
>  0x0000000000000001 (NEEDED)             Shared library: [libm.so.6]
>  0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
>  0x000000000000000e (SONAME)             Library soname: [libfftw3.so.3]
>
> $ objdump -T /usr/lib64/libfftw3.so | grep finite
> 0000000000000000      DF *UND* 0000000000000000  GLIBC_2.15  __log_finite

This part looks good.  No underlinking.

> In particular, the following fails :
> $ echo 'int main() { }' > foo.cpp
> $ clang++ foo.cpp -lfftw3 -fuse-ld=lld -lm
> ld.lld: error:
> /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../lib64/libfftw3.so:
> undefined reference to __log_finite
>
> What would be the correct solution in that case ? Since everything seems to
> link against -lm...

Does this work if you use ld.bfd instead of ld.lld?

Thanks,
Florian



More information about the Libc-alpha mailing list