You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

60 lines
3.2 KiB

Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output:
Change Dir: /media/internal/Programs/studio_build/templates/eez-flow-template-stm32f746g-disco/Src/build/linux/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/gmake cmTC_b58ec/fast && /usr/bin/gmake -f CMakeFiles/cmTC_b58ec.dir/build.make CMakeFiles/cmTC_b58ec.dir/build
gmake[1]: Entering directory '/media/internal/Programs/studio_build/templates/eez-flow-template-stm32f746g-disco/Src/build/linux/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_b58ec.dir/src.c.o
/usr/bin/cc -DCMAKE_HAVE_LIBC_PTHREAD -o CMakeFiles/cmTC_b58ec.dir/src.c.o -c /media/internal/Programs/studio_build/templates/eez-flow-template-stm32f746g-disco/Src/build/linux/CMakeFiles/CMakeTmp/src.c
Linking C executable cmTC_b58ec
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_b58ec.dir/link.txt --verbose=1
/usr/bin/cc -DCMAKE_HAVE_LIBC_PTHREAD CMakeFiles/cmTC_b58ec.dir/src.c.o -o cmTC_b58ec
/usr/bin/ld: CMakeFiles/cmTC_b58ec.dir/src.c.o: in function `main':
src.c:(.text+0x2f): undefined reference to `pthread_create'
/usr/bin/ld: src.c:(.text+0x3b): undefined reference to `pthread_detach'
/usr/bin/ld: src.c:(.text+0x47): undefined reference to `pthread_cancel'
/usr/bin/ld: src.c:(.text+0x58): undefined reference to `pthread_join'
collect2: error: ld returned 1 exit status
gmake[1]: *** [CMakeFiles/cmTC_b58ec.dir/build.make:106: cmTC_b58ec] Error 1
gmake[1]: Leaving directory '/media/internal/Programs/studio_build/templates/eez-flow-template-stm32f746g-disco/Src/build/linux/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:140: cmTC_b58ec/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_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: /media/internal/Programs/studio_build/templates/eez-flow-template-stm32f746g-disco/Src/build/linux/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/gmake cmTC_e000c/fast && /usr/bin/gmake -f CMakeFiles/cmTC_e000c.dir/build.make CMakeFiles/cmTC_e000c.dir/build
gmake[1]: Entering directory '/media/internal/Programs/studio_build/templates/eez-flow-template-stm32f746g-disco/Src/build/linux/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_e000c.dir/CheckFunctionExists.c.o
/usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTC_e000c.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.18/Modules/CheckFunctionExists.c
Linking C executable cmTC_e000c
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_e000c.dir/link.txt --verbose=1
/usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTC_e000c.dir/CheckFunctionExists.c.o -o cmTC_e000c -lpthreads
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
gmake[1]: *** [CMakeFiles/cmTC_e000c.dir/build.make:106: cmTC_e000c] Error 1
gmake[1]: Leaving directory '/media/internal/Programs/studio_build/templates/eez-flow-template-stm32f746g-disco/Src/build/linux/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:140: cmTC_e000c/fast] Error 2