Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output: Change Dir: /var/tmp/portage/dev-libs/simdjson-0.7.0/work/simdjson-0.7.0_build/CMakeFiles/CMakeTmp Run Build Command(s):/usr/bin/ninja cmTC_dd505 && [1/2] Building C object CMakeFiles/cmTC_dd505.dir/src.c.o [2/2] Linking C executable cmTC_dd505 FAILED: cmTC_dd505 : && /usr/bin/x86_64-pc-linux-gnu-gcc -O2 -pipe -march=native -fno-diagnostics-color -falign-functions=32:25:16 -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 CMakeFiles/cmTC_dd505.dir/src.c.o -o cmTC_dd505 && : /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: CMakeFiles/cmTC_dd505.dir/src.c.o: in function `main': src.c:(.text.startup+0x25): undefined reference to `pthread_create' /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: src.c:(.text.startup+0x2e): undefined reference to `pthread_detach' /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: src.c:(.text.startup+0x37): undefined reference to `pthread_cancel' /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: src.c:(.text.startup+0x42): undefined reference to `pthread_join' collect2: error: ld returned 1 exit status ninja: build stopped: subcommand failed. Source file was: #include static 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; }