<div dir="ltr">I guess you are building on msys2 with external mingw-w64.<div>CMake picks up msys2's libxml2, I guess.</div><div><br></div><div>Could you try overriding CMake and reconfigure?</div><div><div>-DCMAKE_LIBRARY_PATH="C:/mingw-w64/x86_64-4.9.3-posix-seh-rt_v4-rev1/ming<span style="line-height:1.5">w64/x86_64-w64-mingw32/lib"</span></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Jun 14, 2016 at 11:48 AM Edward Diener via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 6/13/2016 8:58 PM, Saleem Abdulrasool via cfe-dev wrote:<br>
> On Sun, Jun 12, 2016 at 7:51 AM, Edward Diener via cfe-dev<br>
> <<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
> <mailto:<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>>> wrote:<br>
><br>
>     I was successful building a 32-bit version clang from source on<br>
>     Windows using gcc-5.3. When I try to build a 64-bit version of clang<br>
>     on Windows with the triplet x86_64-w64-mingw32 and the 64-bit<br>
>     version of gcc-5.3 I get as an error:<br>
><br>
>         [482/563] Linking CXX executable bin\c-index-test.exe<br>
>         FAILED: bin/c-index-test.exe<br>
>         cmd.exe /C "cd . &&<br>
>         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<br>
>         -Wcast-qual -Wn<br>
>         o-missing-field-initializers -pedantic -Wno-long-long<br>
>         -Wno-maybe-uninitialized -<br>
>         Wdelete-non-virtual-dtor -Wno-comment -Werror=date-time<br>
>         -std=gnu++11 -fno-common<br>
>          -Woverloaded-virtual -fno-strict-aliasing  -O2<br>
>          tools/clang/tools/c-index-test<br>
>         /CMakeFiles/c-index-test.dir/c-index-test.c.obj<br>
>         tools/clang/tools/c-index-test/C<br>
>         MakeFiles/c-index-test.dir/core_main.cpp.obj  -o<br>
>         bin\c-index-test.exe -Wl,--out-<br>
>         implib,lib\libc-index-test.dll.a<br>
>         -Wl,--major-image-version,0,--minor-image-versi<br>
>         on,0  lib/libLLVMSupport.a lib/liblibclang.dll.a<br>
>         lib/libclangAST.a lib/libclangB<br>
>         asic.a lib/libclangFrontend.a lib/libclangIndex.a<br>
>         C:/utilities/libxml/lib/libxml<br>
>         2.lib lib/libclangFrontend.a lib/libclangDriver.a -lversion<br>
>         lib/libclangParse.a<br>
>         lib/libLLVMMCParser.a lib/libclangSerialization.a<br>
>         lib/libclangSema.a lib/libclan<br>
>         gEdit.a lib/libclangAnalysis.a lib/libLLVMBitReader.a<br>
>         lib/libLLVMOption.a lib/li<br>
>         bLLVMProfileData.a lib/libclangFormat.a<br>
>         lib/libclangToolingCore.a lib/libclangAS<br>
>         T.a lib/libclangRewrite.a lib/libclangLex.a lib/libclangBasic.a<br>
>         lib/libLLVMCore.<br>
>         a lib/libLLVMMC.a lib/libLLVMSupport.a -lpsapi -lshell32 -lole32<br>
>         -luuid -lkernel<br>
>         32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32<br>
>         -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<br>
>         `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<br>
>         `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<br>
>         `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<br>
>         `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<br>
>         `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<br>
>         `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<br>
>         `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<br>
>         `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<br>
>         `xmlCheckVersion'<br>
>         collect2.exe: error: ld returned 1 exit status<br>
><br>
><br>
>     Anyone know what I have to do to correct this problem ?<br>
><br>
><br>
> You are failing to link against libxml2.  I don't have any idea why that<br>
> would be the case.  I would recommend that you look at the cake output<br>
> and see if it failed to find the 64-bit version of libxml2 on your<br>
> installation.<br>
<br>
Why is llvm/clang looking for libxml2 ? It's not a part of the<br>
mingw-64/gcc compiler being used to build llvm/clang.<br>
<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>