Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Editing RPATH of Perl module XML::Parserby virtualdj (Initiate) |
on Dec 11, 2011 at 14:03 UTC ( [id://942947]=perlquestion: print w/replies, xml ) | Need Help?? |
virtualdj has asked for the wisdom of the Perl Monks concerning the following question: Hi, this question follows the solved one with node id 942437. On a Debian VM I've compiled the latest Perl and installed a lot of CPAN modules - including XML::Parser - into a custom folder /root/perl5. Now I want to copy that folder on a QNAP NAS with embedded Linux (on a folder named /share/FTP/xmltv) and, following the advice of building Perl from sources by Eliya, it works quite perfectly. There is only a problem: I'm forced to export LD_LIBRARY_PATH to run XML::Parser and that's not what I want because I want to use my spefic versions of the libraries (on /share/FTP/xmltv/lib) and not those on the QNAP (/usr/lib). Look at this code:
If you see the RPATH of the Expat.so library, which should be part of XML::Parser, it corresponds to the path of the Debian Virtual Machine where I've compiled the module. I want to have a single root folder which can be placed anywhere (in this case /share/FTP/xmltv) on the NAS from which I can launch ./bin/perl (after exporting PERL5LIB) and all the modules have to look for their libraries inside ./lib. I think that this could be done by specifying LDFLAGS="-R$ORIGIN/../lib" but while it does work for C, I'm not able to do this with Perl/CPAN. How can I do? I've compiled XML::Parser in this way on the VM:
As I will have to do the same for XML::LibXML and XML::LibXSLT will the eventual solution work too? Thank you.
Back to
Seekers of Perl Wisdom
|
|