cancel
Showing results for 
Search instead for 
Did you mean: 

Install DBD oracle for hpux

SOLVED
Go to solution
Shailesh_6
Occasional Contributor

Install DBD oracle for hpux

Hi,
I am tring to install DBD-Oracle-1.12
1. hpux 11
2. HP apache B9415AA_PA_1.3.19.depot
3. HP compiled Perl perl_11.00.depot

While make test I get following error message.

/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
Failed to load Oracle extension and/or shared libraries:
install_driver(Oracle) failed: Can't load 'blib/arch/auto/DBD/Oracle/Oracle.sl' for module DBD::Oracle: Exec format error at /opt/perl/lib/5.6.1/PA-RISC1.1-thread-multi/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 t/base.t line 19
The remaining tests will probably also fail with the same error.

Can you tell me how I can I install with gcc?
Can I use HP ansic when HP perl seems to be build with gcc.

Thanks in advance
5 REPLIES
Neil Harris
Regular Advisor

Re: Install DBD oracle for hpux

Hi Shailesh

What version of Oracle are you using ?

Neil
An inveterate hacker
Neil Harris
Regular Advisor

Re: Install DBD oracle for hpux

some more thoughts on this.

You should be using oracle's implementation of apache as found in iAS rather than the HP versions

The following two commands will install the modules DBI and DBD::Oracle

force install DBI
install DBD::Oracle

The force DBI is required as the examp.t test will fail as it uses the -T Perl
option to ignore the setting of the PERL5LIB environment variable.

The PERL5LIB enviroment can be set by,

For C Shell

setenv PERL5LIB $ORACLE_HOME/Apache/perl/lib/5.00503
setenv PERL5LIB $ORACLE_HOME/Apache/perl/lib/site_5.005:${PERL5LIB}

set path = ( $ORACLE_HOME/Apache/perl/bin $path)


For Bourne Shell

PERL5LIB=$ORACLE_HOME/Apache/perl/lib/5.00503
PERL5LIB=$ORACLE_HOME/Apache/perl/lib/site_5.005:${PERL5LIB}
export PERL5LIB

PATH=$ORACLE_HOME/Apache/perl/bin:${PATH}
export PATH

Before installing DBD::Oracle you should ensure that either the ORACLE_SID or TWO_TASK
environment variables are correctly set for your installation and if the scott
account does not exist in the database in question then the ORACLE_USERID
environment variable should be set to name/password@dbname. This is to allow
the DBD::Oracle test scripts to attach to a database.

An inveterate hacker
H.Merijn Brand (procura
Honored Contributor
Solution

Re: Install DBD oracle for hpux

This problem is documented in perl-5.8.0 (Release Candidate 1 was released this Saturday!)

I wrote in README.hpux:

=head2 Oracle on HP-UX

Using perl to connect to Oracle databases through DBI and DBD::Oracle
has caused a lot of people many headaches. Read README.hpux in the
DBD::Oracle for much more information. The reason to mention it here
is that Oracle requires a perl built with libcl and libpthread, the
latter even when perl is build without threads. Building perl using
all defaults, but still enabling to build DBD::Oracle later on can be
achieved using

Configure -A prepend:libswanted='cl pthread ' ...

Do not forget the space before the trailing quote. Also note that this
does not (yet) work with 64bit versions of GCC.


SHLIB_PATH won't help in your case. Maybe LD_PRELOAD will.

See also http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xbae391ccb36bd611abdb0090277a778c,00.html
Enjoy, Have FUN! H.Merijn
Steve Steel
Honored Contributor

Re: Install DBD oracle for hpux

Hi

get

Patch Name: PHSS_26262

Patch Description: s700_800 11.00 ld(1) and linker tools cumulative patch

use the LD_PRELOAD Functionality

You can use the LD_PRELOAD environment variable to load a shared library
that contains thread-local storage to avoid the following error when loading
the library dynamically:

/usr/lib/dld.sl: Can't shl_load() a library containing Thread Local
Storage: /usr/lib/libpthread.1
The load order and symbol resolution order may be different in a PA32
program than in the same PA64 program because the dynamic loader uses
depth-first search order in PA32 mode and breadth-first search order in PA64
mode.
The dynamic loader uses the LD_PRELOAD environment variable even if you use
the +noenvvar in the link line. This insures that LD_PRELOAD is enabled even
in a +compat link. The LD_PRELOAD variable is always enabled except for
setuid and setgid programs.

Note: Using LD_PRELOAD can cause a core dump when used with applications
which mix shared and archived libraries, especially when both the shared
library and the application are built with aC++ or use libc.

You can specify multiple libraries as part of the LD_PRELOAD environment
variable. Separate the libraries by spaces or colons as in LD_LIBRARY_PATH.
(Multi-byte support is not provided as part of parsing the LD_PRELOAD
library list). You can specify LD_PRELOAD libraries with absolute paths or
relative paths. The LD_PRELOAD libraries can also consist of just the
library names, in which case the dynamic loader uses the directory path list
in the environment variables LD_LIBRARY_PATH and/or SHLIB_PATH or the
embedded path list (if enabled) to search for the libraries.

The dynamic loader does not issue an error or warning message if it cannot
find a library specified by LD_PRELOAD. However, if it does not find a
dependent of the LD_PRELOAD libraries, the dynamic loader issues the same
error message as if the LD_PRELOAD library is specified in the link line.


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
MANOJ SRIVASTAVA
Honored Contributor

Re: Install DBD oracle for hpux

Hi Shailesh


I think that during the installation og Perl you are not using for dynamic libraries , please do recompile perl with the following options :

You may look at this :

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x71fad211e18ad5118ff10090279cd0f9,00.html


Manoj Srivastava