Open brodafly opened 3 years ago
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