Clang 由于缺少变量,LLVM无法编译

Clang 由于缺少变量,LLVM无法编译,clang,llvm,clang++,llvm-clang,Clang,Llvm,Clang++,Llvm Clang,当我尝试使用以下命令编译llvm时, cmake“Unix生成文件”-DCMAKE\u BUILD\u TYPE=Debug~/llvm/1/llvm/ 我得到以下错误: CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the C

当我尝试使用以下命令编译llvm时,
cmake“Unix生成文件”-DCMAKE\u BUILD\u TYPE=Debug~/llvm/1/llvm/

我得到以下错误:

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
LIBCXXABI_LIBCXX_INCLUDES
   used as include directory in directory /home/salman/llvm/1/llvm/projects/libcxxabi/src
   used as include directory in directory /home/salman/llvm/1/llvm/projects/libcxxabi/src
   used as include directory in directory /home/salman/llvm/1/llvm/projects/libcxxabi/src
   used as include directory in directory /home/salman/llvm/1/llvm/projects/libcxxabi/src

为什么呢?我在谷歌上搜索过,但找不到可能的解决办法。

我刚刚解决了这个问题

看看:

将libcxx和libcxxabi签入llvm/projects


确保在llvm/projects中同时签出libcxx和libcxxabi。

您在源代码树中将
libcxx和
libcxxabi放置在哪里?此外,该项目还宣传其基于Autotools/Make和Cmake的功能,但实际上,它几乎基于Cmake。Makefiles在使用LLBD时有很多问题,并且不能使用LIBCXX和LIBCXXABI(从经验上讲)。好的。有两件事:1)我只是按照这里的教程。我不知道它是否明确下载了libvxx和libcxxabi。2) 我将我的
cmake
命令更改为
cmake-DCMAKE\u BUILD\u TYPE=Debug~/llvm/1/llvm/
,但仍然不起作用。“我不知道它是否明确下载了libvxx和libcxxabi”-不,你必须下载它。它有自己的下载页面在。也许这就是你的问题;)在Gentoo平台上,在我的Dawrin平台上,交叉编译linux时,这是有效的,但这并没有为我解决问题。还不知道为什么。