http://qs1969.pair.com?node_id=1049306


in reply to two versions of libxml2 causing module to fail install

"the version of libxml2.so it (Perl itself?) was compiled against [...] I thought briefly that I should reinstall Perl"

Perl itself does not link to libxml2, so there's no reason to reinstall Perl.

The XML::LibXML Makefile.PL accepts some options for providing the paths to the libxml2 library. You could try installing like e.g.:

Makefile.PL LIBS=/usr/local/lib INC=/usr/local/include make make test sudo make install
package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name

Replies are listed 'Best First'.
Re^2: two versions of libxml2 causing module to fail install
by chexmix (Hermit) on Aug 13, 2013 at 18:36 UTC
    Thanks for the tips ... I set the make_arg conf variable in the CPAN shell to "LIBS=/usr/lib64" and that seems to have done the trick. /GB
      Sorry to resurrect this ... but the trick that worked before seems to no longer work. I am flummoxed.

      The same versions of libxml2 are involved here. Not sure where or how the /usr/local/lib copy of libxml2 is getting pulled in. I have both set the make_arg variable AND removed /usr/local/lib from LD_LIBRARY_PATH.

      Foo. I don't mind some fun sleuthing, but don't really have the time for it now. I will report back with what I find.

        Run 'ldd' on the LibXML.so files under the 'auto' directory of the library, e.g.:
        ldd /usr/perl/lib/site_perl/5.14.1/sun4-solaris-64int-ld/auto/XML/LibX +ML/LibXML.so
        Then play with LD_LIBRARY_PATH (e.g., unset it completely) and see what ldd says.