[cfe-dev] Failure building x86_64-w64-mingw32 triplet of clang on Windows
Edward Diener via cfe-dev
cfe-dev at lists.llvm.org
Mon Jun 13 19:47:29 PDT 2016
On 6/13/2016 8:58 PM, Saleem Abdulrasool via cfe-dev wrote:
> On Sun, Jun 12, 2016 at 7:51 AM, Edward Diener via cfe-dev
> <cfe-dev at lists.llvm.org
> <mailto:cfe-dev at lists.llvm.org>> wrote:
>
> 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:
>
> [482/563] Linking CXX executable bin\c-index-test.exe
> FAILED: bin/c-index-test.exe
> cmd.exe /C "cd . &&
> C:\utilities\mingw-w64\x86_64-5.3.0-posix-seh-rt_v4-rev0\min
> gw64\bin\c++.exe -Wall -W -Wno-unused-parameter -Wwrite-strings
> -Wcast-qual -Wn
> o-missing-field-initializers -pedantic -Wno-long-long
> -Wno-maybe-uninitialized -
> Wdelete-non-virtual-dtor -Wno-comment -Werror=date-time
> -std=gnu++11 -fno-common
> -Woverloaded-virtual -fno-strict-aliasing -O2
> tools/clang/tools/c-index-test
> /CMakeFiles/c-index-test.dir/c-index-test.c.obj
> tools/clang/tools/c-index-test/C
> MakeFiles/c-index-test.dir/core_main.cpp.obj -o
> bin\c-index-test.exe -Wl,--out-
> implib,lib\libc-index-test.dll.a
> -Wl,--major-image-version,0,--minor-image-versi
> on,0 lib/libLLVMSupport.a lib/liblibclang.dll.a
> lib/libclangAST.a lib/libclangB
> asic.a lib/libclangFrontend.a lib/libclangIndex.a
> C:/utilities/libxml/lib/libxml
> 2.lib lib/libclangFrontend.a lib/libclangDriver.a -lversion
> lib/libclangParse.a
> lib/libLLVMMCParser.a lib/libclangSerialization.a
> lib/libclangSema.a lib/libclan
> gEdit.a lib/libclangAnalysis.a lib/libLLVMBitReader.a
> lib/libLLVMOption.a lib/li
> bLLVMProfileData.a lib/libclangFormat.a
> lib/libclangToolingCore.a lib/libclangAS
> T.a lib/libclangRewrite.a lib/libclangLex.a lib/libclangBasic.a
> lib/libLLVMCore.
> a lib/libLLVMMC.a lib/libLLVMSupport.a -lpsapi -lshell32 -lole32
> -luuid -lkernel
> 32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32
> -luuid -lcomdlg32 -l
> advapi32 && cd ."
> tools/clang/tools/c-index-test/CMakeFiles/c-index-test.dir/c-index-test.c.obj:c-
> index-test.c:(.text+0x3066): undefined reference to
> `xmlRelaxNGNewParserCtxt'
> tools/clang/tools/c-index-test/CMakeFiles/c-index-test.dir/c-index-test.c.obj:c-
> index-test.c:(.text+0x307a): undefined reference to
> `xmlRelaxNGParse'
> tools/clang/tools/c-index-test/CMakeFiles/c-index-test.dir/c-index-test.c.obj:c-
> index-test.c:(.text+0x3085): undefined reference to `xmlParseDoc'
> tools/clang/tools/c-index-test/CMakeFiles/c-index-test.dir/c-index-test.c.obj:c-
> index-test.c:(.text+0x3099): undefined reference to
> `xmlRelaxNGNewValidCtxt'
> tools/clang/tools/c-index-test/CMakeFiles/c-index-test.dir/c-index-test.c.obj:c-
> index-test.c:(.text+0x30a7): undefined reference to
> `xmlRelaxNGValidateDoc'
> tools/clang/tools/c-index-test/CMakeFiles/c-index-test.dir/c-index-test.c.obj:c-
> index-test.c:(.text+0x30bb): undefined reference to
> `xmlGetLastError'
> tools/clang/tools/c-index-test/CMakeFiles/c-index-test.dir/c-index-test.c.obj:c-
> index-test.c:(.text+0x30d3): undefined reference to
> `xmlRelaxNGFreeValidCtxt'
> tools/clang/tools/c-index-test/CMakeFiles/c-index-test.dir/c-index-test.c.obj:c-
> index-test.c:(.text+0x30db): undefined reference to `xmlFreeDoc'
> tools/clang/tools/c-index-test/CMakeFiles/c-index-test.dir/c-index-test.c.obj:c-
> index-test.c:(.text+0x30e3): undefined reference to `xmlRelaxNGFree'
> tools/clang/tools/c-index-test/CMakeFiles/c-index-test.dir/c-index-test.c.obj:c-
> index-test.c:(.text+0x30eb): undefined reference to
> `xmlRelaxNGFreeParserCtxt'
> tools/clang/tools/c-index-test/CMakeFiles/c-index-test.dir/c-index-test.c.obj:c-
> index-test.c:(.text+0x3452): undefined reference to
> `xmlGetLastError'
> tools/clang/tools/c-index-test/CMakeFiles/c-index-test.dir/c-index-test.c.obj:c-
> index-test.c:(.text.startup+0x23): undefined reference to
> `xmlCheckVersion'
> collect2.exe: error: ld returned 1 exit status
>
>
> Anyone know what I have to do to correct this problem ?
>
>
> 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.
Why is llvm/clang looking for libxml2 ? It's not a part of the
mingw-64/gcc compiler being used to build llvm/clang.
More information about the cfe-dev
mailing list