使用LLVM构建Coreutils期间,C编译器无法创建可执行文件 [英] C compiler cannot create executables during build of Coreutils with LLVM
问题描述
我正在寻找帮助,以解决在使用llvm的Coreutils的configure命令期间弹出的错误的解决方案.
I am looking for some assistance in figuring out the solution to an error that pops up during the configure command of Coreutils with llvm.
我使用以下命令:
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 OS上安装并设置了 clang-6.0 和 clang ++-6.0
I have installed and set up clang-6.0 and clang++-6.0 on my Ubuntu OS using the commands
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:找不到命令
:
The config.log file with errors generated can be viewed here, which also shows
wllvm: command not found
:
https://drive.google.com/open?id=1ExbLhT2tWRyGSAb67mAgu6D9y3AknZ2
推荐答案
通常,系统目录中不包含/usr/local
中的任何内容.
Typically, nothing in /usr/local
is included in the system directories.
非标准位置(例如 usr/local/lib/python2.7/site-packages/some-directory
)更是如此.
And a non-standard location like usr/local/lib/python2.7/site-packages/some-directory
even less so.
您需要找到 wllvm
程序的确切位置(在完整路径和绝对路径中),然后使用该完整路径或将其目录添加到 PATH
环境变量.
You need to find the exact location (as in full and absolute path) of the wllvm
program and either use that full path or add its directory to the PATH
environment variable.
这篇关于使用LLVM构建Coreutils期间,C编译器无法创建可执行文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!