GNOME Bugzilla – Bug 614087
win64 (mingw-w64) issues and fixes
Last modified: 2010-11-04 11:11:25 UTC
Created attachment 157267 [details] [review] socket api usage fixes for win64 Hello: Compiling libxml2 version 2.7.7 using mingw-w64 (http://mingw-w64.sf.net/) hass some problems: - Libtool included in the 2.7.7 version is old, so is its win64 format detection therefore the linkage fails. The problem is fixes in the libtool git repo, but I attached a small diff to fix the issue until a new version of libtool is released - The socket api usage (nanoftp, and nanohttp) is incompatible with Win64: In 64 bit windows, the SOCKET type is uintptr_t, not just an unsigned int, but the use in libxml2 relies on strict 32 bit (and signed) int type. Attached a patch to fix the issues. With these two changes, configuring the library with: ../libxml2-2.7.7x/configure --host=x86_64-w64-mingw32 --without-python and issuing make succeeds in compilation (compilation realized on linux using cross-toolchains.) There still are some warnings about casts from pointer to integer of different size and vice versa, but they can be handled later, too. Regards.
Created attachment 157268 [details] [review] libtool fixes for w64
Okay, I had upgraded libtool on the machine I use to build releases and it seems this patch is not necessary anymore: paphio:~/XML -> grep pe-x86-64 m4/libtool.m4 ltmain.sh configure m4/libtool.m4: lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' ltmain.sh: $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then configure: lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' paphio:~/XML -> so already fixed, thanks, Daniel
Ah, I nearly missed the second patch, which is the actual core part, it looks fine, I was a bit annoyed that the public API in nanoftp.h had to be changed but in practice this should not break ABI for most platforms, only on platforms where the API was broken, so that should be fine. So I pushed you patch, thanks a lot ! Daniel