trouble installing DBD:DB2

trouble installing DBD:DB2

am 07.02.2006 19:14:03 von jfriedman

Hi, help appreciated. I read the README and CAVEATS and did not see a
solution to this.

$ uname -a
Linux vmddbm302.storeperform.com 2.6.9-22.0.1.ELsmp #1 SMP Tue Oct 18
18:39:02 EDT 2005 x86_64 x86_64 x86_64 GNU/Linux

$ perl Makefile.PL

Configuring DBD::DB2...
Remember to actually read the README and CAVEATS files!

Using DB2 in "/home/db2inst1/sqllib"
....
[no errors]

$ make
cp DB2.pm blib/lib/DBD/DB2.pm
cp lib/Bundle/DBD/DB2.pm blib/lib/Bundle/DBD/DB2.pm
....
Running Mkbootstrap for DBD::DB2 ()
chmod 644 DB2.bs
rm -f blib/arch/auto/DBD/DB2/DB2.so
gcc -shared DB2.o dbdimp.o -o blib/arch/auto/DBD/DB2/DB2.so
-L/home/db2inst1/sqllib/lib -ldb2
/usr/bin/ld: skipping incompatible /home/db2inst1/sqllib/lib/libdb2.so
when searching for -ldb2
/usr/bin/ld: cannot find -ldb2
collect2: ld returned 1 exit status

Re: trouble installing DBD:DB2

am 07.02.2006 19:42:18 von denials

Hi:

Since you're running on a 64-bit platform, is there any chance that
you are trying to link 32-bit Perl libraries against 64-bit DB2
libraries?

"file /home/db2inst1/sqllib/lib/libdb2.so.1" will tell you the DB2
library bitness.

Dan

On 2/7/06, Jason S. Friedman wrote:
> Hi, help appreciated. I read the README and CAVEATS and did not see a
> solution to this.
>
> $ uname -a
> Linux vmddbm302.storeperform.com 2.6.9-22.0.1.ELsmp #1 SMP Tue Oct 18
> 18:39:02 EDT 2005 x86_64 x86_64 x86_64 GNU/Linux
>
> $ perl Makefile.PL
>
> Configuring DBD::DB2...
> Remember to actually read the README and CAVEATS files!
>
> Using DB2 in "/home/db2inst1/sqllib"
> ...
> [no errors]
>
> $ make
> cp DB2.pm blib/lib/DBD/DB2.pm
> cp lib/Bundle/DBD/DB2.pm blib/lib/Bundle/DBD/DB2.pm
> ...
> Running Mkbootstrap for DBD::DB2 ()
> chmod 644 DB2.bs
> rm -f blib/arch/auto/DBD/DB2/DB2.so
> gcc -shared DB2.o dbdimp.o -o blib/arch/auto/DBD/DB2/DB2.so
> -L/home/db2inst1/sqllib/lib -ldb2
> /usr/bin/ld: skipping incompatible /home/db2inst1/sqllib/lib/libdb2.so
> when searching for -ldb2
> /usr/bin/ld: cannot find -ldb2
> collect2: ld returned 1 exit status
>

Re: trouble installing DBD:DB2

am 07.02.2006 19:45:35 von jonathan.leffler

------=_Part_9225_24033172.1139337935308
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

On 2/7/06, Jason S. Friedman wrote:
>
> Hi, help appreciated. I read the README and CAVEATS and did not see a
> solution to this.
>
> $ uname -a
> Linux vmddbm302.storeperform.com 2.6.9-22.0.1.ELsmp #1 SMP Tue Oct 18
> 18:39:02 EDT 2005 x86_64 x86_64 x86_64 GNU/Linux
>
> $ perl Makefile.PL
>
> Configuring DBD::DB2...
> Remember to actually read the README and CAVEATS files!
>
> Using DB2 in "/home/db2inst1/sqllib"
> ...
> [no errors]
>
> $ make
> cp DB2.pm blib/lib/DBD/DB2.pm
> cp lib/Bundle/DBD/DB2.pm blib/lib/Bundle/DBD/DB2.pm
> ...
> Running Mkbootstrap for DBD::DB2 ()
> chmod 644 DB2.bs
> rm -f blib/arch/auto/DBD/DB2/DB2.so
> gcc -shared DB2.o dbdimp.o -o blib/arch/auto/DBD/DB2/DB2.so
> -L/home/db2inst1/sqllib/lib -ldb2
> /usr/bin/ld: skipping incompatible /home/db2inst1/sqllib/lib/libdb2.so
> when searching for -ldb2
> /usr/bin/ld: cannot find -ldb2
> collect2: ld returned 1 exit status
>


Do you have a 64-bit version of the DB2 Connect software installed? Which
version do you have installed?
Is your Perl also a 64-bit version?

Have you ever been able to connect to DB2 using the DB2 Connect software?
Have you ever been able to compile any program with it and connect to DB2?

(RoT [Rule of Thumb]: if you can't create a simple standalone program that
connects to a database, you probably won't make Perl connect either. Just
because you can create a simple standalone program does not show that your
compilation options are compatible with Perl's, but it greatly increases
your chances of success, and eliminates whole swathes of problems. And
those comments apply to any driver - not just DBD::DB2.)

--
Jonathan Leffler #include
Guardian of DBD::Informix - v2005.02 - http://dbi.perl.org
"I don't suffer from insanity - I enjoy every minute of it."

------=_Part_9225_24033172.1139337935308--

RE: trouble installing DBD:DB2

am 09.02.2006 19:03:18 von jfriedman

------_=_NextPart_001_01C62DA3.6C1BC84C
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

> $ make
> cp DB2.pm blib/lib/DBD/DB2.pm
> cp lib/Bundle/DBD/DB2.pm blib/lib/Bundle/DBD/DB2.pm
> ...
> Running Mkbootstrap for DBD::DB2 ()
> chmod 644 DB2.bs
> rm -f blib/arch/auto/DBD/DB2/DB2.so
> gcc -shared DB2.o dbdimp.o -o blib/arch/auto/DBD/DB2/DB2.so
> -L/home/db2inst1/sqllib/lib -ldb2
> /usr/bin/ld: skipping incompatible /home/db2inst1/sqllib/lib/libdb2.so
> when searching for -ldb2
> /usr/bin/ld: cannot find -ldb2
> collect2: ld returned 1 exit status
>


Do you have a 64-bit version of the DB2 Connect software installed? =
Which
version do you have installed?
Is your Perl also a 64-bit version?

Have you ever been able to connect to DB2 using the DB2 Connect =
software?
Have you ever been able to compile any program with it and connect to =
DB2?

>> Thanks for your help. We had a 64-bit install, but then a 32-bit =
patch.
>> As part of the db2iupdt process one needs to specify 64-bit, I'm told =
by
>> my DBA.

(RoT [Rule of Thumb]: if you can't create a simple standalone program =
that
connects to a database, you probably won't make Perl connect either. =
Just
because you can create a simple standalone program does not show that =
your
compilation options are compatible with Perl's, but it greatly increases
your chances of success, and eliminates whole swathes of problems. And
those comments apply to any driver - not just DBD::DB2.)


------_=_NextPart_001_01C62DA3.6C1BC84C--