什么时候从源代码构建Clang时需要libc ++源? [英] When is libc++ sources needed when building Clang from sources?
问题描述
在Linux和OS X上我一直在构建Clang多年。从 LLVM下载页,我一直使用以下来源:
- LLVM(LLVM源)
- 编译器工具(工具其他来源)
- LLVM (LLVM source)
- Compiler Front End (Clang source)
- Compiler RT (Runtime source)
- Compiler Tools (Tools Extra sources)
/ ul>
我使用下载,构建和安装Clang 3.5的食谱可以在 Clang 3.5下载,构建和安装脚本。
它在OS X 10.7和10.8上很好用,我从来不需要libc ++
问题:什么时候需要libc ++和什么时候需要libc ++? libc ++ ABI源?我试图帮助解决无法编译一个简单的C ++Hello World OS X 10.9。 Clang 3.5安装在 / usr / local
(就像其他),但是它没有找到标头(如< iostream>
)并且在链接期间遇到未定义的符号(例如std :: ostream :: operator<<(std :: ostream&(*)(std :: ostream& code>)。
我想知道10.7和10.8是否有标题和库,以前的版本的Clang期望,但10.9需要他们构建和安装。 / p>
问题:是缺少libc ++和libc ++ ABI的症状吗?
在构建/安装clang时,应该检查libc ++源代码,以便安装C ++ STL。
在你的系统上有一个libc ++运行时,你应该检查并安装libc ++ abi和libc ++,它可以独立完成,并且独立于你的llvm / clang安装中的checkout。
作为参考,我建议你看看在MacPorts的libcxxabi,libcxx,libunwind和llvm-XY端口,显示我如何配置这些项目通过Yosemite在Leopard上构建。
I've been building Clang for years on Linux and OS X. From the LLVM Download page, I've always used the following sources:
The recipe I am using to download, build and install Clang 3.5 can be found at Clang 3.5 download, build and install script.
Its works great on OS X 10.7 and 10.8, and I've never needed the libc++ gear on OS X 10.7.x or 10.8.x (that's about 2010 or so through current).
Question: when does one need the libc++ and libc++ ABI sources?
I'm trying to help troubleshoot the inability to compile a simple C++ "Hello World" program on OS X 10.9. Clang 3.5 installed in /usr/local
(just like the others), but its failing to find headers (like <iostream>
) and it encounters undefined symbols during link (like "std::ostream::operator<<(std::ostream& (*)(std::ostream&))"
).
I'm wondering if 10.7 and 10.8 had headers and libraries where previous versions of Clang expected, but 10.9 needs them built and installed.
Question: is this symptomatic of a missing libc++ and libc++ ABI?
You should have the libc++ sources checked out when building/installing clang such that you will also install the C++ STL.
If you don't have a libc++ runtime on your system, you should checkout and install libc++abi and libc++ which can be done standalone and independently of their checkout in your llvm/clang install.
As reference, I suggest you take a look at the libcxxabi, libcxx, libunwind, and llvm-X.Y ports in MacPorts which show how I've configured these projects to build on Leopard through Yosemite.
这篇关于什么时候从源代码构建Clang时需要libc ++源?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!