centos6 编译osquery出错

centos6 编译osquery出错

问题描述:

问题描述

目的:需要在centos6.10 上安装osquery

环境:centos6.10

内核: 2.6.32-431.el6.x86_64

步骤:

参考官网ubuntu18.04 编译步骤

https://osquery.readthedocs.io/en/stable/development/building/

# Build osquery
1.mkdir build; cd build
2.cmake -DOSQUERY_TOOLCHAIN_SYSROOT=/usr/local/osquery-toolchain ..
3.cmake --build . -j10 # where 10 is the number of parallel build jobs

在第2步发生如下错误:

CMake Error at /usr/local/share/cmake-3.14/Modules/CMakeTestCCompiler.cmake:60 (message):
  The C compiler
"/usr/local/osquery-toolchain/usr/bin/clang"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: /mnt/hgfs/share/osquery/source/osquery/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/gmake cmTC_cc220/fast 
/usr/bin/gmake -f CMakeFiles/cmTC_cc220.dir/build.make CMakeFiles/cmTC_cc220.dir/build
gmake[1]: Entering directory `/mnt/hgfs/share/osquery/source/osquery/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_cc220.dir/testCCompiler.c.o
/usr/local/osquery-toolchain/usr/bin/clang --sysroot=/usr/local/osquery-toolchain    -o CMakeFiles/cmTC_cc220.dir/testCCompiler.c.o   -c /mnt/hgfs/share/osquery/source/osquery/build/CMakeFiles/CMakeTmp/testCCompiler.c
Linking C executable cmTC_cc220
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_cc220.dir/link.txt --verbose=1
/usr/local/osquery-toolchain/usr/bin/clang --sysroot=/usr/local/osquery-toolchain      CMakeFiles/cmTC_cc220.dir/testCCompiler.c.o  -o cmTC_cc220 
ld.lld: error: cannot open output file cmTC_cc220: Input/output error
clang-8: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[1]: *** [cmTC_cc220] Error 1
gmake[1]: Leaving directory `/mnt/hgfs/share/osquery/source/osquery/build/CMakeFiles/CMakeTmp'
gmake: *** [cmTC_cc220/fast] Error 2

对cmake 不是很熟悉,不知以上问题发错误该定位于哪里?