Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

comment on

( [id://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/DynaLoader.pm 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/Simple.pm. 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/CTlib.so' for module Sybase::CTlib: ld.so.1: perl: fatal: libct.so: open failed

libct.so is the first library CTlib.so tries to open :

$ ldd /usr/local/test/lib/perl5/site_perl/5.12.1/sun4-solaris/auto/Syb +ase/CTlib/CTlib.so libct.so => /local/sybase/sdk1251/OCS-12_5/lib//libct.so libcs.so => /local/sybase/sdk1251/OCS-12_5/lib//libcs.so libtcl.so => /local/sybase/sdk1251/OCS-12_5/lib//libtcl.so libcomn.so => /local/sybase/sdk1251/OCS-12_5/lib//libcomn.s +o libintl.so => /local/sybase/sdk1251/OCS-12_5/lib//libintl.s +o libblk.so => /local/sybase/sdk1251/OCS-12_5/lib//libblk.so libm.so.2 => /lib/libm.so.2 libc.so.1 => /lib/libc.so.1 libsocket.so.1 => /lib/libsocket.so.1 libnsl.so.1 => /lib/libnsl.so.1 libmp.so.2 => /lib/libmp.so.2 libmd.so.1 => /lib/libmd.so.1 libscf.so.1 => /lib/libscf.so.1 libdoor.so.1 => /lib/libdoor.so.1 libuutil.so.1 => /lib/libuutil.so.1 libgen.so.1 => /lib/libgen.so.1 /platform/SUNW,Sun-Fire-V490/lib/libc_psr.so.1 /platform/SUNW,Sun-Fire-V490/lib/libmd_psr.so.1

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 CTlib.so, 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

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2024-04-20 05:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found