centos6 编译osquery出错 20C

问题描述

目的:需要在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 不是很熟悉,不知以上问题发错误该定位于哪里?
qq_36219792
JGbooks 抱歉,官方发布的osquery 支持2.6.32 内核,因此可以直接使用安装包
8 个月之前 回复

1个回答

qq_36219792
JGbooks 文件格式导致?
8 个月之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐