构建Clang,libstdc ++ 4.6到libstdc ++ 4.7

asi*_*mes 9 llvm clang libstdc++

我想在此之后建立Clang:http://clang.llvm.org/get_started.html

在第6步,该命令../llvm/configure运行一系列检查,一个告诉我:

checking whether Clang will select a modern C++ standard library... no
configure: error:
We detected a missing feature in the standard C++ library that was known to be
missing in libstdc++4.6 and implemented in libstdc++4.7. There are numerous
C++11 problems with 4.6's library, and we don't support GCCs or libstdc++ older
than 4.7. You will need to update your system and ensure Clang uses the newer
standard library.

If this error is incorrect or you need to force things to work, you may pass
'--disable-compiler-version-checks' to configure to bypass this test.
Run Code Online (Sandbox Code Playgroud)

我不知道如何解决这个问题,谷歌搜索libstdc ++ 4.7并没有产生任何对我有用的东西或我理解的东西.如何更换/升级?我在Mac上(10.7.5)

小智 9

我遇到了同样的问题.构建Clang的最简单方法是使用libc ++而不是libstdc ++.如果您没有libc ++,可以通过安装XCode 4.2(或更新版本)来获取它,或者您可以按照此处的说明自行构建:http://libcxx.llvm.org/

安装libc ++后,可以在configure命令中使用--enable-libcpp = yes标志.


Eli*_*sky 7

就在本周,LLVM&Clang项目将其最低编译器版本要求提升到gcc 4.7及其libstdc ++.您需要安装或构建更新的gcc.

这是我今天早些时候写的关于在Ubuntu 12.04上构建gcc 4.8并使用它来编译主干LLVM和Clang 的博客文章.希望这可以帮助!