You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
下面是build/CMakeFiles/CMakeError.log的日志,请问应该如何处理
Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output:
Change Dir: /opt/Forward/build/CMakeFiles/CMakeTmp
tensorrt 版本:6.0.1.5
CUDA :10.1
下面是build/CMakeFiles/CMakeError.log的日志,请问应该如何处理
Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output:
Change Dir: /opt/Forward/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/gmake cmTC_fe5dd/fast && /usr/bin/gmake -f CMakeFiles/cmTC_fe5dd.dir/build.make CMakeFiles/cmTC_fe5dd.dir/build
gmake[1]: 进入目录“/opt/Forward/build/CMakeFiles/CMakeTmp”
Building C object CMakeFiles/cmTC_fe5dd.dir/src.c.o
/opt/rh/devtoolset-7/root/usr/bin/cc -fPIC -DCMAKE_HAVE_LIBC_PTHREAD -o CMakeFiles/cmTC_fe5dd.dir/src.c.o -c /opt/Forward/build/CMakeFiles/CMakeTmp/src.c
Linking C executable cmTC_fe5dd
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_fe5dd.dir/link.txt --verbose=1
/opt/rh/devtoolset-7/root/usr/bin/cc -fPIC -DCMAKE_HAVE_LIBC_PTHREAD CMakeFiles/cmTC_fe5dd.dir/src.c.o -o cmTC_fe5dd
CMakeFiles/cmTC_fe5dd.dir/src.c.o:在函数‘main’中:
src.c:(.text+0x2f):对‘pthread_create’未定义的引用
src.c:(.text+0x3b):对‘pthread_detach’未定义的引用
src.c:(.text+0x47):对‘pthread_cancel’未定义的引用
src.c:(.text+0x58):对‘pthread_join’未定义的引用
src.c:(.text+0x6c):对‘pthread_atfork’未定义的引用
collect2: error: ld returned 1 exit status
gmake[1]: *** [cmTC_fe5dd] 错误 1
gmake[1]: 离开目录“/opt/Forward/build/CMakeFiles/CMakeTmp”
gmake: *** [cmTC_fe5dd/fast] 错误 2
Source file was:
#include <pthread.h>
void* test_func(void* data)
{
return data;
}
int main(void)
{
pthread_t thread;
pthread_create(&thread, NULL, test_func, NULL);
pthread_detach(thread);
pthread_cancel(thread);
pthread_join(thread, NULL);
pthread_atfork(NULL, NULL, NULL);
pthread_exit(NULL);
return 0;
}
Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /opt/Forward/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/gmake cmTC_cbc42/fast && /usr/bin/gmake -f CMakeFiles/cmTC_cbc42.dir/build.make CMakeFiles/cmTC_cbc42.dir/build
gmake[1]: 进入目录“/opt/Forward/build/CMakeFiles/CMakeTmp”
Building C object CMakeFiles/cmTC_cbc42.dir/CheckFunctionExists.c.o
/opt/rh/devtoolset-7/root/usr/bin/cc -fPIC -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTC_cbc42.dir/CheckFunctionExists.c.o -c /usr/local/share/cmake-3.17/Modules/CheckFunctionExists.c
Linking C executable cmTC_cbc42
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_cbc42.dir/link.txt --verbose=1
/opt/rh/devtoolset-7/root/usr/bin/cc -fPIC -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTC_cbc42.dir/CheckFunctionExists.c.o -o cmTC_cbc42 -lpthreads
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: 找不到 -lpthreads
collect2: error: ld returned 1 exit status
gmake[1]: *** [cmTC_cbc42] 错误 1
gmake[1]: 离开目录“/opt/Forward/build/CMakeFiles/CMakeTmp”
gmake: *** [cmTC_cbc42/fast] 错误 2
The text was updated successfully, but these errors were encountered: