[LLVMdev] Mingw, cross-compiling,___eprintf

Óscar Fuentes ofv at wanadoo.es
Sat Nov 8 22:59:08 PST 2008

Cross-compiling from Ubuntu 8.04 x86_64 to mingw with the cmake
build system fails with this error while linking some tools:

undefined reference to `___eprintf'

___eprintf is mentioned in lib/System/Win32/DynamicLibrary.inc. This
symbol is referenced by libLLVMSystem.a when LLVM is natively built on
Windows/Mingw, but there the link succeeds.

So, is this a cross-compiler issue?

OTOH, the build complains about this:

multiple definition of `_powf'
../../lib/libLLVMCodeGen.a(RegAllocLinearScan.cpp.obj):RegAllocLinearScan.cpp:(.text$powf[_powf]+0x0):first defined here

Oh, and ld segfaults after spitting the errors:

collect2: ld terminated with signal 11 [Segmentation fault]

Hope someone who is used to cross-compile with MinGW can provide some

oscar at qcore:~/dev/llvm/mingw-x$ i586-mingw32msvc-g++ --version
i586-mingw32msvc-g++ (GCC) 4.2.1-sjlj (mingw32-2)

oscar at qcore:~/dev/llvm/mingw-x$ i586-mingw32msvc-ld --version
GNU ld version 2.17.50 20070129


More information about the llvm-dev mailing list