Building XML::LibXML with libs in a non-standard location

Michael Ludwig <[email protected]>
Newsgroups gmane.comp.lang.perl.xml
Message-ID <[email protected]>
Folks,

I'm trying to build XML::LibXML with libs in a non-standard location.
I want the linker to pick up the libraries in /usr/local/libxml2-git.
Unfortunately, it always picks up the libraries in /usr/local instead.
The XML::LibXML version is 1.69. The LibXML2 version is 2.7.4 in
/usr/local and Git HEAD in the non-standard location.

Here's what I've done:

(1) Added /usr/local/libxml2-git/lib to /etc/ld.so.conf.d/bla.conf so it
appears before /usr/local/lib. Which works, as shown by ldconfig -p:

   libxml2.so.2 (libc6) => /usr/local/libxml2-git/lib/libxml2.so.2
   libxml2.so.2 (libc6) => /usr/local/lib/libxml2.so.2
   libxml2.so.2 (libc6) => /usr/lib/libxml2.so.2
   libxml2.so (libc6) => /usr/local/libxml2-git/lib/libxml2.so
   libxml2.so (libc6) => /usr/local/lib/libxml2.so
   libxml2.so (libc6) => /usr/lib/libxml2.so

(2) Defined LD_LIBRARY_PATH and even LD_RUN_PATH, only because ldconfig
alone didn't make the linker aware of my new libs.

LD_LIBRARY_PATH=/usr/local/libxml2-git/lib
LD_RUN_PATH=/usr/local/libxml2-git/lib

(3) Passed -L option to Makefile.PL:

# perl Makefile.PL LIBS='-L/usr/local/libxml2-git/lib'

Doing this, I get lots of errors:

LibXML.xs:1459: error: 'xmlPedanticParserDefaultValue' undeclared
(first use in this function)

Not doing this, the build works fine, but against /usr/local, not
against my non-standard location.

What am I missing?

How is it meant to work?

What's the significance of the steps (1), (2) and (3) described above?
Any of it good or bad or necessary or pointless?

Michael
_______________________________________________
Perl-XML mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.