Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • $ENV{ LD_LIBRARY_PATH } = $whatever;
    exec { $0 } $0, @ARGV

    ?

    • Yes, this is more or less the workaround I came up with. (Although I'm unfamiliar with that block syntax passed to exec and am about to go look that up and learn something new. :) ).

      It's not my preference, but it beats a wrapper all to pieces. I can write a routine which checks LD_LIBRARY_PATH, returns if it's already been modified, and then modifies it and re-execs. And then I can throw that routine into a module for every single program on this box to use. (Sigh.)

      My only fear so far is what happens when I try this from cron and the script isn't sure what directory it is running out of, but soon I'll have that tested and know if it works or not.

      But really, as I just said in my other post to Uri, the real solution is for Oracle.so to get compiled right so that this is not necessary. LD_LIBRARY_PATH should only have to be set to override libraries that already work for certain testing or compilation purposes. You shouldn't have to set it to get things to work in the first place.

      --
      J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers
      • You could try adding the pertinent directory to /etc/ld.so.conf (assuming this is Linux; maybe on Unices as well, but I have no experience with them).

        • (After which, of course, you’ll have to run ldconfig to refresh the linker run time bindings.)

        • It's Solaris, and even if it weren't I could not do that because it would mess up many, many other apps. Everything else on this box needs the other library directory.

          Be sure to check out Why LD_LIBRARY_PATH is bad [visi.com] if you haven't already. It mentions ld.so.conf . :)

          --
          J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers