无法在cygwin上构建llvm

4
我当前正在尝试通过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»

In English:

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选项来自win64平台的llvm 入门指南。我尝试禁用jit,因为似乎是libLLVMCJIT出了问题。

您有什么想法会导致此构建失败吗?


请参见http://lists.llvm.org/pipermail/llvm-dev/2013-July/064332.html。 - rogerdpack
2个回答

0

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


0

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


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接