lee890801 2021-03-31 10:39
浏览 19

flashlight 时报出的 function pthreads failed

编译出错后的 CMakeError.log 信息

Determining if the pthread_create exist failed with the following output:
Change Dir: /home/shi/wav2letter/flashlight/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_7c3f5/fast"
/usr/bin/make -f CMakeFiles/cmTC_7c3f5.dir/build.make CMakeFiles/cmTC_7c3f5.dir/build
make[1]: Entering directory '/home/shi/wav2letter/flashlight/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_7c3f5.dir/CheckSymbolExists.c.o
/usr/bin/cc   -fPIC    -o CMakeFiles/cmTC_7c3f5.dir/CheckSymbolExists.c.o   -c /home/shi/wav2letter/flashlight/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTC_7c3f5
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_7c3f5.dir/link.txt --verbose=1
/usr/bin/cc -fPIC    -rdynamic  CMakeFiles/cmTC_7c3f5.dir/CheckSymbolExists.c.o  -o cmTC_7c3f5 
CMakeFiles/cmTC_7c3f5.dir/CheckSymbolExists.c.o: In function `main':
CheckSymbolExists.c:(.text+0x1b): undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_7c3f5.dir/build.make:86: recipe for target 'cmTC_7c3f5' failed
make[1]: *** [cmTC_7c3f5] Error 1
make[1]: Leaving directory '/home/shi/wav2letter/flashlight/build/CMakeFiles/CMakeTmp'
Makefile:121: recipe for target 'cmTC_7c3f5/fast' failed
make: *** [cmTC_7c3f5/fast] Error 2

File /home/shi/wav2letter/flashlight/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/shi/wav2letter/flashlight/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_0ac87/fast"
/usr/bin/make -f CMakeFiles/cmTC_0ac87.dir/build.make CMakeFiles/cmTC_0ac87.dir/build
make[1]: Entering directory '/home/shi/wav2letter/flashlight/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_0ac87.dir/CheckFunctionExists.c.o
/usr/bin/cc   -fPIC -DCHECK_FUNCTION_EXISTS=pthread_create   -o CMakeFiles/cmTC_0ac87.dir/CheckFunctionExists.c.o   -c /usr/share/cmake-3.13/Modules/CheckFunctionExists.c
Linking C executable cmTC_0ac87
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_0ac87.dir/link.txt --verbose=1
/usr/bin/cc -fPIC -DCHECK_FUNCTION_EXISTS=pthread_create   -rdynamic  CMakeFiles/cmTC_0ac87.dir/CheckFunctionExists.c.o  -o cmTC_0ac87 -lpthreads 
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_0ac87.dir/build.make:86: recipe for target 'cmTC_0ac87' failed
make[1]: *** [cmTC_0ac87] Error 1
make[1]: Leaving directory '/home/shi/wav2letter/flashlight/build/CMakeFiles/CMakeTmp'
Makefile:121: recipe for target 'cmTC_0ac87/fast' failed
make: *** [cmTC_0ac87/fast] Error 2


Determining if the pthread_create exist failed with the following output:
Change Dir: /home/shi/wav2letter/flashlight/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_9302f/fast"
/usr/bin/make -f CMakeFiles/cmTC_9302f.dir/build.make CMakeFiles/cmTC_9302f.dir/build
make[1]: Entering directory '/home/shi/wav2letter/flashlight/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_9302f.dir/CheckSymbolExists.c.o
/usr/bin/cc   -fPIC    -o CMakeFiles/cmTC_9302f.dir/CheckSymbolExists.c.o   -c /home/shi/wav2letter/flashlight/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTC_9302f
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_9302f.dir/link.txt --verbose=1
/usr/bin/cc -fPIC    -rdynamic  CMakeFiles/cmTC_9302f.dir/CheckSymbolExists.c.o  -o cmTC_9302f 
CMakeFiles/cmTC_9302f.dir/CheckSymbolExists.c.o: In function `main':
CheckSymbolExists.c:(.text+0x1b): undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_9302f.dir/build.make:86: recipe for target 'cmTC_9302f' failed
make[1]: *** [cmTC_9302f] Error 1
make[1]: Leaving directory '/home/shi/wav2letter/flashlight/build/CMakeFiles/CMakeTmp'
Makefile:121: recipe for target 'cmTC_9302f/fast' failed
make: *** [cmTC_9302f/fast] Error 2

File /home/shi/wav2letter/flashlight/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/shi/wav2letter/flashlight/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_fffb4/fast"
/usr/bin/make -f CMakeFiles/cmTC_fffb4.dir/build.make CMakeFiles/cmTC_fffb4.dir/build
make[1]: Entering directory '/home/shi/wav2letter/flashlight/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_fffb4.dir/CheckFunctionExists.c.o
/usr/bin/cc   -fPIC -DCHECK_FUNCTION_EXISTS=pthread_create   -o CMakeFiles/cmTC_fffb4.dir/CheckFunctionExists.c.o   -c /usr/share/cmake-3.13/Modules/CheckFunctionExists.c
Linking C executable cmTC_fffb4
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_fffb4.dir/link.txt --verbose=1
/usr/bin/cc -fPIC -DCHECK_FUNCTION_EXISTS=pthread_create   -rdynamic  CMakeFiles/cmTC_fffb4.dir/CheckFunctionExists.c.o  -o cmTC_fffb4 -lpthreads 
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_fffb4.dir/build.make:86: recipe for target 'cmTC_fffb4' failed
make[1]: *** [cmTC_fffb4] Error 1
make[1]: Leaving directory '/home/shi/wav2letter/flashlight/build/CMakeFiles/CMakeTmp'
Makefile:121: recipe for target 'cmTC_fffb4/fast' failed
make: *** [cmTC_fffb4/fast] Error 2


 

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 关于渗漏场的电场分布模拟
    • ¥24 matlab怎么修改仿真初始时间
    • ¥15 两分段线性回归模型分析阈值效应
    • ¥15 前端和后端代码都没报错,但是点登录没反应的?
    • ¥100 需要远程解决QSQLITE问题!
    • ¥15 利用光场表达式画出初始光场强度分布图像等几个问题在这两个图片里
    • ¥15 gozero求手把手教学,400一天
    • ¥15 泥浆冲清水的泥浆分布
    • ¥15 LASSO回归分析筛选关键基因,适合多大样本量?
    • ¥88 error: [polling_error] {"code":"ETELEGRAM","message":"ETELEGRAM: 502 Bad Gateway"}错误