Operating System - HP-UX
1752782 Members
6153 Online
108789 Solutions
New Discussion юеВ

Can't open shared library: /oracle/Oracle9i/visdb/9.2.0/lib32/libclntsh.sl.9.0 no such file

 
venkat_ponnam
Occasional Advisor

Can't open shared library: /oracle/Oracle9i/visdb/9.2.0/lib32/libclntsh.sl.9.0 no such file

Hi All,

I am working on HP-UNIX11.11 and Oracle 9.2.0 platform.
I am generating one executable file and while compiling I am linking my source code with oracle 32 bit client shared library "libclntsh" dynamically. I am able to run my program successfully in a machine on which I compiled my program. But when we are trying run the same exe on client machine it is failing and giving below error.

$ myexe
/usr/lib/dld.sl: Can't open shared library: /oracle/Oracle9i/visdb/9.2.0/lib32/libclntsh.sl.9.0
/usr/lib/dld.sl: No such file or directory
Abort(coredump)


Oracle path it is refering above is of my local machine oracle installation path. So at client machine also it is refering same path. Actually it should refer the path from SHLIB_PATH environment varibale which client has defined.

When I ran "ldd -s myexe" it is showing the absolute path of oracle installation in my local machine. Hence the same thing is happening on client machine also. Since client machine having oracle software at different path it is not able to find the library it needs dynamically...

I am linking the library in my makefile as per the standard rules only. I.e with -L(ORACLE_HOME)/lib32 -lclntsh only.
But still my executable including abosolute paths of my local oracle installtion paths.

Can any one help me on this. Am I doing anything wrong. Do I need to do some thing more to instruct my program to search the libraries from SHLIB_PATH only?


Thanks,
Venkat


15 REPLIES 15
Jean-Luc Oudart
Honored Contributor

Re: Can't open shared library: /oracle/Oracle9i/visdb/9.2.0/lib32/libclntsh.sl.9.0 no such file

Hi

could you post the following :
echo $SHLIB_PATH
echo $ORACLE_HOME
echo $ORACLE_BASE
ls -ld /oracle/Oracle9i/visdb/9.2.0/lib32/libclntsh.sl.9.0

chatr myexe

Regards
Jean-Luc
fiat lux
venkat_ponnam
Occasional Advisor

Re: Can't open shared library: /oracle/Oracle9i/visdb/9.2.0/lib32/libclntsh.sl.9.0 no such file

Hi Jean,

Thanks a lot for your valuable and quick response.

My settings are as follows:

1. ORACLE_HOME:
/oracle/Oracle9i/visdb/9.2.0

2. ORACLE_BASE:
I didn't set this environment variable. Is it compulsory?

3.
$ls -ld /oracle/Oracle9i/visdb/9.2.0/lib32/libclntsh.sl.9.0
-rwxrwxrwx 1 oracle dba 16588800 May 12 14:34 /oracle/Oracle9i/visd
b/9.2.0/lib32/libclntsh.sl.9.0
4. chatr SFMRecv output:

===>chatr SFMRecv
SFMRecv:
shared executable
shared library dynamic path search:
SHLIB_PATH disabled second
embedded path disabled first Not Defined
shared library list:
dynamic /usr/lib/libpthread.1
dynamic /home/naren/socket1/xerces-c_2_6_0-hpux_11i-acc_a03/lib/l
ibxerces-c.sl.26
dynamic /oracle/Oracle9i/visdb/9.2.0/lib32/libclntsh.sl.9.0
dynamic /usr/lib/libstd.2
dynamic /usr/lib/libstream.2
dynamic /usr/lib/libCsup.2
dynamic /usr/lib/libm.2
dynamic /usr/lib/libcl.2
dynamic /usr/lib/libc.2
static /usr/lib/libdld.2
shared library binding:
deferred
global hash table disabled
plabel caching disabled
global hash array size:1103
global hash array nbuckets:3
shared vtable support disabled
static branch prediction disabled
executable from stack: D (default)
kernel assisted branch prediction enabled
lazy swap allocation disabled
text segment locking disabled
data segment locking disabled
third quadrant private data space disabled
fourth quadrant private data space disabled
third quadrant global data space disabled
data page size: D (default)
instruction page size: D (default)
nulptr references disabled
shared library private mapping disabled


Thanks,
Narender
venkat_ponnam
Occasional Advisor

Re: Can't open shared library: /oracle/Oracle9i/visdb/9.2.0/lib32/libclntsh.sl.9.0 no such file

Jean,

I forgot to send SHLIB_PATH setting in my reply message.

It is as follows:

$echo $SHLIB_PATH
/home/naren/socket1/xerces-c_2_6_0-hpux_11i-acc_a03/lib:/oracle/Oracle9i/visdb/9
.2.0/lib32
Jean-Luc Oudart
Honored Contributor

Re: Can't open shared library: /oracle/Oracle9i/visdb/9.2.0/lib32/libclntsh.sl.9.0 no such file

Venkat,

both your SHLIB_PATH and embedded path are disabled.
You could enable you SHLIB_PATH with :
chatr +s enable myexe
This should enable the lookup to the shared library.

Regards
Jean-Luc
fiat lux
venkat_ponnam
Occasional Advisor

Re: Can't open shared library: /oracle/Oracle9i/visdb/9.2.0/lib32/libclntsh.sl.9.0 no such file

Jean,

Thanks a lot for your valuable response. But the solution worked partially.

Actually I need to link 2 libraries dynamically with my source.

1. xerces-c++ parser for parsing XML files(-lxerces-c)
2. Oracle 32 bit client libraries (i.e -llibclntsh)

I set both of these paths in SHLIB_PATH variable. I ran "chatr +s enable myexe" as you suggested. With this the problem has gone with oracle shared library finding (libclntsh) but the problem is now coming at other library. I.e xerces library. It is giving the below error:

usr/lib/dld.sl: Can't find path for shared library: libxerces-c.sl.26
/usr/lib/dld.sl: No such file or directory
Abort(coredump)

Now my doubt is that if I execute "chatr +s enable myexe" then my program should refer SHLIB_PATH variable for both libraries but why it is not finding in case of xerces and how come it is finding in case of oracle libraries.

Lookig forward for your precious reponse to close this issue.

Thanks,
Venkat
venkat_ponnam
Occasional Advisor

Re: Can't open shared library: /oracle/Oracle9i/visdb/9.2.0/lib32/libclntsh.sl.9.0 no such file

Jean,

Actually I should send the output of "chatr +s enable myexe" command along with my previous reply. I am sorry for that.

Output is as follows:
------------------------------
===>chatr +s enable SFMRecv
SFMRecv:
current values:
shared executable
shared library dynamic path search:
SHLIB_PATH disabled second
embedded path disabled first Not Defined
shared library list:
dynamic /usr/lib/libpthread.1
dynamic /home/naren/socket1/xerces-c_2_6_0-hpux_11i-acc_a03/lib/l
ibxerces-c.sl.26
dynamic /oracle/Oracle9i/visdb/9.2.0/lib32/libclntsh.sl.9.0
dynamic /usr/lib/libstd.2
dynamic /usr/lib/libstream.2
dynamic /usr/lib/libCsup.2
dynamic /usr/lib/libm.2
dynamic /usr/lib/libcl.2
dynamic /usr/lib/libc.2
static /usr/lib/libdld.2
shared library binding:
deferred
global hash table disabled
plabel caching disabled
global hash array size:1103
global hash array nbuckets:3
shared vtable support disabled
static branch prediction disabled
executable from stack: D (default)
kernel assisted branch prediction enabled
lazy swap allocation disabled
text segment locking disabled
data segment locking disabled
third quadrant private data space disabled
fourth quadrant private data space disabled
third quadrant global data space disabled
data page size: D (default)
instruction page size: D (default)
nulptr references disabled
shared library private mapping disabled
shared library text merging disabled
new values:
shared executable
shared library dynamic path search:
SHLIB_PATH enabled second
embedded path disabled first Not Defined
shared library list:
dynamic /usr/lib/libpthread.1
dynamic /home/naren/socket1/xerces-c_2_6_0-hpux_11i-acc_a03/lib/l
ibxerces-c.sl.26
dynamic /oracle/Oracle9i/visdb/9.2.0/lib32/libclntsh.sl.9.0
dynamic /usr/lib/libstd.2
dynamic /usr/lib/libstream.2
dynamic /usr/lib/libCsup.2
dynamic /usr/lib/libm.2
dynamic /usr/lib/libcl.2
dynamic /usr/lib/libc.2
static /usr/lib/libdld.2
shared library binding:
deferred
global hash table disabled
plabel caching disabled
global hash array size:1103
global hash array nbuckets:3
shared vtable support disabled
static branch prediction disabled
executable from stack: D (default)
kernel assisted branch prediction enabled
lazy swap allocation disabled
text segment locking disabled
data segment locking disabled
third quadrant private data space disabled
fourth quadrant private data space disabled
third quadrant global data space disabled
data page size: D (default)
instruction page size: D (default)
nulptr references disabled
shared library private mapping disabled
shared library text merging disabled


Thanks,
venkat

Jean-Luc Oudart
Honored Contributor

Re: Can't open shared library: /oracle/Oracle9i/visdb/9.2.0/lib32/libclntsh.sl.9.0 no such file

Hi again,

may be you should try the embedded library 1st.
char +b enable myexe

man chatr for more information

Regards
Jean-Luc
fiat lux
venkat_ponnam
Occasional Advisor

Re: Can't open shared library: /oracle/Oracle9i/visdb/9.2.0/lib32/libclntsh.sl.9.0 no such file

Jean,

I tried with many options still I am having problem with xerces-library not found error.

Getting below error:
/usr/lib/dld.sl: Can't find path for shared library: libxerces-c.sl.26
/usr/lib/dld.sl: No such file or directory
Abort(coredump)

I set this library path in SHLIB_PATH also as follows.
/home/naren/socket1/xerces-c_2_6_0-hpux_11i-acc_a03/lib:/oracle/Oracle9i/visdb/9
.2.0/lib32

Tried with following options. I am out of Oracle 32 bit library path problem but still getting problem with xerces library.
I doubt still it is taling embedded path only.

1. chatr +s enable +b enable myexe

2. chatr +s enable +b disable myexe

3.chatr -l /oracle/Oracle9i/visdb/9.2.0/lib32/libclntsh.sl.9.0 -l /home/
naren/socket1/xerces-c_2_6_0-hpux_11i-acc_a03/lib/libxerces-c.sl.26 +s enable +
b enable myexe.

4. chatr -l /oracle/Oracle9i/visdb/9.2.0/lib32/libclntsh.sl.9.0 -l /home/
naren/socket1/xerces-c_2_6_0-hpux_11i-acc_a03/lib/libxerces-c.sl.26 +s enable +
b disable myexe

Thanks,
venkat
Eric Antunes
Honored Contributor

Re: Can't open shared library: /oracle/Oracle9i/visdb/9.2.0/lib32/libclntsh.sl.9.0 no such file

Hi Venkat,

Can you try it just whit the +s flag (chatr +s enable myexe)?

Kindest Regards,

Eric Antunes
Each and every day is a good day to learn.