我正在尝试运行python脚本,但是在运行它时偶然发现了以下错误。
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
P2PSP_LIBRARY
linked by target "splitter" in directory /home/billy/Desktop/p2psp-console-master
linked by target "peer" in directory /home/billy/Desktop/p2psp-console-master
-- Configuring incomplete, errors occurred!
See also "/home/billy/Desktop/p2psp-console-master/build/CMakeFiles/CMakeOutput.log".
See also "/home/billy/Desktop/p2psp-console-master/build/CMakeFiles/CMakeError.log".
这是我的cmake错误日志。
Determining if the pthread_create exist failed with the following output:
Change Dir: /home/billy/Desktop/p2psp-console-master/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTryCompileExec2187325408/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec2187325408.dir/build.make CMakeFiles/cmTryCompileExec2187325408.dir/build
make[1]: Entering directory '/home/billy/Desktop/p2psp-console-master/build/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /home/billy/Desktop/p2psp-console-master/build/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec2187325408.dir/CheckSymbolExists.c.o
/usr/bin/cc -o CMakeFiles/cmTryCompileExec2187325408.dir/CheckSymbolExists.c.o -c /home/billy/Desktop/p2psp-console-master/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTryCompileExec2187325408
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec2187325408.dir/link.txt --verbose=1
/usr/bin/cc CMakeFiles/cmTryCompileExec2187325408.dir/CheckSymbolExists.c.o -o cmTryCompileExec2187325408 -rdynamic
CMakeFiles/cmTryCompileExec2187325408.dir/CheckSymbolExists.c.o: In function `main':
CheckSymbolExists.c:(.text+0x16): undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
CMakeFiles/cmTryCompileExec2187325408.dir/build.make:88: recipe for target 'cmTryCompileExec2187325408' failed
make[1]: *** [cmTryCompileExec2187325408] Error 1
make[1]: Leaving directory '/home/billy/Desktop/p2psp-console-master/build/CMakeFiles/CMakeTmp'
Makefile:117: recipe for target 'cmTryCompileExec2187325408/fast' failed
make: *** [cmTryCompileExec2187325408/fast] Error 2
File /home/billy/Desktop/p2psp-console-master/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/billy/Desktop/p2psp-console-master/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTryCompileExec2407202235/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec2407202235.dir/build.make CMakeFiles/cmTryCompileExec2407202235.dir/build
make[1]: Entering directory '/home/billy/Desktop/p2psp-console-master/build/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /home/billy/Desktop/p2psp-console-master/build/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec2407202235.dir/CheckFunctionExists.c.o
/usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTryCompileExec2407202235.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.2/Modules/CheckFunctionExists.c
Linking C executable cmTryCompileExec2407202235
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec2407202235.dir/link.txt --verbose=1
/usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTryCompileExec2407202235.dir/CheckFunctionExists.c.o -o cmTryCompileExec2407202235 -rdynamic -lpthreads
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
CMakeFiles/cmTryCompileExec2407202235.dir/build.make:88: recipe for target 'cmTryCompileExec2407202235' failed
make[1]: *** [cmTryCompileExec2407202235] Error 1
make[1]: Leaving directory '/home/billy/Desktop/p2psp-console-master/build/CMakeFiles/CMakeTmp'
Makefile:117: recipe for target 'cmTryCompileExec2407202235/fast' failed
make: *** [cmTryCompileExec2407202235/fast] Error 2
Determining if the pthread_create exist failed with the following output:
Change Dir: /home/billy/Desktop/p2psp-console-master/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTryCompileExec1093226452/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec1093226452.dir/build.make CMakeFiles/cmTryCompileExec1093226452.dir/build
make[1]: Entering directory '/home/billy/Desktop/p2psp-console-master/build/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /home/billy/Desktop/p2psp-console-master/build/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec1093226452.dir/CheckSymbolExists.c.o
/usr/bin/cc -o CMakeFiles/cmTryCompileExec1093226452.dir/CheckSymbolExists.c.o -c /home/billy/Desktop/p2psp-console-master/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTryCompileExec1093226452
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec1093226452.dir/link.txt --verbose=1
/usr/bin/cc CMakeFiles/cmTryCompileExec1093226452.dir/CheckSymbolExists.c.o -o cmTryCompileExec1093226452 -rdynamic
CMakeFiles/cmTryCompileExec1093226452.dir/CheckSymbolExists.c.o: In function `main':
CheckSymbolExists.c:(.text+0x16): undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
CMakeFiles/cmTryCompileExec1093226452.dir/build.make:88: recipe for target 'cmTryCompileExec1093226452' failed
make[1]: *** [cmTryCompileExec1093226452] Error 1
make[1]: Leaving directory '/home/billy/Desktop/p2psp-console-master/build/CMakeFiles/CMakeTmp'
Makefile:117: recipe for target 'cmTryCompileExec1093226452/fast' failed
make: *** [cmTryCompileExec1093226452/fast] Error 2
File /home/billy/Desktop/p2psp-console-master/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/billy/Desktop/p2psp-console-master/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTryCompileExec3293591889/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec3293591889.dir/build.make CMakeFiles/cmTryCompileExec3293591889.dir/build
make[1]: Entering directory '/home/billy/Desktop/p2psp-console-master/build/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /home/billy/Desktop/p2psp-console-master/build/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec3293591889.dir/CheckFunctionExists.c.o
/usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTryCompileExec3293591889.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.2/Modules/CheckFunctionExists.c
Linking C executable cmTryCompileExec3293591889
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec3293591889.dir/link.txt --verbose=1
/usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTryCompileExec3293591889.dir/CheckFunctionExists.c.o -o cmTryCompileExec3293591889 -rdynamic -lpthreads
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
CMakeFiles/cmTryCompileExec3293591889.dir/build.make:88: recipe for target 'cmTryCompileExec3293591889' failed
make[1]: *** [cmTryCompileExec3293591889] Error 1
make[1]: Leaving directory '/home/billy/Desktop/p2psp-console-master/build/CMakeFiles/CMakeTmp'
Makefile:117: recipe for target 'cmTryCompileExec3293591889/fast' failed
make: *** [cmTryCompileExec3293591889/fast] Error 2
我一直在尝试不同的解决方案。但同样的错误一次又一次地发生。谁能建议我一个解决方案?提前谢谢。