Paddle icon indicating copy to clipboard operation
Paddle copied to clipboard

paddle带capi编译dense demo报错

Open bushidonggua opened this issue 9 years ago • 2 comments

跑capi/examples/model_inference/dense paddle带capi用的这个版本: image

报错: /usr/bin/make64 MAC=64 Scanning dependencies of target dense [100%] Building C object CMakeFiles/dense.dir/main.c.o Linking C executable dense /opt/compiler/gcc-4.8.2/lib/libpthread.so.0: undefined reference to __mktemp@GLIBC_PRIVATE' /opt/compiler/gcc-4.8.2/lib/libpthread.so.0: undefined reference to __madvise@GLIBC_PRIVATE' /home/work/chenlimin/paddlepaddle/usr/local/lib/libpaddle_capi_shared.so: undefined reference to memcpy@GLIBC_2.14' /opt/compiler/gcc-4.8.2/lib/libpthread.so.0: undefined reference to __ctype_init@GLIBC_PRIVATE' /opt/compiler/gcc-4.8.2/lib/libpthread.so.0: undefined reference to __call_tls_dtors@GLIBC_PRIVATE' /opt/compiler/gcc-4.8.2/lib/libstdc++.so.6: undefined reference to clock_gettime@GLIBC_2.17' collect2: ld returned 1 exit status make64[2]: *** [dense] Error 1 make64[1]: *** [CMakeFiles/dense.dir/all] Error 2 make64: *** [all] Error 2

bushidonggua avatar Aug 11 '17 10:08 bushidonggua

请用公司内部的编译器,路径在/opt/compiler下。

gongweibao avatar Sep 19 '17 07:09 gongweibao

提问者用的就是公司的编译器吧。。我也遇到了这个问题,如果你用的是CMakeList,最后加入一行target_link_libraries (appName Threads::Threads),如果直接用命令行编译,可以在后面加入-lpthread (copy by 风鱼的歌)

luotao1 avatar Sep 25 '17 03:09 luotao1