Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: loading libxml2 as a prerequisite

by jandrew (Chaplain)
on Nov 19, 2014 at 13:13 UTC ( [id://1107747]=note: print w/replies, xml ) Need Help??


in reply to loading libxml2 as a prerequisite

Since it appears that the journey here leads down the road of a better Alien::LibXML does anyone have a suggestion of an Alien::XXX module that represents best practice?

I am starting by reading Alien::Base::Authoring and family but in the past I have always found the most success if I also beg, borrow, steal from good samples when I enter a new area of study. My preference would be something that uses the Alien::Base ecosystem so I can leverage the reading and borrowing together.

In this case I mostly need the Linux / Unix side to work better so that would be another 'nice to have' when I borrow.

Replies are listed 'Best First'.
Re^2: loading libxml2 as a prerequisite
by RonW (Parson) on Nov 19, 2014 at 17:50 UTC

    It's not the fault of Alien::LibXML. It installs libxml and, if asked, supplies the location. The problem is that nobody is asking. (Alien::LibXML can't simply install libXML in, for example, /usr/lib, because it doesn't have the authority to do so. Also, different distros put libraries in different places and/or might have an older version the distro needs.)

    Even when your module says it depends on Alien::LibXML and XML::LibXML, the cpan installer doesn't automatically tell each module it's installing about any other modules. If a module needs information about other modules, it has to get that information itself.

    In the case of XML::LibXML, if it's Build.pl (or whatever it uses) can't find libxml, it could then try to require Alien::LibXML. If that succeeds, it could then ask Alien::LibXML where libXML is.

    Update: However, I don't think there's a way to make a conditional dependency. If libxml were already installed, Alien::LibXML could skip installing it (unless the user specified otherwise), Alien::LibXML itself would still get installed if listed as a dependency by another module.

      As I mentioned in my first post this question has taken me down a path in perl that I rarely travel. (That is a good thing) I would like to thank the monks for their general patience.

      On the resolution front it appears that the root cause of my initial issue is that the libxml2-dev libraries also need to be installed incremental to the libxml2 libraries in order for XML::LibXML to be installed. I am now in the process of figuring that out.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1107747]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2024-04-26 03:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found