Determining if the pthread_create exist failed with the following output: Change Dir: /var/tmp/portage/dev-ros/tf2-0.6.5/work/tf2-0.6.5_build/CMakeFiles/CMakeTmp Run Build Command(s):/usr/bin/gmake cmTC_c7443/fast /usr/bin/gmake -f CMakeFiles/cmTC_c7443.dir/build.make CMakeFiles/cmTC_c7443.dir/build gmake[1]: Entering directory '/var/tmp/portage/dev-ros/tf2-0.6.5/work/tf2-0.6.5_build/CMakeFiles/CMakeTmp' Building C object CMakeFiles/cmTC_c7443.dir/CheckSymbolExists.c.o /usr/bin/x86_64-pc-linux-gnu-gcc -DNDEBUG -O2 -pipe -march=native -o CMakeFiles/cmTC_c7443.dir/CheckSymbolExists.c.o -c /var/tmp/portage/dev-ros/tf2-0.6.5/work/tf2-0.6.5_build/CMakeFiles/CMakeTmp/CheckSymbolExists.c Linking C executable cmTC_c7443 /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_c7443.dir/link.txt --verbose=1 /usr/bin/x86_64-pc-linux-gnu-gcc -O2 -pipe -march=native -Wl,-O1 -Wl,--as-needed -rdynamic CMakeFiles/cmTC_c7443.dir/CheckSymbolExists.c.o -o cmTC_c7443 /usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: CMakeFiles/cmTC_c7443.dir/CheckSymbolExists.c.o: in function `main': CheckSymbolExists.c:(.text.startup+0x3): undefined reference to `pthread_create' collect2: error: ld returned 1 exit status gmake[1]: *** [CMakeFiles/cmTC_c7443.dir/build.make:87: cmTC_c7443] Error 1 gmake[1]: Leaving directory '/var/tmp/portage/dev-ros/tf2-0.6.5/work/tf2-0.6.5_build/CMakeFiles/CMakeTmp' gmake: *** [Makefile:121: cmTC_c7443/fast] Error 2 File /var/tmp/portage/dev-ros/tf2-0.6.5/work/tf2-0.6.5_build/CMakeFiles/CMakeTmp/CheckSymbolExists.c: /* */ #include int main(int argc, char** argv) { (void)argv; #ifndef pthread_create return ((int*)(&pthread_create))[argc]; #else (void)argc; return 0; #endif } Determining if the function pthread_create exists in the pthreads failed with the following output: Change Dir: /var/tmp/portage/dev-ros/tf2-0.6.5/work/tf2-0.6.5_build/CMakeFiles/CMakeTmp Run Build Command(s):/usr/bin/gmake cmTC_ec6ee/fast /usr/bin/gmake -f CMakeFiles/cmTC_ec6ee.dir/build.make CMakeFiles/cmTC_ec6ee.dir/build gmake[1]: Entering directory '/var/tmp/portage/dev-ros/tf2-0.6.5/work/tf2-0.6.5_build/CMakeFiles/CMakeTmp' Building C object CMakeFiles/cmTC_ec6ee.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_ec6ee.dir/CheckFunctionExists.c.o -c /usr/share/cmake/Modules/CheckFunctionExists.c Linking C executable cmTC_ec6ee /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_ec6ee.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_ec6ee.dir/CheckFunctionExists.c.o -o cmTC_ec6ee -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_ec6ee.dir/build.make:87: cmTC_ec6ee] Error 1 gmake[1]: Leaving directory '/var/tmp/portage/dev-ros/tf2-0.6.5/work/tf2-0.6.5_build/CMakeFiles/CMakeTmp' gmake: *** [Makefile:121: cmTC_ec6ee/fast] Error 2