Page MenuHomec4science

CMakeError.log
No OneTemporary

File Metadata

Created
Wed, Nov 6, 13:39

CMakeError.log

Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output:
Change Dir: /home/lionel/EPFL/MA-3/PCSC/pcscproject/cmake-build-debug/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make cmTC_8c240/fast && /usr/bin/make -f CMakeFiles/cmTC_8c240.dir/build.make CMakeFiles/cmTC_8c240.dir/build
make[1]: Entering directory '/home/lionel/Documents/EPFL/MA-3/PCSC/pcscproject/cmake-build-debug/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_8c240.dir/src.c.o
/usr/bin/cc -DCMAKE_HAVE_LIBC_PTHREAD -o CMakeFiles/cmTC_8c240.dir/src.c.o -c /home/lionel/EPFL/MA-3/PCSC/pcscproject/cmake-build-debug/CMakeFiles/CMakeTmp/src.c
Linking C executable cmTC_8c240
/snap/clion/97/bin/cmake/linux/bin/cmake -E cmake_link_script CMakeFiles/cmTC_8c240.dir/link.txt --verbose=1
/usr/bin/cc -DCMAKE_HAVE_LIBC_PTHREAD -rdynamic CMakeFiles/cmTC_8c240.dir/src.c.o -o cmTC_8c240
CMakeFiles/cmTC_8c240.dir/src.c.o: In function `main':
src.c:(.text+0x3e): undefined reference to `pthread_create'
src.c:(.text+0x4a): undefined reference to `pthread_detach'
src.c:(.text+0x5b): undefined reference to `pthread_join'
src.c:(.text+0x6f): undefined reference to `pthread_atfork'
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_8c240.dir/build.make:86: recipe for target 'cmTC_8c240' failed
make[1]: *** [cmTC_8c240] Error 1
make[1]: Leaving directory '/home/lionel/Documents/EPFL/MA-3/PCSC/pcscproject/cmake-build-debug/CMakeFiles/CMakeTmp'
Makefile:121: recipe for target 'cmTC_8c240/fast' failed
make: *** [cmTC_8c240/fast] Error 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_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: /home/lionel/EPFL/MA-3/PCSC/pcscproject/cmake-build-debug/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make cmTC_ded9d/fast && /usr/bin/make -f CMakeFiles/cmTC_ded9d.dir/build.make CMakeFiles/cmTC_ded9d.dir/build
make[1]: Entering directory '/home/lionel/Documents/EPFL/MA-3/PCSC/pcscproject/cmake-build-debug/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_ded9d.dir/CheckFunctionExists.c.o
/usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTC_ded9d.dir/CheckFunctionExists.c.o -c /snap/clion/97/bin/cmake/linux/share/cmake-3.15/Modules/CheckFunctionExists.c
Linking C executable cmTC_ded9d
/snap/clion/97/bin/cmake/linux/bin/cmake -E cmake_link_script CMakeFiles/cmTC_ded9d.dir/link.txt --verbose=1
/usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create -rdynamic CMakeFiles/cmTC_ded9d.dir/CheckFunctionExists.c.o -o cmTC_ded9d -lpthreads
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_ded9d.dir/build.make:86: recipe for target 'cmTC_ded9d' failed
make[1]: *** [cmTC_ded9d] Error 1
make[1]: Leaving directory '/home/lionel/Documents/EPFL/MA-3/PCSC/pcscproject/cmake-build-debug/CMakeFiles/CMakeTmp'
Makefile:121: recipe for target 'cmTC_ded9d/fast' failed
make: *** [cmTC_ded9d/fast] Error 2

Event Timeline