Hi all,
We're beating our head against a wall. Consider:

BEGIN { $ENV{"LD_LIBRARY_PATH"} = /usr/local/lib:/usr/platform/SUNW,Ultra-80 +/lib:/usr/lib"; } ... code ... $dbh = DBI->connect('DBI:Sybase:CIC7P', 'mikeraz', 'bruised_head',{ Ra +iseError => 0, PrintError => 1, PrintWarn => 1}) ;
This dies with message:
DBI 1.48-nothread default trace level set to 0x0/5 (pid 11864) -> DBI->connect(DBI:Sybase:CIC7P, mikeraz, ****, HASH(0x152e54)) -> DBI->install_driver(Sybase) for solaris perl=5.008005 pid=11864 + ruid=12647 euid=12647 install_driver(Sybase) failed: Can't load '/usr/local/lib/perl5/site_p +erl/5.8.5/sun4-solaris/auto/DBD/Sybase/Sybase.so' for module DBD::Syb +ase: ld.so.1: perl: fatal: libgcc_s.so.1: open failed: No such file o +r directory at /usr/local/lib/perl5/5.8.5/sun4-solaris/DynaLoader.pm +line 230.
but if I, before running the program set up my environment:

bash-2.05$ LD_LIBRARY_PATH=/usr/local/lib:/usr/platform/SUNW,Ultra-80/lib:/usr/lib
bash-2.05$ export LD_LIBRARY_PATH
the script runs fine.

We're at a loss for why setting LD_LIBRARY_PATH from within the script doesn't work. The script is called from a program and the UID that it operates under does not have LD_LIBRARY_PATH defined. Nor, in our corporate environment, can it be.

Suggestions?

Update: node DynaLoader and LD_LIBRARY_PATH and programatically setting the LD_LIBRARY_PATH have the answer to this question and more background on how to put it into effect.

Michael 'off to Super Search School' R

Be Appropriate && Follow Your Curiosity

In reply to ENV setting for library loading failure by mikeraz

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.