<div dir="ltr">On Sun, Jun 12, 2016 at 7:51 AM, Edward Diener via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I was successful building a 32-bit version clang from source on Windows using gcc-5.3. When I try to build a 64-bit version of clang on Windows with the triplet x86_64-w64-mingw32 and the 64-bit version of gcc-5.3 I get as an error:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
[482/563] Linking CXX executable bin\c-index-test.exe<br>
FAILED: bin/c-index-test.exe<br>
cmd.exe /C "cd . && C:\utilities\mingw-w64\x86_64-5.3.0-posix-seh-rt_v4-rev0\min<br>
gw64\bin\c++.exe  -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wn<br>
o-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -<br>
Wdelete-non-virtual-dtor -Wno-comment -Werror=date-time -std=gnu++11 -fno-common<br>
 -Woverloaded-virtual -fno-strict-aliasing  -O2   tools/clang/tools/c-index-test<br>
/CMakeFiles/c-index-test.dir/c-index-test.c.obj tools/clang/tools/c-index-test/C<br>
MakeFiles/c-index-test.dir/core_main.cpp.obj  -o bin\c-index-test.exe -Wl,--out-<br>
implib,lib\libc-index-test.dll.a -Wl,--major-image-version,0,--minor-image-versi<br>
on,0  lib/libLLVMSupport.a lib/liblibclang.dll.a lib/libclangAST.a lib/libclangB<br>
asic.a lib/libclangFrontend.a lib/libclangIndex.a C:/utilities/libxml/lib/libxml<br>
2.lib lib/libclangFrontend.a lib/libclangDriver.a -lversion lib/libclangParse.a<br>
lib/libLLVMMCParser.a lib/libclangSerialization.a lib/libclangSema.a lib/libclan<br>
gEdit.a lib/libclangAnalysis.a lib/libLLVMBitReader.a lib/libLLVMOption.a lib/li<br>
bLLVMProfileData.a lib/libclangFormat.a lib/libclangToolingCore.a lib/libclangAS<br>
T.a lib/libclangRewrite.a lib/libclangLex.a lib/libclangBasic.a lib/libLLVMCore.<br>
a lib/libLLVMMC.a lib/libLLVMSupport.a -lpsapi -lshell32 -lole32 -luuid -lkernel<br>
32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -l<br>
advapi32 && cd ."<br>
tools/clang/tools/c-index-test/CMakeFiles/c-index-test.dir/c-index-test.c.obj:c-<br>
index-test.c:(.text+0x3066): undefined reference to `xmlRelaxNGNewParserCtxt'<br>
tools/clang/tools/c-index-test/CMakeFiles/c-index-test.dir/c-index-test.c.obj:c-<br>
index-test.c:(.text+0x307a): undefined reference to `xmlRelaxNGParse'<br>
tools/clang/tools/c-index-test/CMakeFiles/c-index-test.dir/c-index-test.c.obj:c-<br>
index-test.c:(.text+0x3085): undefined reference to `xmlParseDoc'<br>
tools/clang/tools/c-index-test/CMakeFiles/c-index-test.dir/c-index-test.c.obj:c-<br>
index-test.c:(.text+0x3099): undefined reference to `xmlRelaxNGNewValidCtxt'<br>
tools/clang/tools/c-index-test/CMakeFiles/c-index-test.dir/c-index-test.c.obj:c-<br>
index-test.c:(.text+0x30a7): undefined reference to `xmlRelaxNGValidateDoc'<br>
tools/clang/tools/c-index-test/CMakeFiles/c-index-test.dir/c-index-test.c.obj:c-<br>
index-test.c:(.text+0x30bb): undefined reference to `xmlGetLastError'<br>
tools/clang/tools/c-index-test/CMakeFiles/c-index-test.dir/c-index-test.c.obj:c-<br>
index-test.c:(.text+0x30d3): undefined reference to `xmlRelaxNGFreeValidCtxt'<br>
tools/clang/tools/c-index-test/CMakeFiles/c-index-test.dir/c-index-test.c.obj:c-<br>
index-test.c:(.text+0x30db): undefined reference to `xmlFreeDoc'<br>
tools/clang/tools/c-index-test/CMakeFiles/c-index-test.dir/c-index-test.c.obj:c-<br>
index-test.c:(.text+0x30e3): undefined reference to `xmlRelaxNGFree'<br>
tools/clang/tools/c-index-test/CMakeFiles/c-index-test.dir/c-index-test.c.obj:c-<br>
index-test.c:(.text+0x30eb): undefined reference to `xmlRelaxNGFreeParserCtxt'<br>
tools/clang/tools/c-index-test/CMakeFiles/c-index-test.dir/c-index-test.c.obj:c-<br>
index-test.c:(.text+0x3452): undefined reference to `xmlGetLastError'<br>
tools/clang/tools/c-index-test/CMakeFiles/c-index-test.dir/c-index-test.c.obj:c-<br>
index-test.c:(.text.startup+0x23): undefined reference to `xmlCheckVersion'<br>
collect2.exe: error: ld returned 1 exit status<br>
</blockquote>
<br>
Anyone know what I have to do to correct this problem ?<br></blockquote><div><br></div><div>You are failing to link against libxml2.  I don't have any idea why that would be the case.  I would recommend that you look at the cake output and see if it failed to find the 64-bit version of libxml2 on your installation.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I use CMake, ninja, and mingw-64/gcc-5.3. I have not downloaded the optional 'extra' and 'compiler-rt' projects as part of LLVM on Windows.<br>
<br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Saleem Abdulrasool<br>compnerd (at) compnerd (dot) org</div>
</div></div>