在FreeBSD 8.4

时间:2016-06-21 22:03:32

标签: llvm freebsd llvm-clang llvm-3.0

我正在尝试从FreeBSD 8.4中的源代码构建LLVM。 以下是我执行的步骤

  1. http://llvm.org/releases/3.8.0/llvm-3.8.0.src.tar.xz
  2. 下载了来源
  3. 将源提取到文件夹中。
  4. 创建了一个构建目录,里面运行了$ cmake ../ LLVM-3.8.0.src
  5. 使用$ cmake --build开始构建。
  6. 它会抛出以下错误

    /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);
    

    海湾合作委员会版本= 4.9.2 CMAKE版本= 3.2.3

    我还尝试在文件llvm-3.8.0.src / lib / TableGen / TGLexer.cpp中包含stdlib.h。这没有用。

    我缺少任何配置吗?

1 个答案:

答案 0 :(得分:2)

ports系统存在是有充分理由的 - 许多(几乎都是非常重要的)软件需要补丁和构建调整才能构建和正常工作。所以我的建议就是:使用Ports。

不确定端口是否实际支持FreeBSD 8.4。你有什么特别的理由使用这样一个旧版本吗?