Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Problem loading DBD::Informix

Reply
Thread Tools

Problem loading DBD::Informix

 
 
Christian Eriksson
Guest
Posts: n/a
 
      11-23-2003
Hi!

I'm programming Perl DBI accessing Informix databases. I have a
problem on a Solaris machine to use my installed Informix driver
(DBD::Informix). I get the following error message:

install_driver(Informix) failed: Can't load
'/usr/perl5/5.6.1/site_perl/sun4-solaris/auto/DBD/Informix/Informix.so'
for module DBD::Informix: ld.so.1: /usr/bin/perl: fatal: libifsql.so:
open failed: No such file or directory at
/usr/perl5/5.6.1/sun4-solaris/DynaLoader.pm line 206.
at (eval 1) line 3
Compilation failed in require at (eval 1) line 3.
Perhaps a required shared library or dll isn't installed where
expected
at /local/bstat/ins_rutin.pl line 33

At line 33 in /local/bstt/ins_rutin.pl I do:

$dbh = DBI->connect('DBI:Informix:bstat') or die $dbh::errstr, exit 1;

When executing the script my environment has, amongst other
environment variables, this:
INFORMIXDIR=/SSW/informix9.4
LD_LIBRARY_PATH=/SSW/informix9.4/lib:/SSW/informix9.4/lib/esql:/SSW/informix9.4/lib/tools

and libifsql.so is present in

S0222035 find / -name libifsql.so -print 2>/dev/null
/SSW/informix9.4/lib/esql/libifsql.so
/SSW/informix/sdk2.50/lib/esql/libifsql.so

Why doesn't /usr/perl5/5.6.1/sun4-solaris/DynaLoader.pm find
libifsql.so?

(I use to run a test to see if DBD::Informix is installed and
available:

perl -e 'use DBI;@drivers = DBI->available_drivers;foreach (@drivers)
{print "$_\n"}'

and from that I get:

ExampleP
Informix
Proxy

this is as root with environment, amongst other environment variables,
LD_LIBRARY_PATH=/usr/local/lib:/usr/ccs/lib

Shouldn't this test be sufficient to assure DBD::Informix is installed
and available?)


Some information:
S0222035 uname -a
SunOS S0222035 5.8 Generic sun4us sparc FJSV,GPUS

S0222035 perl -v

This is perl, v5.6.1 built for sun4-solaris

Database Server:
presto1@S0222035> onstat -

Informix Dynamic Server Version 9.40.FC1


Regards Christian Eriksson
 
Reply With Quote
 
 
 
 
Jonathan Leffler
Guest
Posts: n/a
 
      11-23-2003
Christian Eriksson wrote:
> I'm programming Perl DBI accessing Informix databases. I have a
> problem on a Solaris machine to use my installed Informix driver
> (DBD::Informix). I get the following error message:
>
> install_driver(Informix) failed: Can't load
> '/usr/perl5/5.6.1/site_perl/sun4-solaris/auto/DBD/Informix/Informix.so'
> for module DBD::Informix: ld.so.1: /usr/bin/perl: fatal: libifsql.so:
> open failed: No such file or directory at
> /usr/perl5/5.6.1/sun4-solaris/DynaLoader.pm line 206.
> at (eval 1) line 3
> Compilation failed in require at (eval 1) line 3.
> Perhaps a required shared library or dll isn't installed where
> expected
> at /local/bstat/ins_rutin.pl line 33
>
> At line 33 in /local/bstt/ins_rutin.pl I do:
>
> $dbh = DBI->connect('DBI:Informix:bstat') or die $dbh::errstr, exit 1;
>
> When executing the script my environment has, amongst other
> environment variables, this:
> INFORMIXDIR=/SSW/informix9.4
> LD_LIBRARY_PATH=/SSW/informix9.4/lib:/SSW/informix9.4/lib/esql:/SSW/informix9.4/lib/tools


What was the value of INFORMIXDIR when the DBD::Informix was compiled?
Did you build it with DBD_INFORMIX_RELOCATABLE_INFORMIXDIR=yes in
the environment.

My suspicion is that you built it without the relocatable flag - so
the library paths were hardwired to the INFORMIXDIR at the time of
compilation. I'm not 100% confident of that; I'd have at least half
expected the message to include the full pathname. Try running 'ldd'
on the Informix.so and see what it diagnoses...

> and libifsql.so is present in
>
> S0222035 find / -name libifsql.so -print 2>/dev/null
> /SSW/informix9.4/lib/esql/libifsql.so
> /SSW/informix/sdk2.50/lib/esql/libifsql.so
>
> Why doesn't /usr/perl5/5.6.1/sun4-solaris/DynaLoader.pm find
> libifsql.so?
>
> (I use to run a test to see if DBD::Informix is installed and
> available:
>
> perl -e 'use DBI;@drivers = DBI->available_drivers;foreach (@drivers)
> {print "$_\n"}'
>
> and from that I get:
>
> ExampleP
> Informix
> Proxy
>
> this is as root with environment, amongst other environment variables,
> LD_LIBRARY_PATH=/usr/local/lib:/usr/ccs/lib
>
> Shouldn't this test be sufficient to assure DBD::Informix is installed
> and available?)
>
>
> Some information:
> S0222035 uname -a
> SunOS S0222035 5.8 Generic sun4us sparc FJSV,GPUS
>
> S0222035 perl -v
>
> This is perl, v5.6.1 built for sun4-solaris
>
> Database Server:
> presto1@S0222035> onstat -
>
> Informix Dynamic Server Version 9.40.FC1
>
>
> Regards Christian Eriksson



--
Jonathan Leffler #include <disclaimer.h>
Email: http://www.velocityreviews.com/forums/(E-Mail Removed), (E-Mail Removed)
Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org/

 
Reply With Quote
 
 
 
 
Christian Eriksson
Guest
Posts: n/a
 
      11-24-2003
Jonathan Leffler <(E-Mail Removed)> wrote in message news:<mzbwb.12664$(E-Mail Removed) hlink.net>...
> Christian Eriksson wrote:
> > I'm programming Perl DBI accessing Informix databases. I have a
> > problem on a Solaris machine to use my installed Informix driver
> > (DBD::Informix). I get the following error message:
> >
> > install_driver(Informix) failed: Can't load
> > '/usr/perl5/5.6.1/site_perl/sun4-solaris/auto/DBD/Informix/Informix.so'
> > for module DBD::Informix: ld.so.1: /usr/bin/perl: fatal: libifsql.so:
> > open failed: No such file or directory at
> > /usr/perl5/5.6.1/sun4-solaris/DynaLoader.pm line 206.
> > at (eval 1) line 3
> > Compilation failed in require at (eval 1) line 3.
> > Perhaps a required shared library or dll isn't installed where
> > expected
> > at /local/bstat/ins_rutin.pl line 33
> >
> > At line 33 in /local/bstt/ins_rutin.pl I do:
> >
> > $dbh = DBI->connect('DBI:Informix:bstat') or die $dbh::errstr, exit 1;
> >
> > When executing the script my environment has, amongst other
> > environment variables, this:
> > INFORMIXDIR=/SSW/informix9.4
> > LD_LIBRARY_PATH=/SSW/informix9.4/lib:/SSW/informix9.4/lib/esql:/SSW/informix9.4/lib/tools

>
> What was the value of INFORMIXDIR when the DBD::Informix was compiled?
> Did you build it with DBD_INFORMIX_RELOCATABLE_INFORMIXDIR=yes in
> the environment.

Sorry, but I don't know because I didn't build it myself!
>
> My suspicion is that you built it without the relocatable flag - so
> the library paths were hardwired to the INFORMIXDIR at the time of
> compilation. I'm not 100% confident of that; I'd have at least half
> expected the message to include the full pathname. Try running 'ldd'
> on the Informix.so and see what it diagnoses...

Here's the output:
root@S0232053# pwd
/usr/perl5/5.6.1/site_perl/sun4-solaris/auto/DBD/Informix
root@S0232053# ldd Informix.so
libifsql.so => (file not found)
libifasf.so => (file not found)
libifgen.so => (file not found)
libifos.so => (file not found)
libifgls.so => (file not found)
libnsl.so.1 => /usr/lib/libnsl.so.1
libsocket.so.1 => /usr/lib/libsocket.so.1
libaio.so.1 => /usr/lib/libaio.so.1
libm.so.1 => /usr/lib/libm.so.1
libdl.so.1 => /usr/lib/libdl.so.1
libelf.so.1 => /usr/lib/libelf.so.1
libifglx.so => (file not found)
libc.so.1 => /usr/lib/libc.so.1
libmp.so.2 => /usr/lib/libmp.so.2
/usr/platform/SUNW,UltraAX-i2/lib/libc_psr.so.1

What do you make of this?

/Christian
>
> > and libifsql.so is present in
> >
> > S0222035 find / -name libifsql.so -print 2>/dev/null
> > /SSW/informix9.4/lib/esql/libifsql.so
> > /SSW/informix/sdk2.50/lib/esql/libifsql.so
> >
> > Why doesn't /usr/perl5/5.6.1/sun4-solaris/DynaLoader.pm find
> > libifsql.so?
> >
> > (I use to run a test to see if DBD::Informix is installed and
> > available:
> >
> > perl -e 'use DBI;@drivers = DBI->available_drivers;foreach (@drivers)
> > {print "$_\n"}'
> >
> > and from that I get:
> >
> > ExampleP
> > Informix
> > Proxy
> >
> > this is as root with environment, amongst other environment variables,
> > LD_LIBRARY_PATH=/usr/local/lib:/usr/ccs/lib
> >
> > Shouldn't this test be sufficient to assure DBD::Informix is installed
> > and available?)
> >
> >
> > Some information:
> > S0222035 uname -a
> > SunOS S0222035 5.8 Generic sun4us sparc FJSV,GPUS
> >
> > S0222035 perl -v
> >
> > This is perl, v5.6.1 built for sun4-solaris
> >
> > Database Server:
> > presto1@S0222035> onstat -
> >
> > Informix Dynamic Server Version 9.40.FC1
> >
> >
> > Regards Christian Eriksson

 
Reply With Quote
 
Christian Eriksson
Guest
Posts: n/a
 
      11-24-2003
Jonathan Leffler <(E-Mail Removed)> wrote in message news:<mzbwb.12664$(E-Mail Removed) hlink.net>...
> Christian Eriksson wrote:
> > I'm programming Perl DBI accessing Informix databases. I have a
> > problem on a Solaris machine to use my installed Informix driver
> > (DBD::Informix). I get the following error message:
> >
> > install_driver(Informix) failed: Can't load
> > '/usr/perl5/5.6.1/site_perl/sun4-solaris/auto/DBD/Informix/Informix.so'
> > for module DBD::Informix: ld.so.1: /usr/bin/perl: fatal: libifsql.so:
> > open failed: No such file or directory at
> > /usr/perl5/5.6.1/sun4-solaris/DynaLoader.pm line 206.
> > at (eval 1) line 3
> > Compilation failed in require at (eval 1) line 3.
> > Perhaps a required shared library or dll isn't installed where
> > expected
> > at /local/bstat/ins_rutin.pl line 33
> >
> > At line 33 in /local/bstt/ins_rutin.pl I do:
> >
> > $dbh = DBI->connect('DBI:Informix:bstat') or die $dbh::errstr, exit 1;
> >
> > When executing the script my environment has, amongst other
> > environment variables, this:
> > INFORMIXDIR=/SSW/informix9.4
> > LD_LIBRARY_PATH=/SSW/informix9.4/lib:/SSW/informix9.4/lib/esql:/SSW/informix9.4/lib/tools

>
> What was the value of INFORMIXDIR when the DBD::Informix was compiled?
> Did you build it with DBD_INFORMIX_RELOCATABLE_INFORMIXDIR=yes in
> the environment.
>
> My suspicion is that you built it without the relocatable flag - so
> the library paths were hardwired to the INFORMIXDIR at the time of
> compilation. I'm not 100% confident of that; I'd have at least half
> expected the message to include the full pathname. Try running 'ldd'
> on the Informix.so and see what it diagnoses...
>
> > and libifsql.so is present in
> >
> > S0222035 find / -name libifsql.so -print 2>/dev/null
> > /SSW/informix9.4/lib/esql/libifsql.so
> > /SSW/informix/sdk2.50/lib/esql/libifsql.so
> >
> > Why doesn't /usr/perl5/5.6.1/sun4-solaris/DynaLoader.pm find
> > libifsql.so?
> >
> > (I use to run a test to see if DBD::Informix is installed and
> > available:
> >
> > perl -e 'use DBI;@drivers = DBI->available_drivers;foreach (@drivers)
> > {print "$_\n"}'
> >
> > and from that I get:
> >
> > ExampleP
> > Informix
> > Proxy
> >
> > this is as root with environment, amongst other environment variables,
> > LD_LIBRARY_PATH=/usr/local/lib:/usr/ccs/lib
> >
> > Shouldn't this test be sufficient to assure DBD::Informix is installed
> > and available?)
> >
> >
> > Some information:
> > S0222035 uname -a
> > SunOS S0222035 5.8 Generic sun4us sparc FJSV,GPUS
> >
> > S0222035 perl -v
> >
> > This is perl, v5.6.1 built for sun4-solaris
> >
> > Database Server:
> > presto1@S0222035> onstat -
> >
> > Informix Dynamic Server Version 9.40.FC1
> >
> >
> > Regards Christian Eriksson


My apologies for the recent reply. I ran the command on the wrong
machine ruining my credibility in this forum

OK, I give it another try. Here's the output from ldd on the right
machine as the user from the first post:

presto1@S0222035> echo $LD_LIBRARY_PATH
/SSW/informix9.4/lib:/SSW/informix9.4/lib/esql:/SSW/informix9.4/lib/tools
presto1@S0222035> ldd
/usr/perl5/5.6.1/site_perl/sun4-solaris/auto/DBD/Informix.so
libifsql.so => (file not found)
libifasf.so => (file not found)
libifgen.so => (file not found)
libifos.so => (file not found)
libifgls.so => (file not found)
libnsl.so.1 => /usr/lib/libnsl.so.1
libsocket.so.1 => /usr/lib/libsocket.so.1
libaio.so.1 => /usr/lib/libaio.so.1
libm.so.1 => /usr/lib/libm.so.1
libdl.so.1 => /usr/lib/libdl.so.1
libelf.so.1 => /usr/lib/libelf.so.1
libifglx.so => (file not found)
libc.so.1 => /usr/lib/libc.so.1
libmp.so.2 => /usr/lib/libmp.so.2
/usr/platform/FJSV,GPUS/lib/libc_psr.so.1

My LD_LIBRARY_PATH points at 64-bit so-objects and I think that's the
problem because when I change LD_LIBRARY_PATH to:

presto1@S0222035> echo $LD_LIBRARY_PATH
/SSW/informix/sdk2.50/lib:/SSW/informix/sdk2.50/lib/esql
presto1@S0222035> ldd
/usr/perl5/5.6.1/site_perl/sun4-solaris/auto/DBD/Informix.so
libifsql.so => /SSW/informix/sdk2.50/lib/esql/libifsql.so
libifasf.so => /SSW/informix/sdk2.50/lib/libifasf.so
libifgen.so => /SSW/informix/sdk2.50/lib/esql/libifgen.so
libifos.so => /SSW/informix/sdk2.50/lib/esql/libifos.so
libifgls.so => /SSW/informix/sdk2.50/lib/esql/libifgls.so
libnsl.so.1 => /usr/lib/libnsl.so.1
libsocket.so.1 => /usr/lib/libsocket.so.1
libaio.so.1 => /usr/lib/libaio.so.1
libm.so.1 => /usr/lib/libm.so.1
libdl.so.1 => /usr/lib/libdl.so.1
libelf.so.1 => /usr/lib/libelf.so.1
libifglx.so => /SSW/informix/sdk2.50/lib/esql/libifglx.so
libc.so.1 => /usr/lib/libc.so.1
libmp.so.2 => /usr/lib/libmp.so.2
/usr/platform/FJSV,GPUS/lib/libc_psr.so.1

everything looks fine because now libifsql.so, and the other lib
files, is 32-bit

presto1@S0222035> file /SSW/informix/sdk2.50/lib/esql/libifsql.so
/SSW/informix/sdk2.50/lib/esql/libifsql.so: ELF 32-bit MSB dynamic
lib SPARC
Version 1, dynamically linked, not stripped

and running

presto1@S0222035> ./ins_rutin.pl presto db-ladd-lan06
presto1@S0222035> echo $?
0

executes without error messages and carries out the expected
operations against the database. My INFORMIXDIR is
presto1@S0222035> echo $INFORMIXDIR
/SSW/informix9.4

/Christian Eriksson
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
order of iframe loading with document loading ofir Javascript 0 12-03-2007 12:06 PM
loading image -> detect when image is done loading edfialk Javascript 0 05-10-2007 07:28 PM
[OT] Is loading the second Java application faster than loading the first? David Segall Java 2 01-02-2007 04:41 PM
Image loading using javascript. Handling timeouts and parrallel loading under IE zborisau@gmail.com Javascript 4 08-28-2005 02:02 PM
A weird problem, computer hang while loading wireless, please help =?Utf-8?B?eHV6aGltbw==?= Wireless Networking 0 12-17-2004 04:45 PM



Advertisments