[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
changed...

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
--enable-libstdcxx-debug
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
function
`Z28LLVMUnhandledExceptionFilterP19_EXCEPTION_POINTERS':C:/msys/1.0/home/llvm/build/../src/lib/System/Win32/Signals.inc:172:
undefined reference to `_imp__SymSetOptions at 4'
:C:/msys/1.0/home/llvm/build/../src/lib/System/Win32/Signals.inc:173:
undefined reference to `_imp__SymInitialize at 12'
:C:/msys/1.0/home/llvm/build/../src/lib/System/Win32/Signals.inc:176:
undefined reference to `_imp__SymGetModuleBase at 8'
:C:/msys/1.0/home/llvm/build/../src/lib/System/Win32/Signals.inc:176:
undefined reference to `_imp__SymFunctionTableAccess at 8'
:C:/msys/1.0/home/llvm/build/../src/lib/System/Win32/Signals.inc:176:
undefined reference to `_imp__StackWalk at 36'
:C:/msys/1.0/home/llvm/build/../src/lib/System/Win32/Signals.inc:194:
undefined reference to `_imp__SymGetModuleBase at 8'
:C:/msys/1.0/home/llvm/build/../src/lib/System/Win32/Signals.inc:207:
undefined reference to `_imp__SymGetSymFromAddr at 16'
:C:/msys/1.0/home/llvm/build/../src/lib/System/Win32/Signals.inc:222:
undefined reference to `_imp__SymGetLineFromAddr at 16'
C:/msys/1.0/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../libstdc++.a(misc-inst.o):misc-inst.cc:(.text$_ZN9__gnu_cxx18stdio_sync_filebufIcSt11char_traitsIcEE7seekoffExSt12_Ios_SeekdirSt13_Ios_Openmode[__gnu_cxx::stdio_sync_filebuf<char,
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