<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Compile error libxml2 with mingw]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">I'm doing compile the open source library libxml2.<br />
I have two different version of mingw.<br />
But I compiled libxml2 with just one.</p>
<h1>first. GCC 4.4.0 -&gt; libxml2 installation OK</h1>
<p dir="auto">$ export CC=/c/QtSDK/mingw/bin/mingw32-gcc<br />
$ export CXX=/c/QtSDK/mingw/bin/mingw32-g++<br />
$ export PATH="/c/QtSDK/mingw/bin:$PATH"<br />
$ export PATH="/c/program files (x86)/CMake/Bin:$PATH"<br />
$ ./Configure --without-iconv --without-python --build=i686-pc-mingw32 --prefix=/c/libxml2<br />
$ make<br />
$ make install</p>
<h1>second. GCC 5.3.0 -&gt; libxml2 make error... OTL ...</h1>
<p dir="auto">$ export CC=/c/Qt/Qt5.7.0/Tools/mingw530_32/bin/gcc<br />
$ export CXX=/c/Qt/Qt5.7.0/Tools/mingw530_32/bin/g++<br />
$ export PATH="/c/Qt/Qt5.7.0/Tools/mingw530_32/bin:$PATH"<br />
$ export PATH="/c/program files (x86)/CMake/Bin:$PATH"<br />
$ ./Configure --without-iconv --without-python --build=i686-pc-mingw32 --prefix=/c/libxml2 --host=i686-pc-winnt<br />
$ make</p>
<pre><code>SHLEE@SHLEE-PC MSYS /c/Users/SHLEE/Documents/opcsdk/libxml2-2.9.3
$ ./configure --without-iconv --without-python --build=i686-pc-mingw32 --host=i686-pc-winnt --prefix=/c/User/SHLEE/Documents/opcsdk/libxml2
configure: loading site script /etc/config.site
checking build system type... i686-pc-mingw32
checking host system type... i686-pc-winnt
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for i686-pc-winnt-strip... no
checking for strip... strip
configure: WARNING: using cross tools not prefixed with host triplet
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for i686-pc-winnt-gcc... /c/Qt/Qt5.7.0/Tools/mingw530_32/bin/gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /c/Qt/Qt5.7.0/Tools/mingw530_32/bin/gcc accepts -g... yes
checking for /c/Qt/Qt5.7.0/Tools/mingw530_32/bin/gcc option to accept ISO C89... none needed
checking whether /c/Qt/Qt5.7.0/Tools/mingw530_32/bin/gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of /c/Qt/Qt5.7.0/Tools/mingw530_32/bin/gcc... gcc3
checking whether ln -s works... no, using cp -pR
checking how to run the C preprocessor... /c/Qt/Qt5.7.0/Tools/mingw530_32/bin/gcc -E
checking for mv... /usr/bin/mv
checking for tar... /usr/bin/tar
checking for perl... /usr/bin/perl
checking for wget... /usr/bin/wget
checking for xmllint... /usr/bin/xmllint
checking for xsltproc... /usr/bin/xsltproc
checking for i686-pc-winnt-pkg-config... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by /c/Qt/Qt5.7.0/Tools/mingw530_32/bin/gcc... C:/Qt/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/bin/ld.exe
checking if the linker (C:/Qt/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/bin/ld.exe) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... no
checking for i686-pc-winnt-dumpbin... no
checking for i686-pc-winnt-link... no
checking for dumpbin... no
checking for link... link -dump
checking the name lister (nm) interface... BSD nm
checking the maximum length of command line arguments... 8192
checking how to convert i686-pc-mingw32 file names to i686-pc-winnt format... func_convert_file_noop
checking how to convert i686-pc-mingw32 file names to toolchain format... func_convert_file_noop
checking for C:/Qt/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/bin/ld.exe option to reload object files... -r
checking for i686-pc-winnt-objdump... no
checking for objdump... objdump
checking how to recognize dependent libraries... unknown
checking for i686-pc-winnt-dlltool... no
checking for dlltool... dlltool
checking how to associate runtime and link libraries... printf %s\n
checking for i686-pc-winnt-ar... no
checking for ar... ar
checking for archiver @FILE support... @
checking for i686-pc-winnt-strip... strip
checking for i686-pc-winnt-ranlib... no
checking for ranlib... ranlib
checking command to parse nm output from /c/Qt/Qt5.7.0/Tools/mingw530_32/bin/gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for i686-pc-winnt-mt... no
checking for mt... no
checking if : is a manifest tool... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... no
checking for objdir... .libs
checking if /c/Qt/Qt5.7.0/Tools/mingw530_32/bin/gcc supports -fno-rtti -fno-exceptions... no
checking for /c/Qt/Qt5.7.0/Tools/mingw530_32/bin/gcc option to produce PIC... -fPIC -DPIC
checking if /c/Qt/Qt5.7.0/Tools/mingw530_32/bin/gcc PIC flag -fPIC -DPIC works... no
checking if /c/Qt/Qt5.7.0/Tools/mingw530_32/bin/gcc static flag -static works... yes
checking if /c/Qt/Qt5.7.0/Tools/mingw530_32/bin/gcc supports -c -o file.o... yes
checking if /c/Qt/Qt5.7.0/Tools/mingw530_32/bin/gcc supports -c -o file.o... (cached) yes
checking whether the /c/Qt/Qt5.7.0/Tools/mingw530_32/bin/gcc linker (C:/Qt/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/bin/ld.exe) supports shared libraries... yes
checking whether -lc should be explicitly linked in... yes
checking dynamic linker characteristics... no
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... no
checking whether to build shared libraries... no
checking whether to build static libraries... yes
Checking zlib
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for gzread in -lz... yes
Checking lzma
checking for LZMA... no
checking lzma.h usability... no
checking lzma.h presence... no
checking for lzma.h... no
Checking headers
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking for ANSI C header files... (cached) yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for unistd.h... (cached) yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking dirent.h usability... yes
checking dirent.h presence... yes
checking for dirent.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking stdarg.h usability... yes
checking stdarg.h presence... yes
checking for stdarg.h... yes
checking for sys/stat.h... (cached) yes
checking for sys/types.h... (cached) yes
checking for stdint.h... (cached) yes
checking for inttypes.h... (cached) yes
checking time.h usability... yes
checking time.h presence... yes
checking for time.h... yes
checking ansidecl.h usability... no
checking ansidecl.h presence... no
checking for ansidecl.h... no
checking ieeefp.h usability... yes
checking ieeefp.h presence... yes
checking for ieeefp.h... yes
checking nan.h usability... no
checking nan.h presence... no
checking for nan.h... no
checking math.h usability... yes
checking math.h presence... yes
checking for math.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking fp_class.h usability... no
checking fp_class.h presence... no
checking for fp_class.h... no
checking float.h usability... yes
checking float.h presence... yes
checking for float.h... yes
checking for stdlib.h... (cached) yes
checking for sys/socket.h... no
checking for netinet/in.h... no
checking for arpa/inet.h... no
checking netdb.h usability... no
checking netdb.h presence... no
checking for netdb.h... no
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/select.h usability... no
checking sys/select.h presence... no
checking for sys/select.h... no
checking poll.h usability... no
checking poll.h presence... no
checking for poll.h... no
checking sys/mman.h usability... no
checking sys/mman.h presence... no
checking for sys/mman.h... no
checking sys/timeb.h usability... yes
checking sys/timeb.h presence... yes
checking for sys/timeb.h... yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking for arpa/nameser.h... no
checking for resolv.h... no
checking dl.h usability... no
checking dl.h presence... no
checking for dl.h... no
checking for dlfcn.h... (cached) no
Checking types
checking for uint32_t... yes
Checking libraries
checking for strftime... yes
checking for strdup... yes
checking for strndup... no
checking for strerror... yes
checking for finite... yes
checking for isnand... no
checking for fp_class... no
checking for class... no
checking for fpclass... yes
checking for strftime... (cached) yes
checking for localtime... yes
checking for gettimeofday... yes
checking for ftime... yes
checking for stat... yes
checking for _stat... yes
checking for signal... yes
checking for rand... yes
checking for rand_r... no
checking for srand... yes
checking for time... yes
checking for isascii... yes
checking for mmap... no
checking for munmap... no
checking for putenv... yes
checking for va_copy... yes
checking whether va_list is an array type... no
checking for library containing gethostent... no
checking for library containing setsockopt... no
checking for library containing connect... no
checking for type of socket length (socklen_t)... configure: WARNING: could not determine
checking for const gethostbyname() argument... no
checking for const send() second argument... no
checking whether to enable IPv6... no
checking for isnan... yes
checking for isinf... no
checking for isinf in -lm... no
checking for shl_load... no
checking for shl_load in -ldld... no
checking for dlopen... no
checking for dlopen in -ldl... no
Checking configuration requirements
Enabling multithreaded support
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for pthread_join in -lpthread... yes
Enabled Schematron support
Disabling ICONV support
Disabling ICU support
Enabled Schemas/Relax-NG support
checking for printf... yes
checking for sprintf... yes
checking for fprintf... yes
checking for snprintf... yes
checking for vfprintf... yes
checking for vsprintf... yes
checking for vsnprintf... yes
checking for sscanf... yes
Disabling code coverage for GCC
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating libxml2.spec
config.status: creating Makefile
config.status: creating include/Makefile
config.status: creating include/libxml/Makefile
config.status: creating doc/Makefile
config.status: creating doc/examples/Makefile
config.status: creating doc/devhelp/Makefile
config.status: creating example/Makefile
config.status: creating python/Makefile
config.status: creating python/tests/Makefile
config.status: creating xstc/Makefile
config.status: creating include/libxml/xmlversion.h
config.status: creating libxml-2.0.pc
config.status: creating libxml-2.0-uninstalled.pc
config.status: creating libxml2-config.cmake
config.status: creating python/setup.py
config.status: creating xml2-config
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
Done configuring

SHLEE@SHLEE-PC MSYS /c/Users/SHLEE/Documents/opcsdk/libxml2-2.9.3
$ make
...
...
C:\Users\SHLEE\Documents\opcsdk\libxml2-2.9.3/nanoftp.c:2045: undefined reference to `_imp__closesocket@4'
collect2.exe: error: ld returned 1 exit status
make[2]: *** [Makefile:1116: xmllint.exe] 오류 1
make[2]: 디렉터리 '/c/Users/SHLEE/Documents/opcsdk/libxml2-2.9.3' 나감
make[1]: *** [Makefile:1438: all-recursive] 오류 1
make[1]: 디렉터리 '/c/Users/SHLEE/Documents/opcsdk/libxml2-2.9.3' 나감
make: *** [Makefile:857: all] 오류 2

SHLEE@SHLEE-PC MSYS /c/Users/SHLEE/Documents/opcsdk/libxml2-2.9.3
$
</code></pre>
<p dir="auto">What I need to check?</p>
]]></description><link>https://forum.qt.io/topic/81790/compile-error-libxml2-with-mingw</link><generator>RSS for Node</generator><lastBuildDate>Fri, 24 Apr 2026 11:50:36 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/81790.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 28 Jul 2017 00:59:38 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Compile error libxml2 with mingw on Fri, 28 Jul 2017 09:41:50 GMT]]></title><description><![CDATA[<p dir="auto">@Hyo.</p>
<p dir="auto">This is not a Qt problem.</p>
<p dir="auto">The only relation to Qt is that you happen to use the MinGW compiler installed with Qt libraries. However, MinGW is not part of Qt either. It is from a separate open source project.</p>
<p dir="auto">The problem is obviously that a routine closesocket is referenced (even the line is given in your post) but not found as a compiled module. As with any source you need to find out where it belongs to and why it is not compiled or part of a library you are using.</p>
]]></description><link>https://forum.qt.io/post/407279</link><guid isPermaLink="true">https://forum.qt.io/post/407279</guid><dc:creator><![CDATA[koahnig]]></dc:creator><pubDate>Fri, 28 Jul 2017 09:41:50 GMT</pubDate></item></channel></rss>