gpt4 book ai didi

c++ - 无法构建 lldb - 找不到 'atomic' 文件

转载 作者:搜寻专家 更新时间:2023-10-31 01:43:35 26 4
gpt4 key购买 nike

我正在尝试构建 lldb,它是 Clang/LLVM 3.4.2 下载的一部分,地址为 LLVM Download Page .

我可以构建 LLVM、Clang、Compiler-RT 和 Extras。但是,当我将 LLDB 添加到我的配方时,构建失败:

llvm[3]: Compiling lldb.cpp for Release+Asserts build
llvm[3]: Compiling lldb-log.cpp for Release+Asserts build
In file included from /Users/jeffrey/Clang-3.4.2/llvm/tools/lldb/source/lldb-log.cpp:10:
In file included from /Users/jeffrey/Clang-3.4.2/llvm/tools/lldb/source/../include/lldb/lldb-private-log.h:17:
In file included from /Users/jeffrey/Clang-3.4.2/llvm/tools/lldb/source/../include/lldb/lldb-private.h:19:
In file included from /Users/jeffrey/Clang-3.4.2/llvm/tools/lldb/source/../include/lldb/lldb-public.h:13:
In file included from /Users/jeffrey/Clang-3.4.2/llvm/tools/lldb/source/../include/lldb/lldb-defines.h:13:
In file included from /Users/jeffrey/Clang-3.4.2/llvm/tools/lldb/source/../include/lldb/lldb-types.h:14:
In file included from /Users/jeffrey/Clang-3.4.2/llvm/tools/lldb/source/../include/lldb/lldb-forward.h:15:
/Users/jeffrey/Clang-3.4.2/llvm/tools/lldb/source/../include/lldb/Utility/SharingPtr.h:22:10: fatal error:
'atomic' file not found
#include <atomic>
^
In file included from /Users/jeffrey/Clang-3.4.2/llvm/tools/lldb/source/lldb.cpp:12:
In file included from /Users/jeffrey/Clang-3.4.2/llvm/tools/lldb/source/../include/lldb/lldb-private.h:19:
In file included from /Users/jeffrey/Clang-3.4.2/llvm/tools/lldb/source/../include/lldb/lldb-public.h:13:
In file included from /Users/jeffrey/Clang-3.4.2/llvm/tools/lldb/source/../include/lldb/lldb-defines.h:13:
In file included from /Users/jeffrey/Clang-3.4.2/llvm/tools/lldb/source/../include/lldb/lldb-types.h:14:
In file included from /Users/jeffrey/Clang-3.4.2/llvm/tools/lldb/source/../include/lldb/lldb-forward.h:15:
/Users/jeffrey/Clang-3.4.2/llvm/tools/lldb/source/../include/lldb/Utility/SharingPtr.h:22:10: fatal error:
'atomic' file not found
#include <atomic>
^
1 error generated.

根据 Building LLDB 的要求,LLDB 在 Clang 旁边被解压:

llvm
|
`-- tools
|
+-- clang
|
`-- lldb

LLDB 正在按要求在构建目录中构建(其他所有内容也是如此):

mkdir build
cd build
../llvm/configure --enable-optimized --prefix=/usr/local
make -j4

我在 LLDB @ Mac OSX: build on Snow Leopard (still) supported? 上发现了一个类似的问题。 .但是,建议的解决方案是从命令行使用 xcodebuild 转动一些旋钮。我没有使用 Xcode,所以它不是我的替代品。

我的环境是 OS X 10.8.5,x64,已完全修补。 Xcode 版本 5.1.1 (5B1008)。我在 usr/local/ 中安装了 Clang 3.4.2(没有 lldb),但我不相信它被使用了。

如何从命令行构建 lldb?

最佳答案

在运行“配置”脚本时添加“--enable-cxx11”开关。

默认情况下,c++11 是禁用的。

有关更多信息,请运行“configure --help”

关于c++ - 无法构建 lldb - 找不到 'atomic' 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24909597/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com