Determining if the pthread_create exist failed with the following output: Change Dir: /var/tmp/portage/dev-db/clickhouse-18.12.17/work/clickhouse-18.12.17_build/CMakeFiles/CMakeTmp Run Build Command(s):/usr/bin/ninja cmTC_872a7 [1/2] Building C object CMakeFiles/cmTC_872a7.dir/CheckSymbolExists.c.o [2/2] Linking C executable cmTC_872a7 FAILED: cmTC_872a7 : && /usr/bin/x86_64-pc-linux-gnu-gcc -O2 -pipe -march=native -fdiagnostics-color=always -pipe -msse4.1 -msse4.2 -mpopcnt -fno-omit-frame-pointer -Wall -Wl,-O1 -Wl,--as-needed -rdynamic CMakeFiles/cmTC_872a7.dir/CheckSymbolExists.c.o -o cmTC_872a7 && : /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: CMakeFiles/cmTC_872a7.dir/CheckSymbolExists.c.o: in function `main': CheckSymbolExists.c:(.text.startup+0x3): undefined reference to `pthread_create' collect2: error: ld returned 1 exit status ninja: build stopped: subcommand failed. File /var/tmp/portage/dev-db/clickhouse-18.12.17/work/clickhouse-18.12.17_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 } Performing C++ SOURCE FILE Test HAVE_UNW_INIT_LOCAL2 failed with the following output: Change Dir: /var/tmp/portage/dev-db/clickhouse-18.12.17/work/clickhouse-18.12.17_build/CMakeFiles/CMakeTmp Run Build Command(s):/usr/bin/ninja cmTC_3d302 [1/2] Building CXX object CMakeFiles/cmTC_3d302.dir/src.cxx.o FAILED: CMakeFiles/cmTC_3d302.dir/src.cxx.o /usr/bin/x86_64-pc-linux-gnu-g++ -DNDEBUG -O2 -pipe -march=native -fdiagnostics-color=always -pipe -msse4.1 -msse4.2 -mpopcnt -fno-omit-frame-pointer -Wall -Wnon-virtual-dtor -DHAVE_UNW_INIT_LOCAL2 -fPIE -o CMakeFiles/cmTC_3d302.dir/src.cxx.o -c src.cxx src.cxx: In function ‘int main()’: src.cxx:8:43: error: ‘UNW_INIT_SIGNAL_FRAME’ was not declared in this scope unw_init_local2(&cursor, &context, UNW_INIT_SIGNAL_FRAME); ^~~~~~~~~~~~~~~~~~~~~ src.cxx:8:8: error: ‘unw_init_local2’ was not declared in this scope unw_init_local2(&cursor, &context, UNW_INIT_SIGNAL_FRAME); ^~~~~~~~~~~~~~~ src.cxx:8:8: note: suggested alternative: ‘unw_init_local’ unw_init_local2(&cursor, &context, UNW_INIT_SIGNAL_FRAME); ^~~~~~~~~~~~~~~ unw_init_local ninja: build stopped: subcommand failed. Source file was: #include #define UNW_LOCAL_ONLY #include int main () { ucontext_t context; unw_cursor_t cursor; unw_init_local2(&cursor, &context, UNW_INIT_SIGNAL_FRAME); return 0; }