jeromerobert / hmat-oss

A hierarchical matrix C/C++ library
GNU General Public License v2.0
22 stars 11 forks source link

explicitely link to libm as CMAKE_REQUIRED_LIBRARIES is overwritten by f... #10

Closed jschueller closed 9 years ago

jschueller commented 9 years ago

...indmkl

libm does not get linked resulting in this: (ubuntu 14.04) [ 113s] Linking C executable example-c-simple-cylinder [ 113s] /usr/bin/cmake -E cmake_link_script CMakeFiles/example-c-simple-cylinder.dir/link.txt --verbose=1 [ 113s] /usr/bin/gcc -fopenmp -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,--as-needed CMakeFiles/example-c-simple-cylinder.dir/examples/c-simple-cylinder.c.o -o example-c-simple-cylinder -L/usr/src/packages/BUILD/obj-i686-linux-gnu -rdynamic libhmat-oss.so.1.0.0 -lrt -Wl,-rpath,/usr/src/packages/BUILD/obj-i686-linux-gnu: [ 113s] /usr/bin/ld: CMakeFiles/example-c-simple-cylinder.dir/examples/c-simple-cylinder.c.o: undefined reference to symbol 'sincos@@GLIBC_2.1' [ 113s] //lib/i386-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line [ 113s] collect2: error: ld returned 1 exit status [ 113s] make[3]: * [example-c-simple-cylinder] Error 1 [ 113s] make[3]: Leaving directory `/usr/src/packages/BUILD/obj-i686-linux-gnu' [ 113s] make[2]: * [CMakeFiles/example-c-simple-cylinder.dir/all] Error 2 [ 113s] make[2]: *\ Waiting for unfinished jobs....

jschueller commented 9 years ago

do not merge yet

jschueller commented 9 years ago

the examples still do not build on squeeze, but at least libm is linked correctly when building the lib

jeromerobert commented 9 years ago

a9a5cdf and dac2708