关于利用cmake进行ipmctl安装出现/usr/bin/ld: cannot find -lpthreads错误提示(补充)

在使用cmake 3.1.5安装ipmctl时遇到/usr/bin/ld: cannot find -lpthreads错误。问题可能由cmake低版本bug引起,尝试更新cmake到3.15版本后问题得到解决。日志中的错误并不总是准确,有时可能因缺少库或cmake版本过旧导致。

关于ipmctl的安装以及遇坑,已有文章讲的很详细了(见https://blog.youkuaiyun.com/SweeNeil/article/details/89841813

此处补充一下在我用cmake3.1.5安装ipmctl遇到错误提示的一个解决办法:此处贴出从stackoverflow里找的相似报错提示:

File /home/user1/Sources/caffe/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <pthread.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef pthread_create
  return ((int*)(&pthread_create))[argc];
#else
  (void)argc;
  return 0;
#endif
}

Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /home/user1/Sources/caffe/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/gmake" "cmTC_e693b/fast"
/usr/bin/gmake -f CMakeFiles/cmTC_e693b.dir/build.make CMakeFiles/cmTC_e693b.dir/build
gmake[1]: Entering directory '/home/user1/Sources/caffe/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_e693b.dir/CheckFunctionExists.c.o
/usr/bin/
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值