c++ - building the ta-lib library fails with undefined references from libm.so -
trying make
ta-lib library (ta-lib-0.4.0-src.tar.gz) following error:
/home/me/ta-lib/src/.libs/libta_lib.so: undefined reference `sinh' /home/me/ta-lib/src/.libs/libta_lib.so: undefined reference `sincos' /home/me/ta-lib/src/.libs/libta_lib.so: undefined reference `ceil' ...
for large number of maths functions.
the failing command looks this:
gcc -g -o2 -o .libs/ta_regtest (... .o files) -l/home/me/ta-lib/src \ /home/me/ta-lib/src/.libs/libta_lib.so -lm -lpthread -ldl
the offending library (ta_lib) looks this:
objdump -tc libta_lib.so | grep " d \*und\*" 0000000000000000 d *und* 0000000000000000 sinh 0000000000000000 d *und* 0000000000000000 sincos 0000000000000000 d *und* 0000000000000000 ceil ...
for same maths functions (the grep excludes defined functions , have "w" (presumably weak) flag)
a map lists libraries included, among them:
load /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libm.so
and list of symbols (objdump -tc) defined in libm.so includes:
000000000001a320 w id .text 0000000000000020 glibc_2.2.5 ceil
which 1 of undefined references (they there). cannot determine meaning of glibc_2.2.5.
why loader not finding these functions?
my system looks this:
$ uname -a linux mynode 3.5.0-17-generic #28-ubuntu smp tue oct 9 19:31:23 utc 2012 x86_64 x86_64 x86_64 gnu/linux
Comments
Post a Comment