You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I see there has been major updates in the build process of XML::LibXML since version 2.0200 and the introduced dependency to Alien::Libxml2. The project I'm trying to build (a self contained perl + several CPAN modules) was using version 2.0132 and was statically linking zlib and libxml2 at build time by providing the INC and LIBS args to Makefile.PL. How would one go about doing that now that Alien::Libxml2 is used? I couldn't find any any information and my own attempts turned out futile.
Previously with 2.01* versions the Makefile.PL was invoked like so:
This results in an undefined symbol error when I try to use XML::LibXML:
/git/perl/gen/out/perl-5.30.3/bin # ./perl ~/temp/xml.pl
Can't load '/git/perl/gen/out/perl-5.30.3/lib/auto/XML/LibXML/LibXML.so' for module XML::LibXML: /git/perl/gen/out/perl-5.30.3/lib/auto/XML/LibXML/LibXML.so: undefined symbol: xmlTextReaderStandalone at /git/perl/gen/out/perl-5.30.3/lib/DynaLoader.pm line 193.
at /git/perl/gen/out/perl-5.30.3/lib/XML/LibXML.pm line 156.
BEGIN failed--compilation aborted at /git/perl/gen/out/perl-5.30.3/lib/XML/LibXML.pm line 156.
Compilation failed in require at /root/temp/xml.pl line 2.
BEGIN failed--compilation aborted at /root/temp/xml.pl line 2.
Alien::Libxml2 did its job of providing a libxml2 library from xmlsoft.org, but that's of no use to me since I want to use my own. Not to mention that my build infrastructure prohibits outbound connectivity and that causes the Alien::Libxml2 build itself to fail. The output above is from another machine that does not have such a constraint.
TL;DR Can you suggest a way to statically link zlib and libxml2 during XML::LibXML's build time, preferably circumventing the need to use Alien::Libxml2 or at least stopping it from doing outbound connections to satisfy the "missing" dependency. Are there plans to remove the Alien::Libxml2 dependency for such use cases? I ended up needing to add the following CPAN modules to the project just to upgrade to the newest version of XML::LibXML:
Capture-Tiny
ExtUtils-CBuilder
ExtUtils-ParseXS
FFI-CheckLib
JSON-PP
Module-Load
Test-Simple
Text-ParseWords
Path-Tiny
File-Which
File-chdir
Mojo-DOM58
Sort-Versions
Alien-Build
Alien-Libxml2
Enough babbling on my side... Hopefully I managed to explain my issue 😃
Best regards,
Stoyan
The text was updated successfully, but these errors were encountered:
Hi @brodafly ! Sorry for the late reply. First of all, did you manage on your own eventually? Otherwise, there are https://metacpan.org/pod/CPAN::Mini::Inject and similar solutions for non-networked cpan access. I am not an Alien::* expert, just accepted some PRs to replace some complex EU::MM code with them. I can try to answer your question about static linking by studying the docs or the source; you may also be able to do so.
Hi @shlomif, I stumbled upon the same issue more than 3 years later. I tried studying the Makefile.PL of XML::LibXML and Alien::Libxml2's alienfile but I got nowhere. In my case, I need to make XML::LibXML to link statically against zlib, liblzma and libxml2. Previously, I was modifying Makefile.PL manually before building XML::LibXML. There, I changed the $Config LIBS, INC and LDFLAGS properties in the try_libconfig method that's now gone: https://github.com/shlomif/perl-XML-LibXML/blob/2cf922a3d1417336b5591c437b2d257f9b39435a/Makefile.PL.
I'm wondering - should I try adding those flags now to the $Config of XML::LibXML's Makefile.PL or to Alien::Libxml2's alienfile (somehow)?
Hello!
I see there has been major updates in the build process of
XML::LibXML
since version2.0200
and the introduced dependency toAlien::Libxml2
. The project I'm trying to build (a self contained perl + several CPAN modules) was using version2.0132
and was statically linkingzlib
andlibxml2
at build time by providing theINC
andLIBS
args toMakefile.PL
. How would one go about doing that now thatAlien::Libxml2
is used? I couldn't find any any information and my own attempts turned out futile.Previously with
2.01*
versions theMakefile.PL
was invoked like so:... and this resulted in the following call during the make phase to produce the
LibXML.so
:Now with version
2.0206
the providedINC
andLIBS
arguments are ignored, andLibXML.so
is produced like so:This results in an undefined symbol error when I try to use
XML::LibXML
:Alien::Libxml2
did its job of providing a libxml2 library from xmlsoft.org, but that's of no use to me since I want to use my own. Not to mention that my build infrastructure prohibits outbound connectivity and that causes theAlien::Libxml2
build itself to fail. The output above is from another machine that does not have such a constraint.TL;DR Can you suggest a way to statically link
zlib
andlibxml2
duringXML::LibXML
's build time, preferably circumventing the need to useAlien::Libxml2
or at least stopping it from doing outbound connections to satisfy the "missing" dependency. Are there plans to remove theAlien::Libxml2
dependency for such use cases? I ended up needing to add the following CPAN modules to the project just to upgrade to the newest version ofXML::LibXML
:Enough babbling on my side... Hopefully I managed to explain my issue 😃
Best regards,
Stoyan
The text was updated successfully, but these errors were encountered: