JGbooks 2019-10-17 11:55 采纳率: 0%
浏览 418
已结题

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 不是很熟悉,不知以上问题发错误该定位于哪里?
  • 写回答

1条回答 默认 最新

  • zqbnqsdsmd 2019-10-17 13:05
    关注
    评论

报告相同问题?

悬赏问题

  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python
  • ¥15 要给毕业设计添加扫码登录的功能!!有偿
  • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥15 stable diffusion
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘