0

我正在尝试使用基于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.
4

0 回答 0