Determining if the pthread_create exist failed with the following output: Change Dir: /var/tmp/portage/media-libs/codec2-0.7/work/codec2-0.7-abi_x86_64.amd64/CMakeFiles/CMakeTmp Run Build Command:"/usr/bin/gmake" "cmTC_d232d/fast" /usr/bin/gmake -f CMakeFiles/cmTC_d232d.dir/build.make CMakeFiles/cmTC_d232d.dir/build gmake[1]: Entering directory '/var/tmp/portage/media-libs/codec2-0.7/work/codec2-0.7-abi_x86_64.amd64/CMakeFiles/CMakeTmp' Building C object CMakeFiles/cmTC_d232d.dir/CheckSymbolExists.c.o /usr/bin/x86_64-pc-linux-gnu-gcc -I/var/tmp/portage/media-libs/codec2-0.7/work/codec2-0.7-abi_x86_64.amd64/CMakeFiles/CMakeTmp/math.h -DNDEBUG -O2 -pipe -march=native -Wall -g -O3 -fPIC -o CMakeFiles/cmTC_d232d.dir/CheckSymbolExists.c.o -c /var/tmp/portage/media-libs/codec2-0.7/work/codec2-0.7-abi_x86_64.amd64/CMakeFiles/CMakeTmp/CheckSymbolExists.c Linking C executable cmTC_d232d /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_d232d.dir/link.txt --verbose=1 /usr/bin/x86_64-pc-linux-gnu-gcc -O2 -pipe -march=native -Wall -g -O3 -fPIC -Wl,-O1 -Wl,--as-needed -rdynamic CMakeFiles/cmTC_d232d.dir/CheckSymbolExists.c.o -o cmTC_d232d -lm CMakeFiles/cmTC_d232d.dir/CheckSymbolExists.c.o: In function `main': /var/tmp/portage/media-libs/codec2-0.7/work/codec2-0.7-abi_x86_64.amd64/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8: undefined reference to `pthread_create' collect2: error: ld returned 1 exit status gmake[1]: *** [CMakeFiles/cmTC_d232d.dir/build.make:87: cmTC_d232d] Error 1 gmake[1]: Leaving directory '/var/tmp/portage/media-libs/codec2-0.7/work/codec2-0.7-abi_x86_64.amd64/CMakeFiles/CMakeTmp' gmake: *** [Makefile:126: cmTC_d232d/fast] Error 2 File /var/tmp/portage/media-libs/codec2-0.7/work/codec2-0.7-abi_x86_64.amd64/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/media-libs/codec2-0.7/work/codec2-0.7-abi_x86_64.amd64/CMakeFiles/CMakeTmp Run Build Command:"/usr/bin/gmake" "cmTC_b2d0f/fast" /usr/bin/gmake -f CMakeFiles/cmTC_b2d0f.dir/build.make CMakeFiles/cmTC_b2d0f.dir/build gmake[1]: Entering directory '/var/tmp/portage/media-libs/codec2-0.7/work/codec2-0.7-abi_x86_64.amd64/CMakeFiles/CMakeTmp' Building C object CMakeFiles/cmTC_b2d0f.dir/CheckFunctionExists.c.o /usr/bin/x86_64-pc-linux-gnu-gcc -DNDEBUG -O2 -pipe -march=native -Wall -g -O3 -fPIC -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTC_b2d0f.dir/CheckFunctionExists.c.o -c /usr/share/cmake/Modules/CheckFunctionExists.c Linking C executable cmTC_b2d0f /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_b2d0f.dir/link.txt --verbose=1 /usr/bin/x86_64-pc-linux-gnu-gcc -O2 -pipe -march=native -Wall -g -O3 -fPIC -DCHECK_FUNCTION_EXISTS=pthread_create -Wl,-O1 -Wl,--as-needed -rdynamic CMakeFiles/cmTC_b2d0f.dir/CheckFunctionExists.c.o -o cmTC_b2d0f -lpthreads -lm /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lpthreads collect2: error: ld returned 1 exit status gmake[1]: *** [CMakeFiles/cmTC_b2d0f.dir/build.make:87: cmTC_b2d0f] Error 1 gmake[1]: Leaving directory '/var/tmp/portage/media-libs/codec2-0.7/work/codec2-0.7-abi_x86_64.amd64/CMakeFiles/CMakeTmp' gmake: *** [Makefile:126: cmTC_b2d0f/fast] Error 2