After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 614087 - win64 (mingw-w64) issues and fixes
win64 (mingw-w64) issues and fixes
Status: RESOLVED FIXED
Product: libxml2
Classification: Platform
Component: general
git master
Other Windows
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2010-03-27 09:59 UTC by Ozkan Sezer
Modified: 2010-11-04 11:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
socket api usage fixes for win64 (35.87 KB, patch)
2010-03-27 09:59 UTC, Ozkan Sezer
none Details | Review
libtool fixes for w64 (1.80 KB, patch)
2010-03-27 10:00 UTC, Ozkan Sezer
none Details | Review

Description Ozkan Sezer 2010-03-27 09:59:31 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.
Comment 1 Ozkan Sezer 2010-03-27 10:00:33 UTC
Created attachment 157268 [details] [review]
libtool fixes for w64
Comment 2 Daniel Veillard 2010-11-04 09:43:03 UTC
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
Comment 3 Daniel Veillard 2010-11-04 11:11:25 UTC
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