CINN icon indicating copy to clipboard operation
CINN copied to clipboard

Compile Failed: cannot find -lpthreads

Open XBWGC opened this issue 2 years ago • 3 comments

  • commit id:57a24429f3a2f06414131b676c5f0d32a33619d1
  • how to reproduce: follow default steps here
  • error log image

XBWGC avatar Apr 26 '22 04:04 XBWGC

可以试试使用 padlde 的构建环境构建

gglin001 avatar Apr 28 '22 03:04 gglin001

我们这边正在查看中,对于您快速解决,可否先注释掉 cinn/auto_schedule/cost_model/CMakeLists.txt 中的

cc_test(test_cost_model SRCS cost_model_test.cc cost_model.cc DEPS pybind gtest_main)

target_link_libraries(test_cost_model ${PYTHON_LIBRARIES})

zhhsplendid avatar Jul 22 '22 02:07 zhhsplendid

由于在-DWITH_TESTONG=OFF 的情况下,test_cost_model没有生成,因此链接出现问题。 找不到pthread的报错并不是pthread本身的问题,在解决了上面的链接问题后就不会出现这个log了。 请参考https://github.com/PaddlePaddle/CINN/pull/890

BiynXu avatar Aug 18 '22 05:08 BiynXu