Operating System - HP-UX
1821983 Members
3118 Online
109638 Solutions
New Discussion юеВ

DBD and DBI modules for perl

 
javedk
Advisor

DBD and DBI modules for perl

Hi,

Does anyone have perl5.X version which has DBD and DBI modules for Oracle in swdepot format or tar. What I am looking for is not to run any "Make" stuff, just install from a bundle and it should work fine.

After installation which folder does the DBD and DBI modules get installed. I have tried installing ourmy apps person was complaining that the modules were missing.
11 REPLIES 11
javedk
Advisor

Re: DBD and DBI modules for perl

Sorry in the last line I was trying to say the I have downloaded and installed the perl from HP devresource site but our apps person was still complaining that the modules were missing.
H.Merijn Brand (procura
Honored Contributor

Re: DBD and DBI modules for perl

Most perl distributions will have a DBI included. Probably a recent DBI at the time of distribution.

I can assure you that you will not find a DBD::Oracle precompiled available anywhere. Not in depot or any other binary form.

1. The C-compiler should be the same as you are using to link Oracle
2. The Oracle version should be the same
3. The Oracle installation path should be the same ($ORACLE_HOME)
4. The Oracle bitness (32bit or 64bit) should be the same.

*IF* you happen to have all of these the same as I have, I could give you as DBD::Oracle.

1. HP C-ANSI-C
2. Oracle 8.1.7.4/32 on 11.00 (PA-RISC), Oracle 9.2.0.1/64 on 11.11 (PA-RISC), Oracle 9.2.0.7 on 11.23 (Itanium2)
3. /pro/oracle/v817, /pro/oracle/v920, /pro/oracle/v920
4. 32bit on 11.00, 64bit on 11.11 and 11.23

Only if all 4 match, I can help.
That is why you have to build it yourself. And please read README.hpux before you start.

Enjoy, Have FUN! H.merijn
Enjoy, Have FUN! H.Merijn
javedk
Advisor

Re: DBD and DBI modules for perl

Hi Merijn,
Thank you vey much for the information. Unfortunately I do not have the same setup. My oracle_home is different and I have HPUX 11.11 and oracle 8.1.7.4.

I could successfuly compile DBI module, but while trying to complie DBD module it passes
perl Makefile.PL and make. When I do make test I get the following message. I am doing these as root user hope this is correct.

PERL_DL_NONLAZY=1 /opt/perl/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/01base................/usr/lib/dld.sl: Can't shl_load() a library containing Thread Local Storage: /usr/lib/libcl.2
/usr/lib/dld.sl: Exec format error
H.Merijn Brand (procura
Honored Contributor

Re: DBD and DBI modules for perl

> PERL_DL_NONLAZY=1 /opt/ perl /bin/ perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/01base................/usr/lib/dld.sl: Can't shl_load() a library containing Thread Local Storage: /usr/lib/libcl.2
/usr/lib/dld.sl: Exec format error

this is most likely cause by mixing 32bit perl using /usr/lib/dld.sl trying to access/load 64bit Oracle.
Which is strange in the sense that most Oracle 8 ports are 32bit.

Are you *SURE* you installed a perl that was built for your system?

# perl -V:archname.*

what does that show?

# perl -MFile::Find -le'find(sub{/^Oracle.s.$/and die qx{file $_}},@INC)'
Oracle.sl: PA-RISC2.0 shared library -not stripped
# perl -V:archname
archname='PA-RISC2.0';

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
javedk
Advisor

Re: DBD and DBI modules for perl

You are right. The perl which I have got is for PARISC 1.1 and my system is PARISC2.0. I will try installing the correct perl version and will update the forum.
H.Merijn Brand (procura
Honored Contributor

Re: DBD and DBI modules for perl

FYI A PA-RISC-1.1 build cannot be a 64bit build. Ever.

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
javedk
Advisor

Re: DBD and DBI modules for perl

I have tried with following perl
perl -V:archname
archname='PA-RISC2.0-thread-multi-LP64'
archname64='LP64'

This time also DBI went fine. But DBD fails at "Make test" with the following error. With regards to the failed to load Oracle extension / library message, I can see the Oracle.sl library at the requested path.

PERL_DL_NONLAZY=1 /opt/perl_64/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/01base................/usr/lib/pa20_64/dld.sl: '/lib/pa20_64/libcl.2' contains a static TLS reference to '__thread_specific_seg' .
/usr/lib/pa20_64/dld.sl: '/lib/pa20_64/libcl.2' contains a static TLS reference to '__thread_specific_seg' defined in a dynamically.
/usr/lib/pa20_64/dld.sl: '/lib/pa20_64/libcl.2' contains a static TLS reference to '__thread_specific_seg' defined in a dynamically.
/usr/lib/pa20_64/dld.sl: '/lib/pa20_64/libcl.2' contains a static TLS reference to '__thread_specific_seg' defined in a dynamically.
Failed to load Oracle extension and/or shared libraries:
install_driver(Oracle) failed: Can't load '/var/hp/perl/DBD-Oracle-1.19/blib/arch/auto/DBD/Oracle/Oracle.sl' for module DBD::Oracle.
at (eval 3) line 3
Compilation failed in require at (eval 3) line 3.
H.Merijn Brand (procura
Honored Contributor

Re: DBD and DBI modules for perl

D'uh! I bet that is because op the threaded perl you're running.

To be clear, DBD::Oracle needs a threads library, but not a threaded perl.
Where did you get this perl, and what is it's version?

# perl -v

You could try my perl builds, but I don't know where the search leads.

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
javedk
Advisor

Re: DBD and DBI modules for perl

I am not sure from where we downloaded this perl because it was done by previous administrator.

I have checked your site and for HPUX 11.11 I could find only "perl B.5.6.1.F from 5012-7838 06-2003 4/4" compiled using HP ANSI/C. Can i try with this.

#perl -v
This is perl, v5.8.2 built for PA-RISC2.0-thread-multi-LP64
(with 25 registered patches, see perl -V for more detail)

Copyright 1987-2003, Larry Wall

Binary build 808 provided by ActiveState Corp. http://www.ActiveState.com
ActiveState is a division of Sophos.
Built Dec 7 2003 15:28:40

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'. If you have access to the
Internet, point your browser at http://www.perl.com/, the Perl Home Page.
Dennis Handly
Acclaimed Contributor

Re: DBD and DBI modules for perl

>/usr/lib/dld.sl: Can't shl_load() a library containing Thread Local Storage: /usr/lib/libcl.2
/usr/lib/dld.sl: Exec format error

>Merijn: this is most likely cause by mixing 32bit perl using /usr/lib/dld.sl trying to access/load 64bit Oracle.

This has nothing to do with 64 bit. It is as it says, you can't dynamically load libcl or libpthread. You must link your application with -lcl. Or use LD_PRELOAD=/usr/lib/libcl.2.

>/usr/lib/pa20_64/dld.sl: '/lib/pa20_64/libcl.2' contains a static TLS reference to '__thread_specific_seg' .

The same error again with +DD64.

>Merijn: I bet that is because op the threaded perl you're running.

Well of course, it said that in the error message. ;-)

Adding -lcl will make the error go away. Whether perl will work correctly while threaded is a different story.
H.Merijn Brand (procura
Honored Contributor

Re: DBD and DBI modules for perl

That is not my site. :)

Check here

http://mirrors.develooper.com/hpux/#Perl

and here

http://mirrors.develooper.com/hpux/downloads.html#hpux1111

Enjoy, Have FUNE! H.Merijn
Enjoy, Have FUN! H.Merijn