簡體   English   中英

無法在 cygwin 上構建 llvm

[英]Unable to build llvm on cygwin

我目前正在嘗試通過 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選項來自 win64 平台的 llvm入門指南 我嘗試禁用 jit,因為它似乎是 libLLVMCJIT 出現問題。

知道什么可能導致此構建失敗嗎?

我在 Cygwin(x86_64) 上編譯 llvm 時遇到了同樣的錯誤。 但是我可以在 Cygwin(x86) 上成功編譯它。

外部函數__register_framelibgcc或其他編譯器庫的一部分,但僅適用於 x86。 看起來您已經在 32 位模式下編譯了一些代碼或使用了 32 位庫。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM