Thanks for your answer but, unfortunately, it doesn't work.

Actually I've already tried with LDFLAGS but it seems that it doesn't apply to Perl modules (I mean the compiled ".so" files that are placed inside the Perl libraries folder).

You can see it in detail here:

cpan[1]> look XML::Parser debian:~/.cpan/build/XML-Parser-2.41-eA1hds# export LDFLAGS="-R$ORIGIN +/../lib" debian:~/.cpan/build/XML-Parser-2.41-QQ3gvQ# export LD_LIBRARY_PATH=/r +oot/perl5/lib debian:~/.cpan/build/XML-Parser-2.41-eA1hds# perl Makefile.PL EXPATLIB +PATH=/root/perl5/lib EXPATINCPATH=/root/perl5/include Checking if your kit is complete... Looks good Writing Makefile for XML::Parser::Expat Writing MYMETA.yml and MYMETA.json Writing Makefile for XML::Parser Writing MYMETA.yml and MYMETA.json debian:~/.cpan/build/XML-Parser-2.41-QQ3gvQ# make && make install debian:~/.cpan/build/XML-Parser-2.41-QQ3gvQ# readelf -d ./blib/arch/au +to/XML/Parser/Expat/Expat.so | grep RPATH 0x0000000f (RPATH) Library rpath: [/root/perl5/lib]

The last line shows "/root/perl5/lib" instead of the correct "../lib".


In reply to Re^2: Editing RPATH of Perl module XML::Parser by virtualdj
in thread Editing RPATH of Perl module XML::Parser by virtualdj

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.