Re: [xml] libxml2-2.7.8 and MinGW

2012-01-22 Thread Roumen Petrov

Hello,

Roumen Petrov wrote:

Earnie wrote:

Earnie wrote:

Roumen Petrov wrote:

[SNIP]

And now with attachments.


libxml2-git-mingw32.patch is fine .

Roumen
Now I have cross environment gcc 4.6.2 , binutils 2.22 and I could 
confirm that libxml test pass (except ebcdic) if
- build without optimization . Note that if don't set CFLAGS by default  
configure script will select -g -O2 for gcc compiler.

- build with CFLAGS=-O1 -fno-tree-ccp -fno-tree-fre
- build with CFLAGS=-O2 -fno-tree-ccp -fno-tree-fre -fno-tree-pre
- build if exported variables are decorated with extern in adition. Last 
is bypass (work-around) for gcc optimization issue.



Roumen

___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
http://mail.gnome.org/mailman/listinfo/xml


Re: [xml] libxml2-2.7.8 and MinGW

2011-12-27 Thread Earnie
Roumen Petrov wrote:
 Earnie wrote:
 Earnie wrote:
 Roumen Petrov wrote:
 Earnie wrote:
 [SNIP]

 As discussed on the MinGW list here are the patches for both libxml2 and
 libxslt adorning dllexport with extern for both __CYGWIN__ and
 __MINGW32__.

 During the discussion on the MinGW list we discovered the following bit
 of information about dllexport:

 From:
 http://msdn.microsoft.com/en-us/library/y4h7bcy6.aspx

 The use of dllexport implies a definition, while dllimport implies a
 declaration. You must use the extern keyword with dllexport to force a
 declaration; otherwise, a definition is implied.

 And now with attachments.

 
 About libxslt patch:
 Changes in  libexslt/exsltexports.h and libxslt/xsltexports.h break
 static only build.
 

How should that happen?  I'll check it out soon.

 Update in tests/plugins/testplugin.c is fine.  In addition for mingw*
 hosts attached 0001-build-test-plugin-for-mingw-host.patch is required :
   WIN32_EXTRA_LDFLAGS add no-undefined and this will allow plugin to be
 build as shared library and test pass.
 

And this one.  Note -no-undefined is a libtool option while
--no-undefined is an ld option which is on by default for MinGW.

-- 
Earnie
-- https://sites.google.com/site/earnieboyd/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
http://mail.gnome.org/mailman/listinfo/xml


Re: [xml] libxml2-2.7.8 and MinGW

2011-12-27 Thread Roumen Petrov

Earnie wrote:

Earnie wrote:

Roumen Petrov wrote:

[SNIP]

And now with attachments.


libxml2-git-mingw32.patch is fine .

Roumen

___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
http://mail.gnome.org/mailman/listinfo/xml


Re: [xml] libxml2-2.7.8 and MinGW

2011-12-27 Thread Roumen Petrov

Earnie wrote:

Roumen Petrov wrote:

Earnie wrote:

Earnie wrote:

Roumen Petrov wrote:

Earnie wrote:

[SNIP]

About libxslt patch:
Changes in  libexslt/exsltexports.h and libxslt/xsltexports.h break
static only build.



How should that happen?  I'll check it out soon.


For static only build libxml configure script force XXX_STATIC defines.
I guess that same idea has to be implemented for libxslt.



Update in tests/plugins/testplugin.c is fine.  In addition for mingw*
hosts attached 0001-build-test-plugin-for-mingw-host.patch is required :
   WIN32_EXTRA_LDFLAGS add no-undefined and this will allow plugin to be
build as shared library and test pass.



And this one.  Note -no-undefined is a libtool option while
--no-undefined is an ld option which is on by default for MinGW.



I mean libtool flag to allow  shared library build.

Roumen
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
http://mail.gnome.org/mailman/listinfo/xml


Re: [xml] libxml2-2.7.8 and MinGW

2011-12-23 Thread Roumen Petrov

Earnie wrote:

Earnie wrote:

Roumen Petrov wrote:

Earnie wrote:

[SNIP]


As discussed on the MinGW list here are the patches for both libxml2 and
libxslt adorning dllexport with extern for both __CYGWIN__ and __MINGW32__.

During the discussion on the MinGW list we discovered the following bit
of information about dllexport:

From:
http://msdn.microsoft.com/en-us/library/y4h7bcy6.aspx

The use of dllexport implies a definition, while dllimport implies a
declaration. You must use the extern keyword with dllexport to force a
declaration; otherwise, a definition is implied.


And now with attachments.



About libxslt patch:
Changes in  libexslt/exsltexports.h and libxslt/xsltexports.h break 
static only build.


Update in tests/plugins/testplugin.c is fine.  In addition for mingw* 
hosts attached 0001-build-test-plugin-for-mingw-host.patch is required :
  WIN32_EXTRA_LDFLAGS add no-undefined and this will allow plugin to be 
build as shared library and test pass.



Roumen
From 7d593ba4672e88b3f5be17dde3374bd5c27fa155 Mon Sep 17 00:00:00 2001
From: Roumen Petrov bugtr...@roumenpetrov.info
Date: Sat, 24 Dec 2011 01:27:48 +0200
Subject: [PATCH] build test plugin for mingw host

---
 tests/plugins/Makefile.am |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tests/plugins/Makefile.am b/tests/plugins/Makefile.am
index b008f62..48f71d0 100644
--- a/tests/plugins/Makefile.am
+++ b/tests/plugins/Makefile.am
@@ -17,7 +17,7 @@ plugindir=$(shell pwd)/.libs/
 xmlsoft_org_xslt_testplugin_la_CFLAGS = -DMODULE_COMPILE $(LIBXML_CFLAGS) $(LIBXSLT_CFLAGS)
 xmlsoft_org_xslt_testplugin_la_SOURCES = testplugin.c
 xmlsoft_org_xslt_testplugin_la_LIBADD = $(top_builddir)/libxslt/libxslt.la $(EXTRA_LIBS)
-xmlsoft_org_xslt_testplugin_la_LDFLAGS = -module -avoid-version -rpath $(plugindir)
+xmlsoft_org_xslt_testplugin_la_LDFLAGS = -module -avoid-version $(WIN32_EXTRA_LDFLAGS) -rpath $(plugindir)
 
 all:
 
-- 
1.7.1

___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
http://mail.gnome.org/mailman/listinfo/xml


Re: [xml] libxml2-2.7.8 and MinGW

2011-12-07 Thread Roumen Petrov

Earnie wrote:
[SNIP]

As discussed on the MinGW list here are the patches for both libxml2 and
libxslt adorning dllexport with extern for both __CYGWIN__ and __MINGW32__.

During the discussion on the MinGW list we discovered the following bit
of information about dllexport:

From:
http://msdn.microsoft.com/en-us/library/y4h7bcy6.aspx

The use of dllexport implies a definition, while dllimport implies a
declaration. You must use the extern keyword with dllexport to force a
declaration; otherwise, a definition is implied.


And now with attachments.



Reviewing just files it seems to me correct .
Personally I cannot test right now . I think that in following 2 weeks I 
will found enough free time to build and run tests (I know that ebcdic 
and utf-16 tests fail on mingw*).


Roumen
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
http://mail.gnome.org/mailman/listinfo/xml


Re: [xml] libxml2-2.7.8 and MinGW

2011-12-06 Thread Earnie
Earnie wrote:
 Roumen Petrov wrote:
 Earnie wrote:
 Earnie wrote:
 Roumen Petrov wrote:
 Earnie wrote:
 Earnie wrote:
 I've been building libxml2-2.7.8 and have been having a heck of
 a time getting xmlcatalog to work with a shared DLL library.
 I've finally confirmed that the issue is caused by optimizations
 with -O2 or -O1. If I use -O0 the issue goes away. The effect is
 the xmlIsPubidChar_tab array is seen by xmlcatalog to contain all
 0x00 values. I'm using GCC-4.6.1 and binutils-2.21.53.20110804
 as delivered by MinGW. I wanted give this list a report of what
 I've found in the event others come by, they may have already.
 hmm ,

 Look like regression as it is fine with me for gcc/binutils: -
 3.4.5/2.17.50 20070129 - 4.4.0/2.19.1

 It was Kai Tietz who is active in GCC development for Windows and one of
 its maintainers who pointed me to the issue resolution.

 See http://thread.gmane.org/gmane.comp.gnu.mingw.user/38000 for the
 discussion.
 [SNIP]
 Above like is fine to follow the thread .
 I'm not against the patch
 a) it will resolve linking issue if libxml2 is build with gcc (mingw)
 and -nocommon flag.
 b) it will resolve issue with new gnu compiler/linker
 c) libxslt and xmlsec for instance use extern for mingw* compilers

 Lets first finish discussion on mingw list as libxml and libxslt does
 not use extern for cygwin compiler. If cygwin build is impacted then
 complete patch must cover both woe compilers. Also  another patch for
 libxslt is required .

 
 As discussed on the MinGW list here are the patches for both libxml2 and
 libxslt adorning dllexport with extern for both __CYGWIN__ and __MINGW32__.
 
 During the discussion on the MinGW list we discovered the following bit
 of information about dllexport:
 
 From:
 http://msdn.microsoft.com/en-us/library/y4h7bcy6.aspx
 
 The use of dllexport implies a definition, while dllimport implies a
 declaration. You must use the extern keyword with dllexport to force a
 declaration; otherwise, a definition is implied.
 
And now with attachments.

-- 
Earnie
-- https://sites.google.com/site/earnieboyd/
-??-?? Earnie Boyd ear...@users.sourceforge.net
* include/libxml/xmlexports.h (XMLPUBFUN): Decorate with extern for both
__MINGW32 and __CYGWIN__ as required by the MSDN documentation for
dllexport.
(XMLPUBVAR): Ditto.
diff --git a/include/libxml/xmlexports.h b/include/libxml/xmlexports.h
index 9c6790c..cdcda5a 100644
--- a/include/libxml/xmlexports.h
+++ b/include/libxml/xmlexports.h
@@ -114,8 +114,8 @@
* by also making that declaration when compiling client code.
*/
   #if defined(IN_LIBXML)  !defined(LIBXML_STATIC)
-#define XMLPUBFUN __declspec(dllexport)
-#define XMLPUBVAR __declspec(dllexport)
+#define XMLPUBFUN __declspec(dllexport) extern
+#define XMLPUBVAR __declspec(dllexport) extern
   #else
 #define XMLPUBFUN
 #if !defined(LIBXML_STATIC)
@@ -138,8 +138,8 @@
   #undef XMLCALL
   #undef XMLCDECL
   #if defined(IN_LIBXML)  !defined(LIBXML_STATIC)
-#define XMLPUBFUN __declspec(dllexport)
-#define XMLPUBVAR __declspec(dllexport)
+#define XMLPUBFUN __declspec(dllexport) extern
+#define XMLPUBVAR __declspec(dllexport) extern
   #else
 #define XMLPUBFUN
 #if !defined(LIBXML_STATIC)
-??-?? Earnie Boyd ear...@users.sourceforge.net
* libexslt/exsltexports.h (EXSLTPUBFUN): Decorate with extern for both
__MINGW32__ and __CYGWIN__ as required by the MSDN documentation for
dllexport.
(EXSLTPUBVAR): Ditto.
* libxslt/xsltexports.h (XSLTPUBFUN): Ditto.
(XSLTPUBVAR): Ditto.
* tests/plugins/testplugin.c (xmlsoft_org_xslt_testplugin_init):
Decorate the declaration with extern as required by the MSDN
documentation for dllexport.
diff --git a/libexslt/exsltexports.h b/libexslt/exsltexports.h
index bead915..6cf3f8b 100644
--- a/libexslt/exsltexports.h
+++ b/libexslt/exsltexports.h
@@ -91,11 +91,8 @@
   #undef EXSLTPUBFUN
   #undef EXSLTPUBVAR
   #undef EXSLTCALL
-/*
   #if defined(IN_LIBEXSLT)  !defined(LIBEXSLT_STATIC)
-*/
-  #if !defined(LIBEXSLT_STATIC)
-#define EXSLTPUBFUN __declspec(dllexport)
+#define EXSLTPUBFUN __declspec(dllexport) extern
 #define EXSLTPUBVAR __declspec(dllexport) extern
   #else
 #define EXSLTPUBFUN
@@ -117,8 +114,8 @@
   #undef EXSLTPUBVAR
   #undef EXSLTCALL
   #if defined(IN_LIBEXSLT)  !defined(LIBEXSLT_STATIC)
-#define EXSLTPUBFUN __declspec(dllexport)
-#define EXSLTPUBVAR __declspec(dllexport)
+#define EXSLTPUBFUN __declspec(dllexport) extern
+#define EXSLTPUBVAR __declspec(dllexport) extern
   #else
 #define EXSLTPUBFUN
 #if !defined(LIBEXSLT_STATIC)
diff --git a/libxslt/xsltexports.h b/libxslt/xsltexports.h
index 825c122..bfefb60 100644
--- a/libxslt/xsltexports.h
+++ b/libxslt/xsltexports.h
@@ -93,11 +93,8 @@
   #undef XSLTPUBFUN
   #undef XSLTPUBVAR
   #undef XSLTCALL
-/*
   #if defined(IN_LIBXSLT)