Problem loading DBD::Informix

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Christian Eriksson

    Problem loading DBD::Informix

    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:I nformix: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_driv ers;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@S022203 5> onstat -

    Informix Dynamic Server Version 9.40.FC1


    Regards Christian Eriksson
  • Jonathan Leffler

    #2
    Re: Problem loading DBD::Informix

    Christian Eriksson wrote:[color=blue]
    > 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:I nformix: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[/color]

    What was the value of INFORMIXDIR when the DBD::Informix was compiled?
    Did you build it with DBD_INFORMIX_RE LOCATABLE_INFOR MIXDIR=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...
    [color=blue]
    > 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_driv ers;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@S022203 5> onstat -
    >
    > Informix Dynamic Server Version 9.40.FC1
    >
    >
    > Regards Christian Eriksson[/color]


    --
    Jonathan Leffler #include <disclaimer.h >
    Email: jleffler@earthl ink.net, jleffler@us.ibm .com
    Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org/

    Comment

    • Christian Eriksson

      #3
      Re: Problem loading DBD::Informix

      Jonathan Leffler <jleffler@earth link.net> wrote in message news:<mzbwb.126 64$n56.8137@new sread1.news.pas .earthlink.net> ...[color=blue]
      > Christian Eriksson wrote:[color=green]
      > > 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:I nformix: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[/color]
      >
      > What was the value of INFORMIXDIR when the DBD::Informix was compiled?
      > Did you build it with DBD_INFORMIX_RE LOCATABLE_INFOR MIXDIR=yes in
      > the environment.[/color]
      Sorry, but I don't know because I didn't build it myself![color=blue]
      >
      > 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...[/color]
      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[color=blue]
      >[color=green]
      > > 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_driv ers;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@S022203 5> onstat -
      > >
      > > Informix Dynamic Server Version 9.40.FC1
      > >
      > >
      > > Regards Christian Eriksson[/color][/color]

      Comment

      • Christian Eriksson

        #4
        Re: Problem loading DBD::Informix

        Jonathan Leffler <jleffler@earth link.net> wrote in message news:<mzbwb.126 64$n56.8137@new sread1.news.pas .earthlink.net> ...[color=blue]
        > Christian Eriksson wrote:[color=green]
        > > 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:I nformix: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[/color]
        >
        > What was the value of INFORMIXDIR when the DBD::Informix was compiled?
        > Did you build it with DBD_INFORMIX_RE LOCATABLE_INFOR MIXDIR=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...
        >[color=green]
        > > 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_driv ers;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@S022203 5> onstat -
        > >
        > > Informix Dynamic Server Version 9.40.FC1
        > >
        > >
        > > Regards Christian Eriksson[/color][/color]

        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@S022203 5> echo $LD_LIBRARY_PAT H
        /SSW/informix9.4/lib:/SSW/informix9.4/lib/esql:/SSW/informix9.4/lib/tools
        presto1@S022203 5> 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@S022203 5> echo $LD_LIBRARY_PAT H
        /SSW/informix/sdk2.50/lib:/SSW/informix/sdk2.50/lib/esql
        presto1@S022203 5> 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@S022203 5> 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@S022203 5> ./ins_rutin.pl presto db-ladd-lan06
        presto1@S022203 5> echo $?
        0

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

        /Christian Eriksson

        Comment

        Working...