我正在尝试从 FreeBSD 8.4 中的源代码构建 LLVM。这是我执行的步骤
- 从http://llvm.org/releases/3.8.0/llvm-3.8.0.src.tar.xz下载源代码
- 将源提取到一个文件夹中。
- 创建了一个构建目录并在其中运行 $ cmake ../llvm-3.8.0.src
- 使用 $cmake --build 开始构建。
它抛出以下错误
/home/spangeni/llvm/llvm-3.8.0.src/lib/TableGen/TGLexer.cpp: In member function 'llvm::tgtok::TokKind llvm::TGLexer::LexNumber()':
/home/spangeni/llvm/llvm-3.8.0.src/lib/TableGen/TGLexer.cpp:393:48: error: 'strtoll' was not declared in this scope
CurIntVal = strtoll(NumStart, nullptr, 16);
^
/home/spangeni/llvm/llvm-3.8.0.src/lib/TableGen/TGLexer.cpp:398:60: error: 'strtoull' was not declared in this scope
CurIntVal = (int64_t)strtoull(NumStart, nullptr, 16);
^
/home/spangeni/llvm/llvm-3.8.0.src/lib/TableGen/TGLexer.cpp:414:47: error: 'strtoll' was not declared in this scope
CurIntVal = strtoll(NumStart, nullptr, 2);
^
/home/spangeni/llvm/llvm-3.8.0.src/lib/TableGen/TGLexer.cpp:429:44: error: 'strtoll' was not declared in this scope
CurIntVal = strtoll(TokStart, nullptr, 10);
GCC 版本 = 4.9.2 CMAKE 版本 = 3.2.3
我还尝试在文件 llvm-3.8.0.src/lib/TableGen/TGLexer.cpp 中包含 stdlib.h。这无济于事。
有没有我缺少的配置?