0

我正在寻找一些帮助,以解决在使用 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 whether the compiler works...no
configure: error: in '/home/abhinath/coreutils/obj-llvm
configure: error: c compiler cannot create executables

我已经export LLVM_COMPILER=clang事先运行了命令

我已经使用命令在我的 Ubuntu 操作系统上安装并设置了clang-6.0clang++-6.0

sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-6.0 1000
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-6.0 1000
sudo update-alternatives --config clang
sudo update-alternatives --config clang++

可以在此处查看生成错误的 config.log 文件,该文件还显示 wllvm: command not found

https://drive.google.com/open?id=1ExbLhT2tWRyGSAb67mAgu6D9y3AknZ2v

4

1 回答 1

1

通常,/usr/local系统目录中不包含任何内容。

而一个非标准的位置usr/local/lib/python2.7/site-packages/some-directory更是如此。

您需要找到程序的确切位置(如完整路径和绝对路径),wllvm然后使用该完整路径或将其目录添加到PATH环境变量中。

于 2020-03-20T20:23:54.553 回答