Skip Menu |

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

Report information
The Basics
Id: 90064
Status: rejected
Priority: 0/
Queue: XML-LibXML

People
Owner: Nobody in particular
Requestors: Katharina.Benkert [...] vector.com
Cc:
AdminCc:

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



Subject: Problems using library and include paths
Date: Tue, 5 Nov 2013 16:12:26 +0000
To: "bug-XML-LibXML [...] rt.cpan.org" <bug-XML-LibXML [...] rt.cpan.org>
From: "Benkert, Katharina" <Katharina.Benkert [...] vector.com>
Dear ladies and gentlemen, when trying to install LibXML on Windows7 I had problems with the check_lib() call in _libxml_check_lib_with_config_LIBs(). - CheckLib.pm looks for the hash entry 'libpath' not 'LIBS', so the code in Makefile.PL should be something like $conf_LIBS =~ s/ -l\w+//g; return check_lib( .... libpath => [split(/\s/,$conf_LIBS)], ... ) - The command line argument 'INC' has to be given without '-I' prefixes for CheckLib to work, but during Makefile generation the prefix is not added - I tried to use the command line argument 'LDFLAGS' but it has no effect on the check in CheckLib or Makefile generation I ended up disabling the checks and editing parts of the generated Makefile, then an 'nmake install_perl' worked. With kind regards Dr. Katharina Benkert ----------------------------------------------------- Software Development Engineer PES1.3 Vector Informatik GmbH Ingersheimer Str. 24 70499 Stuttgart Deutschland Tel.: +49 711 80670-3869 Fax: +49 711 80670- mailto: Katharina.Benkert@vector.com<mailto:Katharina.Benkert@vector.com> Internet: www.vector.com<http://www.vector.com/> Sitz der Gesellschaft: Stuttgart Handelsregister: Amtsgericht Stuttgart, HRB 17317 Geschäftsführer: Dr. Thomas Beck, Eberhard Hinderer, Martin Litschel, Thomas Riegraf, Dr. Helmut Schelling ----------------------------------------------------- [cid:image001.png@01CEDA49.6DF91030]
Download image001.png
image/png 2.2k
image001.png
Hi Dr. Benkert, On Tue Nov 05 11:12:50 2013, Katharina.Benkert@vector.com wrote: Show quoted text
> Dear ladies and gentlemen, > > when trying to install LibXML on Windows7 I had problems with the > check_lib() call in _libxml_check_lib_with_config_LIBs().
OK, I guess by "LibXML" you mean the "XML-LibXML" distribution (please correct me if I'm wrong). Anyway, which perl distribution and version are you using? I would recommend Strawberry Perl - http://strawberryperl.com/ . Show quoted text
> > > - CheckLib.pm looks for the hash entry 'libpath' not 'LIBS', > so the code in Makefile.PL should be something like
Actually, it looks for "LIBS" too. I checked it in the one under inc. Show quoted text
> > $conf_LIBS =~ s/ -l\w+//g; > return > check_lib( > .... > libpath => [split(/\s/,$conf_LIBS)], > ... > ) > > - The command line argument 'INC' has to be given without '- > I' prefixes for CheckLib to work, but during Makefile generation the > prefix is not added > > - I tried to use the command line argument 'LDFLAGS' but it > has no effect on the check in CheckLib or Makefile generation > > I ended up disabling the checks and editing parts of the generated > Makefile, then an 'nmake install_perl' worked. >
OK, it may be a problem with Devel::CheckLib. Regards, -- Shlomi Fish
It would helpful to know which version of XML::LibXML and Perl and which C compiler was used. Since 'nmake' was mentioned, I guess that it's a ActivePerl/MSVC setup. Having a look at Makefile.PL, it seems that building with MSVC was never supported.
On Mon Mar 10 09:25:42 2014, NWELLNHOF wrote: Show quoted text
> Having a look at Makefile.PL, it seems that building with MSVC was > never supported.
I have to retract this statement. I was able to build XML::LibXML with MSVC with a small adjustment to Makefile.PL (see attachment). It's only important to pass the include and library paths like you would for gcc. The following worked for me: perl Makefile.PL "INC=-IC:\path\to\libxml\include -IC:\path\to\iconv\include" "LIBS=-LC:\path\to\libxml2\lib"
Subject: rt90064.diff
diff -r ad8f8a761f61 Makefile.PL --- a/Makefile.PL Mon Mar 10 13:14:19 2014 +0100 +++ b/Makefile.PL Mon Mar 10 15:36:43 2014 +0100 @@ -309,6 +309,7 @@ # Put several options. $config_LIBS_alternatives = [ map { "$l $_" } + q/ -llibxml2/, q/ -lxml2 -lzlib/, q/ -llibxml2 -lzlib -llibgettextlib.dll/ ];
On Mon Mar 10 10:37:23 2014, NWELLNHOF wrote: Show quoted text
> On Mon Mar 10 09:25:42 2014, NWELLNHOF wrote:
> > Having a look at Makefile.PL, it seems that building with MSVC was > > never supported.
> > I have to retract this statement. I was able to build XML::LibXML with > MSVC with a small adjustment to Makefile.PL (see attachment). It's > only important to pass the include and library paths like you would > for gcc. The following worked for me: > > perl Makefile.PL "INC=-IC:\path\to\libxml\include > -IC:\path\to\iconv\include" "LIBS=-LC:\path\to\libxml2\lib"
Thanks Neil for the patch. I applied it now in the repository. Furthermore, I'm resolving this bug as REJECTED because Dr. Benkert was not responsive for many months and did not provide us with the necessary info. Feel free to reopen this bug or file a new one (and please be more responsive next time).