[cfe-dev] Problems building on Msys/MingW

John Thompson john.thompson.jtsoftware at gmail.com
Wed Aug 5 17:10:11 PDT 2009


Hi,

I'm trying to build clang under MingW, but I'm getting a number of errors.
Could anyone provide some hints as to what you had to do?  I got some tips
from
http://blogs.tedneward.com/2008/02/24/Building+LLVM+On+Windows+Using+MinGW32.aspx,
but using the newer packages, as it's a bit old.

The ./configure seems to run without errors.

The first run of make aborts with errors like:

make[1]: Entering directory `/home/llvm/tools/llvm-config'
llvm[1]: Regenerating LibDeps.txt.tmp
'c:' is not recognized as an internal or external command,
operable program or batch file.
nm failed at C:/msys/1.0/home/llvm/utils/GenLibDeps.pl line 120.
make[1]: *** [/home/llvm/tools/llvm-config/LibDeps.txt.tmp] Error 255
make[1]: Leaving directory `/home/llvm/tools/llvm-config'
make: *** [all] Error 1


So it seemed like something in the llvm-config directory, so I ran "make
clean all" directly in llvm/tools/llvm-config, but had no error.

Running make again at the llvm directory yielded different errors this time:

make[2]: Entering directory `/home/llvm/tools/llvm-config'
make[2]: Leaving directory `/home/llvm/tools/llvm-config'
The system cannot find the path specified.
llvm-config: unknown component name: bitreader
The system cannot find the path specified.
llvm-config: unknown component name: bitreader
make[2]: Entering directory `/home/llvm/tools/opt'
llvm[2]: Linking Debug executable opt
C:/msys/1.0/home/llvm/tools/opt/Debug/AnalysisWrappers.o: In function
`ZN49_GLOBAL__N_AnalysisWrappers.cpp_DD76033A_F5DF9E8F16CallGraphPrinterD1Ev':
C:/msys/1.0/home/llvm/tools/opt/AnalysisWrappers.cpp:(.rdata+0xb0):
undefined reference to `llvm::CallGraphLinkVar'
C:/msys/1.0/home/llvm/tools/opt/AnalysisWrappers.cpp:(.text$_ZN4llvm8PassInfoC2EPKcS2_iPFPNS_4PassEvEbb[llvm::PassInfo::PassInfo(char
const*, char const*, int, llvm::Pass* (*)(), bool, bool)]+0xea): undefined
reference to `llvm::PassInfo::registerPass()'
C:/msys/1.0/home/llvm/tools/opt/AnalysisWrappers.cpp:(.text$_ZN4llvm10ModulePassC2EPKv[llvm::ModulePass::ModulePass(void
const*)]+0x1d): undefined reference to `vtable for llvm::ModulePass'
... and lots more


Running make in the clang top level had link errors too, undoubtedly because
the llvm build failed:

make[1]: Entering directory `/home/llvm/tools/clang/tools'
The system cannot find the path specified.
llvm-config: unknown component name: x86info
make[2]: Entering directory `/home/llvm/tools/clang/tools/clang-cc'
llvm[2]: Compiling clang-cc.cpp for Debug build
The system cannot find the path specified.
llvm-config: unknown component name: x86info
llvm[2]: Linking Debug executable clang-cc
C:/msys/1.0/home/llvm/tools/clang/tools/clang-cc/Debug/clang-cc.o: In
function `Z22InitializeBaseLanguagev':
C:/msys/1.0/home/llvm/tools/clang/tools/clang-cc/clang-cc.cpp:395: undefined
reference to `llvm::cl::opt<bool, false, llvm::cl::parser<bool> >::operator
bool() const'
C:/msys/1.0/home/llvm/tools/clang/tools/clang-cc/clang-cc.cpp:397: undefined
reference to `llvm::cl::opt<bool, false, llvm::cl::parser<bool> >::operator
bool() const'
C:/msys/1.0/home/llvm/tools/clang/tools/clang-cc/Debug/clang-cc.o: In
function `Z21InitializeLangOptionsRN5clang11LangOptionsE8LangKind':

I can dig into it further, but I thought it worthwhile to ping you guys in
case you can straighten me out more easily, as I haven't done a lot of work
in this environment with configure and so forth.  Setting up Msys and MingW
doesn't seem very straightforward, so I'm wondering if I misstepped
somewhere and missed a package I need, or got the wrong version, or have
some other cruft in my setup.

If it will help, I can send logs of the configure, llvm build, a "make -n"
build of llvm, the 2nd build of llvm, the clang build, and the config.status
and config.log files.  (Actually, I tried sending them already, but of
course they're too big.)

-John

-- 
John Thompson
John.Thompson.JTSoftware at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20090805/2bbf06a4/attachment.html>


More information about the cfe-dev mailing list