Skip Menu |

This queue is for tickets about the XML-LibXSLT CPAN distribution.

Report information
The Basics
Id: 48247
Status: resolved
Priority: 0/
Queue: XML-LibXSLT

People
Owner: Nobody in particular
Requestors: kmx [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Hi, I am sending a little patch against current SVN trunk (rev 216). The patch solves the DLL name collision on Win32. Unfortunately it uses some dynaloader feature that is broken in 5.10.0; however I consider it much better solution than renaming the standard libxslt.dll. To be honest the idea is not mine but works (tested on strawberry perl/5.8.9). Can I ask you what are the plans for the next release? (because quite important changes concerning Win32 are currently just in SVN version). -- kmx
Index: Makefile.PL =================================================================== --- Makefile.PL (revision 216) +++ Makefile.PL (working copy) @@ -172,6 +172,13 @@ $config{dynamic_lib} = { OTHERLDFLAGS => " $ldflags " }; } +# Avoid possible shared library name conflict. On Win32 systems +# the name of system DLL libxlst.dll clashes with module's LibXSLT.dll. +# To handle this we are gonna name module's DLL LibXSLT.xs.dll. +# BEWARE: due to a bug in dynaloader it does not work on perl 5.10.0/Win32, +# there are rumours around that it will be fixed in 5.10.1. Works fine on 5.8.9. +$config{DLEXT} = 'xs.dll' if ($is_Win32); + WriteMakefile( 'NAME' => 'XML::LibXSLT', 'VERSION_FROM' => 'LibXSLT.pm', # finds $VERSION Index: LibXSLT.pm =================================================================== --- LibXSLT.pm (revision 216) +++ LibXSLT.pm (working copy) @@ -21,6 +21,9 @@ @ISA = qw(DynaLoader); +# avoid possible shared library name conflict on Win32 +local $DynaLoader::dl_dlext = "xs.$DynaLoader::dl_dlext" if ($^O eq 'MSWin32'); + bootstrap XML::LibXSLT $VERSION; # the following magic lets XML::LibXSLT internals know
Dne po 27.čec.2009 15:47:09, KMX napsal(a): Show quoted text
> Hi, > > I am sending a little patch against current SVN trunk (rev 216). The > patch solves the DLL name collision on Win32. Unfortunately it uses some > dynaloader feature that is broken in 5.10.0; however I consider it much > better solution than renaming the standard libxslt.dll. > > To be honest the idea is not mine but works (tested on strawberry > perl/5.8.9). > > Can I ask you what are the plans for the next release? (because quite > important changes concerning Win32 are currently just in SVN version). > > -- > kmx
Could you make the patch not make the change if 5.10.0 is detected and instead produce a warning with a hint (e.g. to use the old renaming approach)? There are a few pending patches, and due to my busy schedule I won't be able to complete the release before end of august. -- Petr
Show quoted text
> Could you make the patch not make the change if 5.10.0 is detected and > instead produce a warning with a hint (e.g. to use the old renaming > approach)?
Yes, see attached patch. The end of August for the next release would be nice. -- kmx
Index: Makefile.PL =================================================================== --- Makefile.PL (revision 216) +++ Makefile.PL (working copy) @@ -172,6 +172,30 @@ $config{dynamic_lib} = { OTHERLDFLAGS => " $ldflags " }; } +# Avoid possible shared library name conflict. On Win32 systems +# the name of system DLL libxlst.dll clashes with module's LibXSLT.dll. +# To handle this we are gonna rename module's DLL to LibXSLT.xs.dll. +if ($is_Win32) { + if ($] eq '5.010000') { + print STDERR <<5100BUG; +******************************** !!!WARNING!!! ******************************** +According to the version string you are running a win32 perl 5.10.0 that is +known to be suffering from dynaloader bug that prevents using non-default +module's DLL name. Therefore we have to use LibXSLT.dll that will clash with the +standard name of xslt library DLL. Please consider renaming your xslt library +to e.g. libxslt_win32.dll and then make the appropriate changes to this module's +build process to look for that instead of standard libxslt.dll. If you do not +make the proposed changes you will got during the tests many error popups with +slightly confusing message about "xsltApplyOneTemplate" function. +This bug is not present in perl 5.8.* and will be fixed in 5.10.1. +******************************************************************************* +5100BUG + } + else { + $config{DLEXT} = 'xs.dll' if ($is_Win32); + } +} + WriteMakefile( 'NAME' => 'XML::LibXSLT', 'VERSION_FROM' => 'LibXSLT.pm', # finds $VERSION Index: LibXSLT.pm =================================================================== --- LibXSLT.pm (revision 216) +++ LibXSLT.pm (working copy) @@ -21,6 +21,10 @@ @ISA = qw(DynaLoader); +# avoid possible shared library name conflict on Win32 +# not using this trick on 5.10.0 (suffering from DynaLoader bug) +local $DynaLoader::dl_dlext = "xs.$DynaLoader::dl_dlext" if (($^O eq 'MSWin32') && ($] ne '5.010000')); + bootstrap XML::LibXSLT $VERSION; # the following magic lets XML::LibXSLT internals know
Is the patch OK? -- kmx
Yes, sorry for late response. The Patch seems fine, I'll apply it to the SVN in a moment. Thanks a lot! -- Petr Dne ne 02.srp.2009 13:01:55, KMX napsal(a): Show quoted text
> Is the patch OK? > > -- > kmx
Hi Petr, I would like to ask you when you expect the next release of XML-LibXSLT? We are gonna release the next Win32/strawberry perl (October 2009 release) with newly added libxslt support; however it works only with the SVN version of XML-LibXSLT (the latest version available on CPAN is not good enough). Thanks for any reply. -- kmx
Dne st 23.zář.2009 02:30:51, KMX napsal(a): Show quoted text
> Hi Petr, > > I would like to ask you when you expect the next release of XML-LibXSLT? > > We are gonna release the next Win32/strawberry perl (October 2009 > release) with newly added libxslt support; however it works only with > the SVN version of XML-LibXSLT (the latest version available on CPAN is > not good enough). > > Thanks for any reply. > > -- > kmx
Hi, I fixed most reported XML::LibXSLT bugs, now I'm working on cleaning the LibXML queue, which should take a day or two. Unfortunately, at this point I can only release the two modules simulataneously due to changes in binary compatibility. BTW, would a developer's release be fine with you? What's the deadline for the October release? -- Petr
Subject: Re: [rt.cpan.org #48247] Win32 patch (against trunk)
Date: Fri, 25 Sep 2009 14:15:06 +0200
To: bug-XML-LibXSLT [...] rt.cpan.org
From: kmx <kmx [...] volny.cz>
Show quoted text
> BTW, would a developer's release be fine with you?
It is not necessary to prepare the dev release. Note for you to understand our goal: - we have included into Oct2009 release the new binary libraries for libxml2 + libxslt (DLLs as well as dev files *.a/*.h). - the XML::LibXML(1.69) is already included in the release - XML::LibXSLT not (yet) - however our main concern is to be more or less sure that the libxml2 + libxslt libraries included in Win32/strawberry perl will co-operate with XML::Lib(XML|XSLT) Makefiles To sum up: - stable XML::LibXSLT might come later - but we want to be sure that our libxml2 + libxslt libraries in our Oct2009 release will allow users to easy install by: cpan XML::LibXSLT If you will be close to the release of new XML::LibXML + XML::LibXSLT I will be happy to test it on Win32/strawberry (if you find it useful). Show quoted text
> What's the deadline for the October release? >
I expect the release day to be as usual the last day of October. -- kmx
On Fri Sep 25 08:15:27 2009, kmx@volny.cz wrote: Show quoted text
>
> > BTW, would a developer's release be fine with you?
If you can't get a regular release done in time, a dev release will work - but it's not preferred. [I'm popping in because I'm Strawberry Perl's maintainer/builder. kmx has been "working for me" in trying to get this to work.] Show quoted text
> Note for you to understand our goal: > - we have included into Oct2009 release the new binary libraries for > libxml2 + libxslt (DLLs as well as dev files *.a/*.h). > - the XML::LibXML(1.69) is already included in the release - > XML::LibXSLT not (yet)
And we'd like to be able to do so, if possible. If you're not comfortable with that, to at least have "cpan XML::LibXSLT" working. ... Show quoted text
> To sum up: > - stable XML::LibXSLT might come later > - but we want to be sure that our libxml2 + libxslt libraries in our > Oct2009 release will allow users to easy install by: cpan XML::LibXSLT > > If you will be close to the release of new XML::LibXML + XML::LibXSLT I > will be happy to test it on Win32/strawberry (if you find it useful). >
> > What's the deadline for the October release? > >
> > I expect the release day to be as usual the last day of October.
Which means that I'll need to start building release candidates on the 16th of October, if July was any indication - so that's the "inclusion" deadline, because what I do is to download a minicpan at that point to keep things stable to build the RC's and the final against. Speaking of which, feel free to use Beta2 to test against. That's what it's for.
FYI, The uploaded file XML-LibXSLT-1.70.tar.gz has entered CPAN as file: $CPAN/authors/id/P/PA/PAJAS/XML-LibXSLT-1.70.tar.gz size: 80405 bytes md5: c63a7913999de076e5c911810f69b392 -- Petr