Subject: LD_LIBRARY and p5-XML-LibXML problems on Solaris 9
To: None <tech-pkg@NetBSD.org>
From: Ulrich Habel <rhaen@NetBSD.org>
List: tech-pkg
Date: 11/30/2007 22:54:59
Solaris 9 brings a libxml2 library by default. When I try to build
p5-XML-LibXML, pkgsrc checks for it's own libxml2 and builds it. After
that, p5-XML-LibXML will be build and results in a working package.


However when you call the module it checks against the Solaris libxml2
library and fails.


bash-2.05# /usr/pkg/bin/perl -MXML::LibXML -e 'print
 "$XML::LibXML::VERSION\n"'

Can't load
'/usr/pkg/lib/perl5/vendor_perl/5.8.0/sparc-solaris-thread-multi/auto/XML/LibXML/LibXML.so'
for module XML::LibXML: ld.so.1: perl: fatal: relocation error: file
/usr/pkg/lib/perl5/vendor_perl/5.8.0/sparc-solaris-thread-multi/auto/XML/LibXML/LibXML.so:
symbol xmlIsBaseCharGroup: referenced symbol not found at
/usr/pkg/lib/perl5/5.8.0/sparc-solaris-thread-multi/DynaLoader.pm line
230.  at
/usr/pkg/lib/perl5/vendor_perl/5.8.0/sparc-solaris-thread-multi/XML/LibXML.pm
line 116 BEGIN failed--compilation aborted at
/usr/pkg/lib/perl5/vendor_perl/5.8.0/sparc-solaris-thread-multi/XML/LibXML.pm
line 116.  Compilation failed in require.  BEGIN failed--compilation
aborted.


if you, however, force LD_LIBRARY_PATH to /usr/pkg/lib it works as
expected:

bash-2.05# LD_LIBRARY_PATH=/usr/pkg/lib /usr/pkg/bin/perl -MXML::LibXML
-e 'print "$XML::LibXML::VERSION\n"
 1.65


This results in other broken packages (like p5-XML-Atom) - is there any
chance to fix that? A solution might be to set /usr/pkg/lib with crle
before the other search paths. However, I don't like the solution.

Am I missing something, any ideas?