llvm - 在 KLEE Docker 上配置错误:C 编译器无法创建可执行文件
问题描述
我正在尝试使用基于https://klee.github.io/tutorials/testing-coreutils/上的步骤 3 的 klee docker 使用 LLVM 构建 Coreutils 。
但是我在运行时发现了一个问题:
CC=wllvm ../configure --disable-nls CFLAGS="-g -O1 -Xclang -disable-llvm-passes -D__NO_STRING_INLINES -D_FORTIFY_SOURCE=0 -U__OPTIMIZE__"
它说
checking for gcc... wllvm
checking whether the C compiler works... no
configure: error: in `/home/klee/coreutils-8.0/obj2':
configure: error: C compiler cannot create executables
See `config.log' for more details.
在运行上面的代码之前,我已经安装了 wllvm
pip install --upgrade wllvm
并且已经安装
Requirement already up-to-date: wllvm in /home/klee/.local/lib/python2.7/site-packages
但是虽然我已经安装了它,它仍然会产生错误,我不知道如何处理它,我使用了C 编译器中提供的解决方案 cannot create executables during build of Coreutils with LLVM,但没有什么不同,
之后,我按照https://github.com/travitch/whole-program-llvm/issues/68中的说明进行操作,据说使用 clang 而不是 wllvm。之后程序正在运行,但执行时再次出错
find . -executable -type f | xargs -I '{}' extract-bc '{}'
那说
xargs: extract-bc: No such file or directory
搜索任何来源后,我仍然无法解决。
这是未找到 wllvm 时 config.log 的一部分
../configure: line 4240: wllvm: command not found
configure:4249: $? = 127
configure:4269: checking whether the C compiler works
configure:4291: wllvm -g -O1 -Xclang -disable-llvm-passes -D__NO_STRING_INLINES -D_FORTIFY_SOURCE=0 -U__OPTIMIZE__ conftest.c >&5
../configure: line 4293: wllvm: command not found
configure:4295: $? = 127
configure:4333: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GNU coreutils"
| #define PACKAGE_TARNAME "coreutils"
| #define PACKAGE_VERSION "8.0"
| #define PACKAGE_STRING "GNU coreutils 8.0"
| #define PACKAGE_BUGREPORT "bug-coreutils@gnu.org"
| #define PACKAGE_URL "http://www.gnu.org/software/coreutils/"
| #define PACKAGE "coreutils"
| #define VERSION "8.0"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:4338: error: in `/home/klee/coreutils-8.0/obj-llvm':
configure:4342: error: C compiler cannot create executables
See `config.log' for more details.
解决方案
推荐阅读
- c++ - std::pair 的初始化列表
, 双> - windows - 自动安装 NDIS 过滤器驱动程序
- php - 通过 html 表单 php 加载、编辑和更新 xml 文件
- algorithm - 判断数组中是否有名人
- windows - WINDOWS“启动cmd”让我发疯(设置颜色)
- julia - 如何向 Julia 中的特定 URL 发出请求?
- python-3.6 - 在两个字符串中查找相同的单词序列
- python - 从按升序排序的数组中返回大于给定数字的最小数字的索引的 C 函数
- c - Windows WFP 驱动程序:在 ClassifyFn 回调中处理数据包时出现 BSOD
- ios13 - iOS 13 中 modalview 上的小栏