Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output: Change Dir: /home/naourr/work/instance-1/output-1/build/pistache-73f248acd6db4c53e6604577b7e13fd5e756f96f/CMakeFiles/CMakeTmp Run Build Command(s):/usr/bin/gmake cmTC_a6f76/fast && gmake[1]: Entering directory '/home/naourr/work/instance-1/output-1/build/pistache-73f248acd6db4c53e6604577b7e13fd5e756f96f/CMakeFiles/CMakeTmp' /usr/bin/gmake -f CMakeFiles/cmTC_a6f76.dir/build.make CMakeFiles/cmTC_a6f76.dir/build gmake[2]: Entering directory '/home/naourr/work/instance-1/output-1/build/pistache-73f248acd6db4c53e6604577b7e13fd5e756f96f/CMakeFiles/CMakeTmp' Building C object CMakeFiles/cmTC_a6f76.dir/src.c.o /home/naourr/work/instance-1/output-1/host/bin/nios2-linux-gcc --sysroot=/home/naourr/work/instance-1/output-1/host/nios2-buildroot-linux-gnu/sysroot -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g2 -D_FORTIFY_SOURCE=2 -DCMAKE_HAVE_LIBC_PTHREAD -o CMakeFiles/cmTC_a6f76.dir/src.c.o -c /home/naourr/work/instance-1/output-1/build/pistache-73f248acd6db4c53e6604577b7e13fd5e756f96f/CMakeFiles/CMakeTmp/src.c Linking C executable cmTC_a6f76 /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_a6f76.dir/link.txt --verbose=1 /home/naourr/work/instance-1/output-1/host/bin/nios2-linux-gcc --sysroot=/home/naourr/work/instance-1/output-1/host/nios2-buildroot-linux-gnu/sysroot -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g2 -D_FORTIFY_SOURCE=2 -DCMAKE_HAVE_LIBC_PTHREAD CMakeFiles/cmTC_a6f76.dir/src.c.o -o cmTC_a6f76 /home/naourr/work/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/nios2-buildroot-linux-gnu/8.3.0/../../../../nios2-buildroot-linux-gnu/bin/ld: CMakeFiles/cmTC_a6f76.dir/src.c.o: in function `main': /home/naourr/work/instance-1/output-1/build/pistache-73f248acd6db4c53e6604577b7e13fd5e756f96f/CMakeFiles/CMakeTmp/src.c:11: undefined reference to `pthread_create' /home/naourr/work/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/nios2-buildroot-linux-gnu/8.3.0/../../../../nios2-buildroot-linux-gnu/bin/ld: /home/naourr/work/instance-1/output-1/build/pistache-73f248acd6db4c53e6604577b7e13fd5e756f96f/CMakeFiles/CMakeTmp/src.c:12: undefined reference to `pthread_detach' /home/naourr/work/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/nios2-buildroot-linux-gnu/8.3.0/../../../../nios2-buildroot-linux-gnu/bin/ld: /home/naourr/work/instance-1/output-1/build/pistache-73f248acd6db4c53e6604577b7e13fd5e756f96f/CMakeFiles/CMakeTmp/src.c:13: undefined reference to `pthread_cancel' /home/naourr/work/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/nios2-buildroot-linux-gnu/8.3.0/../../../../nios2-buildroot-linux-gnu/bin/ld: /home/naourr/work/instance-1/output-1/build/pistache-73f248acd6db4c53e6604577b7e13fd5e756f96f/CMakeFiles/CMakeTmp/src.c:14: undefined reference to `pthread_join' collect2: error: ld returned 1 exit status gmake[2]: *** [CMakeFiles/cmTC_a6f76.dir/build.make:107: cmTC_a6f76] Error 1 gmake[2]: Leaving directory '/home/naourr/work/instance-1/output-1/build/pistache-73f248acd6db4c53e6604577b7e13fd5e756f96f/CMakeFiles/CMakeTmp' gmake[1]: *** [Makefile:141: cmTC_a6f76/fast] Error 2 gmake[1]: Leaving directory '/home/naourr/work/instance-1/output-1/build/pistache-73f248acd6db4c53e6604577b7e13fd5e756f96f/CMakeFiles/CMakeTmp' Source file was: #include 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; }