In my case, I do want it to overwrite the path, because the 'default' environment "they" have picked for us has a bunch of crap in LD_LIBRARY_PATH, and I want shared lib paths to default to the path that the other shared libs were compiled under, not get overridden by LD_LIBRARY_PATH.

E.g., (On Solaris) I've compiled a new libxml2 in a non-standard place, and compiled XML::LibXML against that new version. With LD_LIBRARY_PATH unset, it finds the right libxml2. If I leave LD_LIBRARY_PATH set, it finds the old version and complains. I've tried adding '-i' to the LDDLFLAGS when compiling XML::LibXML to try and say 'ignore LD_LIBRARY_PATH' (-R/path was already being used), but it doesn't seem to work, so this is my BandAid(tm).

And it seems to work ok without the "env" (though if this were a universal portable solution, I'd put it in).

Oh, and if you want to add paths instead of overwrite it, I'm sure you could just pass the current value of LD_LIBRARY_PATH in to the import list along with other paths.

Update: AFAICT, my main issue seems to be that "they" decided to put "/usr/lib" in LD_LIBRARY_PATH, which, if my recent research has led me to a correct conclusion, is a bad bad thing.


In reply to Re^2: Set LD_LIBRARY_PATH and restart program (improvements) by runrig
in thread Set LD_LIBRARY_PATH and restart program by runrig

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.