【问题标题】:Unable to build llvm on cygwin无法在 cygwin 上构建 llvm
【发布时间】:2013-09-22 05:29:39
【问题描述】:

我目前正在尝试通过 Cygwin 在 Windows 上构建 llvm 3.3。

编译正常,但在链接过程中构建崩溃并出现此错误:

llvm[2]: ======= Finished Linking Release+Asserts Executable llvm-mc (without symbols)
make[2]: Leaving directory `/cygdrive/c/Users/Jupotter/Code/llvm-3.3.src/build/tools/llvm-mc'
llvm[2]: Compiling ExecutionDriver.cpp for Release+Asserts build
/cygdrive/c/Users/Jupotter/Code/llvm-3.3.src/build/Release+Asserts/lib/libLLVMMCJIT.a(SectionMemoryManager.o):SectionMemoryManager.cpp:(.text+0x3b): référence indéfinie vers « __register_frame »
/cygdrive/c/Users/Jupotter/Code/llvm-3.3.src/build/Release+Asserts/lib/libLLVMMCJIT.a(SectionMemoryManager.o):SectionMemoryManager.cpp:(.text+0x3b): relocalisation tronquée pour concorder avec la taille: R_X86_64_PC32 vers le symbole indéfini __register_frame
/usr/lib/gcc/x86_64-pc-cygwin/4.8.1/../../../../x86_64-pc-cygwin/bin/ld: /cygdrive/c/Users/Jupotter/Code/llvm-3.3.src/build/Release+Asserts/lib/libLLVMMCJIT.a(SectionMemoryManager.o): mauvaise adresse de relocalisation 0x0 dans la section «.pdata»

英文:

undefined reference to "__register_frame
relocation truncated to concord with size: R_X*^_^$_PC32 to undefined symbol __register_frame
wrong relocation address in 0x0 in section ".pdata"

我使用这些命令构建 llvm:

$ mkdir build
$ cd build
$ ../configure LDFLAGS=-Wl,--stack,16777216 --disable-jit --enable-targets=host-only
$ make -j4

LDFLAGS 选项来自 llvm getting started guide 用于 win64 平台。我尝试禁用 jit,因为它似乎是 libLLVMCJIT 有问题的地方。

知道什么会导致此构建失败吗?

【问题讨论】:

标签: build cygwin llvm


【解决方案1】:

我在 Cygwin(x86_64) 上编译 llvm 时遇到了同样的错误。但是我可以在 Cygwin(x86) 上编译成功。

【讨论】:

    【解决方案2】:

    外部函数 __register_framelibgcc 或其他编译器库的一部分,但仅适用于 x86。看起来您已经在 32 位模式下编译了一些代码或使用了 32 位库。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-08-14
      • 1970-01-01
      • 2010-12-18
      • 1970-01-01
      • 1970-01-01
      • 2011-04-26
      • 1970-01-01
      • 2012-02-22
      相关资源
      最近更新 更多