编译出错后的 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