Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output: Change Dir: /var/tmp/portage/dev-ros/imu_filter_madgwick-1.2.1/work/imu_filter_madgwick-1.2.1_build/CMakeFiles/CMakeTmp Run Build Command(s):/usr/bin/gmake cmTC_c29b9/fast && /usr/bin/gmake -f CMakeFiles/cmTC_c29b9.dir/build.make CMakeFiles/cmTC_c29b9.dir/build gmake[1]: Entering directory '/var/tmp/portage/dev-ros/imu_filter_madgwick-1.2.1/work/imu_filter_madgwick-1.2.1_build/CMakeFiles/CMakeTmp' Building C object CMakeFiles/cmTC_c29b9.dir/src.c.o /usr/bin/x86_64-pc-linux-gnu-gcc -DNDEBUG -O2 -pipe -march=native -DCMAKE_HAVE_LIBC_PTHREAD -o CMakeFiles/cmTC_c29b9.dir/src.c.o -c /var/tmp/portage/dev-ros/imu_filter_madgwick-1.2.1/work/imu_filter_madgwick-1.2.1_build/CMakeFiles/CMakeTmp/src.c Linking C executable cmTC_c29b9 /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_c29b9.dir/link.txt --verbose=1 /usr/bin/x86_64-pc-linux-gnu-gcc -O2 -pipe -march=native -DCMAKE_HAVE_LIBC_PTHREAD -Wl,-O1 -Wl,--as-needed -rdynamic CMakeFiles/cmTC_c29b9.dir/src.c.o -o cmTC_c29b9 /usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: CMakeFiles/cmTC_c29b9.dir/src.c.o: in function `main': src.c:(.text.startup+0x23): undefined reference to `pthread_create' /usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: src.c:(.text.startup+0x2c): undefined reference to `pthread_detach' /usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: src.c:(.text.startup+0x37): undefined reference to `pthread_join' collect2: error: ld returned 1 exit status gmake[1]: *** [CMakeFiles/cmTC_c29b9.dir/build.make:87: cmTC_c29b9] Error 1 gmake[1]: Leaving directory '/var/tmp/portage/dev-ros/imu_filter_madgwick-1.2.1/work/imu_filter_madgwick-1.2.1_build/CMakeFiles/CMakeTmp' gmake: *** [Makefile:121: cmTC_c29b9/fast] Error 2 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_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: /var/tmp/portage/dev-ros/imu_filter_madgwick-1.2.1/work/imu_filter_madgwick-1.2.1_build/CMakeFiles/CMakeTmp Run Build Command(s):/usr/bin/gmake cmTC_a5ec0/fast && /usr/bin/gmake -f CMakeFiles/cmTC_a5ec0.dir/build.make CMakeFiles/cmTC_a5ec0.dir/build gmake[1]: Entering directory '/var/tmp/portage/dev-ros/imu_filter_madgwick-1.2.1/work/imu_filter_madgwick-1.2.1_build/CMakeFiles/CMakeTmp' Building C object CMakeFiles/cmTC_a5ec0.dir/CheckFunctionExists.c.o /usr/bin/x86_64-pc-linux-gnu-gcc -DNDEBUG -O2 -pipe -march=native -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTC_a5ec0.dir/CheckFunctionExists.c.o -c /usr/share/cmake/Modules/CheckFunctionExists.c Linking C executable cmTC_a5ec0 /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_a5ec0.dir/link.txt --verbose=1 /usr/bin/x86_64-pc-linux-gnu-gcc -O2 -pipe -march=native -DCHECK_FUNCTION_EXISTS=pthread_create -Wl,-O1 -Wl,--as-needed -rdynamic CMakeFiles/cmTC_a5ec0.dir/CheckFunctionExists.c.o -o cmTC_a5ec0 -lpthreads /usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lpthreads collect2: error: ld returned 1 exit status gmake[1]: *** [CMakeFiles/cmTC_a5ec0.dir/build.make:87: cmTC_a5ec0] Error 1 gmake[1]: Leaving directory '/var/tmp/portage/dev-ros/imu_filter_madgwick-1.2.1/work/imu_filter_madgwick-1.2.1_build/CMakeFiles/CMakeTmp' gmake: *** [Makefile:121: cmTC_a5ec0/fast] Error 2