<div>Hi,</div>
<div> </div>
<div>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 <a href="http://blogs.tedneward.com/2008/02/24/Building+LLVM+On+Windows+Using+MinGW32.aspx">http://blogs.tedneward.com/2008/02/24/Building+LLVM+On+Windows+Using+MinGW32.aspx</a>, but using the newer packages, as it's a bit old.<br>
 <br>The ./configure seems to run without errors.<br> <br>The first run of make aborts with errors like:<br> <br>make[1]: Entering directory `/home/llvm/tools/llvm-config'<br>llvm[1]: Regenerating LibDeps.txt.tmp<br>'c:' is not recognized as an internal or external command,<br>
operable program or batch file.<br>nm failed at C:/msys/1.0/home/llvm/utils/GenLibDeps.pl line 120.<br>make[1]: *** [/home/llvm/tools/llvm-config/LibDeps.txt.tmp] Error 255<br>make[1]: Leaving directory `/home/llvm/tools/llvm-config'<br>
make: *** [all] Error 1</div>
<p> <br>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.<br> <br>Running make again at the llvm directory yielded different errors this time:<br>
 <br>make[2]: Entering directory `/home/llvm/tools/llvm-config'<br>make[2]: Leaving directory `/home/llvm/tools/llvm-config'<br>The system cannot find the path specified.<br>llvm-config: unknown component name: bitreader<br>
The system cannot find the path specified.<br>llvm-config: unknown component name: bitreader<br>make[2]: Entering directory `/home/llvm/tools/opt'<br>llvm[2]: Linking Debug executable opt<br>C:/msys/1.0/home/llvm/tools/opt/Debug/AnalysisWrappers.o: In function `ZN49_GLOBAL__N_AnalysisWrappers.cpp_DD76033A_F5DF9E8F16CallGraphPrinterD1Ev':<br>
C:/msys/1.0/home/llvm/tools/opt/AnalysisWrappers.cpp:(.rdata+0xb0): undefined reference to `llvm::CallGraphLinkVar'<br>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()'<br>
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'<br>... and lots more</p>
<p> <br>Running make in the clang top level had link errors too, undoubtedly because the llvm build failed:<br> <br>make[1]: Entering directory `/home/llvm/tools/clang/tools'<br>The system cannot find the path specified.<br>
llvm-config: unknown component name: x86info<br>make[2]: Entering directory `/home/llvm/tools/clang/tools/clang-cc'<br>llvm[2]: Compiling clang-cc.cpp for Debug build <br>The system cannot find the path specified.<br>
llvm-config: unknown component name: x86info<br>llvm[2]: Linking Debug executable clang-cc<br>C:/msys/1.0/home/llvm/tools/clang/tools/clang-cc/Debug/clang-cc.o: In function `Z22InitializeBaseLanguagev':<br>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'<br>
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'<br>C:/msys/1.0/home/llvm/tools/clang/tools/clang-cc/Debug/clang-cc.o: In function `Z21InitializeLangOptionsRN5clang11LangOptionsE8LangKind':</p>

<p>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.<br>
 <br>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.)<br>
 <br>-John<br clear="all"></p>
<div></div><br>-- <br>John Thompson<br><a href="mailto:John.Thompson.JTSoftware@gmail.com">John.Thompson.JTSoftware@gmail.com</a><br><br>