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 316033 - MinGW build fixes
MinGW build 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: 2005-09-11 22:40 UTC by Mark Junker
Modified: 2005-11-01 10:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to fix the libxml2 build for MinGW on Win32 (1.72 KB, patch)
2005-09-11 22:43 UTC, Mark Junker
none Details | Review

Description Mark Junker 2005-09-11 22:40:00 UTC
Distribution/Version: XP SP2

rem prerequisites: installed ZLIB1.DLL and libzdll.a
cd libxml2/win32
cscript configure.js compiler=mingw iso8859x=yes zlib=yes debug=yes
mingw32-make
cd bin.mingw
REM -> missing schematron functions
REM -> Error in makefile in line with runtest.exe (a CR too much)

gdb testThreadsWin32
REM -> SIGSEGV


The following patch fixes the problems:

? depcomp
? win32/conf.cmd
? xstc/Makefile.in
Index: include/win32config.h
===================================================================
RCS file: /cvs/gnome/libxml2/include/win32config.h,v
retrieving revision 1.22
diff -u -r1.22 win32config.h
--- include/win32config.h	14 Jun 2003 16:48:24 -0000	1.22
+++ include/win32config.h	11 Sep 2005 22:17:51 -0000
@@ -84,10 +84,12 @@
 #endif
 #endif /* _MSC_VER */
 
-#if defined(_MSC_VER) || defined(__MINGW32__)
+#if defined(_MSC_VER)
 #define mkdir(p,m) _mkdir(p)
 #define snprintf _snprintf
 #define vsnprintf(b,c,f,a) _vsnprintf(b,c,f,a)
+#elif defined(__MINGW32__)
+#define mkdir(p,m) _mkdir(p)
 #endif
 
 /* Threading API to use should be specified here for compatibility reasons.
Index: win32/Makefile.mingw
===================================================================
RCS file: /cvs/gnome/libxml2/win32/Makefile.mingw,v
retrieving revision 1.24
diff -u -r1.24 Makefile.mingw
--- win32/Makefile.mingw	5 Jul 2005 10:40:52 -0000	1.24
+++ win32/Makefile.mingw	11 Sep 2005 21:52:19 -0000
@@ -126,6 +126,7 @@
 	$(XML_INTDIR)/relaxng.o\
 	$(XML_INTDIR)/SAX.o\
 	$(XML_INTDIR)/SAX2.o\
+	$(XML_INTDIR)/schematron.o\
 	$(XML_INTDIR)/threads.o\
 	$(XML_INTDIR)/tree.o\
 	$(XML_INTDIR)/uri.o\
@@ -172,6 +173,7 @@
 	$(XML_INTDIR_A)/relaxng.o\
 	$(XML_INTDIR_A)/SAX.o\a
 	$(XML_INTDIR_A)/SAX2.o\
+	$(XML_INTDIR_A)/schematron.o\
 	$(XML_INTDIR_A)/threads.o\
 	$(XML_INTDIR_A)/tree.o\
 	$(XML_INTDIR_A)/uri.o\
@@ -209,7 +211,7 @@
 	$(BINDIR)/testSchemas.exe\
 	$(BINDIR)/testURI.exe\
 	$(BINDIR)/testXPath.exe\
-	$(BINDIR)/runtest.exe\
+	$(BINDIR)/runtest.exe\
 	$(BINDIR)/runsuite.exe
 ifeq ($(WITH_THREADS),yes)
 UTILS += $(BINDIR)/testThreadsWin32.exe
Comment 1 Mark Junker 2005-09-11 22:43:14 UTC
Created attachment 52105 [details] [review]
Patch to fix the libxml2 build for MinGW on Win32

Fixes three errors:
1. Invalid makefile contents (a CR too much, confuses mingw32-make)
2. Adds the missing schematron.o to XML_OBJS_A and XML_OBJS
3. Removes the #define's of vsprintf and snprintf (they cause endless
recursion)
Comment 2 Daniel Veillard 2005-11-01 10:55:34 UTC
Looks fine, applied. Though I had to remove the ^M manually,

  thanks, it's commited now,

Daniel