Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output:
Change Dir: /public/home/zhangqha/sourcecode/source/examples/TensorFlow/Train/new/deepmd-kit/_skbuild/linux-x86_64-3.7/cmake-build/CMakeFiles/CMakeScratch/TryCompile-OmoCtd

Run Build Command(s):/tmp/pip-build-env-lda9y4a2/overlay/lib/python3.7/site-packages/ninja/data/bin/ninja cmTC_69a4f && [1/2] Building C object CMakeFiles/cmTC_69a4f.dir/src.c.o
[2/2] Linking C executable cmTC_69a4f
FAILED: cmTC_69a4f 
: && /opt/rh/devtoolset-7/root/usr/bin/cc   CMakeFiles/cmTC_69a4f.dir/src.c.o -o cmTC_69a4f   && :
CMakeFiles/cmTC_69a4f.dir/src.c.o: In function `main':
src.c:(.text+0x2d): undefined reference to `pthread_create'
src.c:(.text+0x39): undefined reference to `pthread_detach'
src.c:(.text+0x45): undefined reference to `pthread_cancel'
src.c:(.text+0x56): undefined reference to `pthread_join'
src.c:(.text+0x6a): undefined reference to `pthread_atfork'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.


Source file was:
#include <pthread.h>

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;
}


Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /public/home/zhangqha/sourcecode/source/examples/TensorFlow/Train/new/deepmd-kit/_skbuild/linux-x86_64-3.7/cmake-build/CMakeFiles/CMakeScratch/TryCompile-6Ylfpc

Run Build Command(s):/tmp/pip-build-env-lda9y4a2/overlay/lib/python3.7/site-packages/ninja/data/bin/ninja cmTC_61491 && [1/2] Building C object CMakeFiles/cmTC_61491.dir/CheckFunctionExists.c.o
[2/2] Linking C executable cmTC_61491
FAILED: cmTC_61491 
: && /opt/rh/devtoolset-7/root/usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create  CMakeFiles/cmTC_61491.dir/CheckFunctionExists.c.o -o cmTC_61491  -lpthreads && :
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.



