[LLVMdev] Building Tools on MinGW from CVS

Greg Pettyjohn gregp at ccs.neu.edu
Sat May 13 12:12:26 PDT 2006

I was building tools just fine last weekend, but now something has

The problem is that it can't find some symbols: (SymSetOptions,
SymInitialize, SymGetModuleBase, SymFunctionTableAccess, etc.)

I looked on the Web and these functions are in Dbghelp.lib.
Are they also in libimagehlp.a?

(BTW: does someone know a tool to examin the exported symbols in a MinGW
foo.a library?)

I'm trying to figure out what has changed since last weekend so that now
my tools build is failing.

I'm trying to build according to Anton's instructions. I have changed my
gcc version:

$ gcc -v
Reading specs from C:/msys/1.0/mingw/bin/../lib/gcc/mingw32/3.4.5/specs
Configured with: ../gcc-3.4.5/configure --with-gcc --with-gnu-ld
--with-gnu-as --host=mingw32 --target=mingw32 --prefix=/mingw
--enable-threads --disable-nls --enable-languages=c,c++,f77,ada,objc,java
--disable-win32-registry --disable-shared --enable-sjlj-exceptions
--enable-libgcj --disable-java-awt --without-x --enable-java-gc=boehm
--disable-libgcj-debug --enable-interpreter --enable-hash-synchronization
Thread model: win32
gcc version 3.4.5 (mingw special)

Here is a part of the build spew showing the link errors for TableGen:

llvm[2]: Linking Debug executable tblgen
C:/msys/1.0/home/llvm/build/Debug/lib/libLLVMSystem.a(Signals.o): In
undefined reference to `_imp__SymSetOptions at 4'
undefined reference to `_imp__SymInitialize at 12'
undefined reference to `_imp__SymGetModuleBase at 8'
undefined reference to `_imp__SymFunctionTableAccess at 8'
undefined reference to `_imp__StackWalk at 36'
undefined reference to `_imp__SymGetModuleBase at 8'
undefined reference to `_imp__SymGetSymFromAddr at 16'
undefined reference to `_imp__SymGetLineFromAddr at 16'
std::char_traits<char> >::seekoff(long long, std::_Ios_Seekdir,
std::_Ios_Openmode)]+0x54): undefined reference to `fseeko64'
collect2: ld returned 1 exit status
make[2]: *** [/usr/home/llvm/build/Debug/bin/tblgen.exe] Error 1
make[2]: Leaving directory `/usr/home/llvm/build/utils/TableGen'
make[1]: *** [install] Error 1
make[1]: Leaving directory `/usr/home/llvm/build/utils'
make: *** [install] Error 1

P.S. I would like to *actually use* llvm one day. But it seems like this
may be very difficult so long as I am working on Windows. Please make a
Windows version that is not "experimental".

More information about the llvm-dev mailing list