Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
I've tried that without success

. When I look at the error messages, the error comes from executing /usr/local/test/lib/perl5/5.12.1/sun4-solaris/ at line 200 :

my $libref = dl_load_file($file, $module->dl_load_flags) or croak("Can't load '$file' for module $module: ".dl_error());

where it tries to load /usr/local/test/lib/perl5/site_perl/5.12.1/Sybase/ This files starts with the following code where the last line is on line 19 (the line mentioned in the error).

package Sybase::Simple; use strict; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK); require Exporter; require AutoLoader; use Carp; use Sybase::CTlib qw(:DEFAULT !ct_callback);

This code generates error :

Can't load '/usr/local/test/lib/perl5/site_perl/5.12.1/sun4-solaris/auto/Sybase/CTlib/' for module Sybase::CTlib: perl: fatal: open failed is the first library tries to open :

$ ldd /usr/local/test/lib/perl5/site_perl/5.12.1/sun4-solaris/auto/Syb +ase/CTlib/ => /local/sybase/sdk1251/OCS-12_5/lib// => /local/sybase/sdk1251/OCS-12_5/lib// => /local/sybase/sdk1251/OCS-12_5/lib// => /local/sybase/sdk1251/OCS-12_5/lib//libcomn.s +o => /local/sybase/sdk1251/OCS-12_5/lib//libintl.s +o => /local/sybase/sdk1251/OCS-12_5/lib// => /lib/ => /lib/ => /lib/ => /lib/ => /lib/ => /lib/ => /lib/ => /lib/ => /lib/ => /lib/ /platform/SUNW,Sun-Fire-V490/lib/ /platform/SUNW,Sun-Fire-V490/lib/

I've added 'use lib' statements for the directories mentioned in the error messages. My script now looks like :

#!/usr/local/test/bin/perl use lib "/usr/local/test/lib/perl5/site_perl/5.12.1"; use lib "/usr/local/test/lib/perl5/site_perl/5.12.1/Sybase"; use lib "/usr/local/test/lib/perl5/5.12.1/sun4-solaris"; use lib '/local/sybase/sdk1251/OCS-12_5/lib'; use lib "/usr/local/test/lib/perl5/site_perl/5.12.1/sun4-solaris/auto/ +Sybase/CTlib"; $ENV{'LD_LIBRARY_PATH'} = '/local/sybase/sdk1251/OCS-12_5/lib:/lib:/us +r/openwin/lib:/usr/ccs/l\ ib:/usr/local/lib/perl5/site_perl/5.12.1/sun4-solaris/auto/Sybase/CTli +b'; use Sybase::Simple; exit;

I don't know what else to do, I can try to statically link, but would prefer a more general solution. many thanks, Luc.

In reply to Re^2: adding libs in a setuid-perl script by LucBrussels
in thread adding libs in a setuid-perl script by LucBrussels

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, 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, 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.
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others avoiding work at the Monastery: (6)
    As of 2021-03-02 17:07 GMT
    Find Nodes?
      Voting Booth?
      My favorite kind of desktop background is:

      Results (55 votes). Check out past polls.