- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- /usr/ccs/bin/ld: Can't find library: "clntsh"
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2006 03:19 PM
01-11-2006 03:19 PM
/usr/ccs/bin/ld: Can't find library: "clntsh"
In it I run the following line:
$ cc try.c -noshared +DA1.1 -I$ORACLE_HOME/precomp/public -L$ORACLE_HOME/lib -lclntsh
which then gives
/usr/ccs/bin/ld: Can't find library: "clntsh"
The environment in which I run the 'cc' command:
$ echo $SHLIB_PATH
/app/app/oracle/product/10.1.0/lib32
$ echo $LD_LIBRARY_PATH
/app/app/oracle/product/10.1.0/lib
$ ll $ORACLE_HOME/lib/libclntsh.*
lrwxrwxr-x 1 oracle dba 17 Jan 3 18:43 /app/app/oracle/product/10.1.0/lib/libclntsh.sl -> libclntsh.sl.10.1
-rwxr-xr-x 1 oracle dba 19105640 Jan 3 18:42 /app/app/oracle/product/10.1.0/lib/libclntsh.sl.10.1
$
Could anyone please point out for me what I've missed out such that I get the "Can't find library" error message? Thank-you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2006 03:26 PM
01-11-2006 03:26 PM
Re: /usr/ccs/bin/ld: Can't find library: "clntsh"
give? Export SHLIB_PATH=$SHLIB_PATH:/app/app/oracle/product/10.1.0/lib/
will help you.
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2006 03:53 PM
01-11-2006 03:53 PM
Re: /usr/ccs/bin/ld: Can't find library: "clntsh"
export LD_LIBRARY_PATH=/app/app/oracle/product/10.1.0/lib:$LD_LIBRARY_PATH.
This should solve your problem.
HTH,
Prabu.S
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2006 04:05 PM
01-11-2006 04:05 PM
Re: /usr/ccs/bin/ld: Can't find library: "clntsh"
Thanks for looking into the problem. I've done the following:
$ export SHLIB_PATH=$SHLIB_PATH:/app/app/oracle/product/10.1.0/lib/
$ export LD_LIBRARY_PATH=/app/app/oracle/product/10.1.0/lib:$LD_LIBRARY_PATH
$ echo $SHLIB_PATH
/app/app/oracle/product/10.1.0/lib32:/app/app/oracle/product/10.1.0/lib/
$ echo $LD_LIBRARY_PATH
/app/app/oracle/product/10.1.0/lib:/app/app/oracle/product/10.1.0/lib
$ cc try.c -noshared +DA1.1 -I$ORACLE_HOME/precomp/public -L$ORACLE_HOME/lib -lclntsh
/usr/ccs/bin/ld: Can't find library: "clntsh"
As for Arun's request, here it is:
$ file /app/app/oracle/product/10.1.0/lib/libclntsh.sl
/app/app/oracle/product/10.1.0/lib/libclntsh.sl: ELF-64 shared object file - PA-RISC 2.0 (LP64)
$ ldd /app/app/oracle/product/10.1.0/lib/libclntsh.sl
libnnz10.sl => /app/app/oracle/product/10.1.0/lib/libnnz10.sl
librt.2 => /lib/pa20_64/librt.2
libpthread.1 => /lib/pa20_64/libpthread.1
libnss_dns.1 => /lib/pa20_64/libnss_dns.1
libdl.1 => /lib/pa20_64/libdl.1
libm.2 => /lib/pa20_64/libm.2
libc.2 => /lib/pa20_64/libc.2
libcl.2 => /lib/pa20_64/libcl.2
libdl.1 => /usr/lib/pa20_64/libdl.1
libdl.1 => /usr/lib/pa20_64/libdl.1
$
@@ Kwang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2006 04:13 PM
01-11-2006 04:13 PM
Re: /usr/ccs/bin/ld: Can't find library: "clntsh"
You are trying to compile with +DA1.1 which in turn produces 32 bit objects and you are trying to link it with 64 bit /app/app/oracle/product/10.1.0/lib/libclntsh.sl.10.1. It wont happen aytiime. Either you have to find 32 bit library or you have to compile with +DA2.0 option to generate 64 bit objects.
Hope this is clear.
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2006 04:16 PM
01-11-2006 04:16 PM
Re: /usr/ccs/bin/ld: Can't find library: "clntsh"
Append the following
-L/app/app/oracle/product/10.1.0/lib -lclntsh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2006 04:34 PM
01-11-2006 04:34 PM
Re: /usr/ccs/bin/ld: Can't find library: "clntsh"
Hi Arun, thanks for pointing "+DA1.1" out. I've tried both one with "+DA2.0" and another without any "DA"s. Yes I do wish to compile a 62-bit program.
$ echo $SHLIB_PATH
/app/app/oracle/product/10.1.0/lib32:/app/app/oracle/product/10.1.0/lib/
$ echo $LD_LIBRARY_PATH
/app/app/oracle/product/10.1.0/lib:/app/app/oracle/product/10.1.0/lib
$
$ cc try.c -noshared -I/app/app/oracle/product/10.1.0/precomp/public -L/app/app/oracle/product/10.1.0/lib -lclntsh
/usr/ccs/bin/ld: Can't find library: "clntsh"
$ cc try.c -noshared +DA2.0 -I/app/app/oracle/product/10.1.0/precomp/public -L/app/app/oracle/product/10.1.0/lib -lclntsh
/usr/ccs/bin/ld: Can't find library: "clntsh"
$
@@ Kwang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2006 04:36 PM
01-11-2006 04:36 PM
Re: /usr/ccs/bin/ld: Can't find library: "clntsh"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2006 04:37 PM
01-11-2006 04:37 PM
Re: /usr/ccs/bin/ld: Can't find library: "clntsh"
What does it give ?
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2006 04:41 PM
01-11-2006 04:41 PM
Re: /usr/ccs/bin/ld: Can't find library: "clntsh"
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2006 04:59 PM
01-11-2006 04:59 PM
Re: /usr/ccs/bin/ld: Can't find library: "clntsh"
I guess the problem is that,it is not able to find the library.
So, try $ cc try.c -noshared +DA1.1 -I$ORACLE_HOME/precomp/public -L$ORACLE_HOME/lib -l /app/app/oracle/product/10.1.0/lib/libclntsh.sl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2006 05:25 PM
01-11-2006 05:25 PM
Re: /usr/ccs/bin/ld: Can't find library: "clntsh"
Here are the information:
$ chatr /app/app/oracle/product/10.1.0/lib/libclntsh.sl.10.1
/app/app/oracle/product/10.1.0/lib/libclntsh.sl.10.1:
64-bit ELF shared library
shared library dynamic path search:
LD_LIBRARY_PATH enabled first
SHLIB_PATH enabled second
embedded path enabled third /app/app/oracle/product/10.1.0/lib
internal name:
libclntsh.sl.10.1
shared library list:
libnnz10.sl
librt.2
libpthread.1
libnss_dns.1
libdl.1
libm.2
libc.2
libcl.2
shared library mapped private disabled
shared vtable support disabled
explicit unloading enabled
linkage table protection disabled
segments:
index type address flags size
5 text 4000000000000000 z---c- D (default)
6 data 8000000100000000 ---m-- D (default)
static branch prediction disabled
kernel assisted branch prediction enabled
lazy swap allocation for dynamic segments disabled
nulptr references enabled
$ which cc
/usr/bin/cc
$ file /usr/bin/cc
/usr/bin/cc: PA-RISC1.1 shared executable dynamically linked
$ ll /usr/bin/cc
lr-xr-xr-t 1 root sys 17 Dec 30 17:29 /usr/bin/cc -> /opt/ansic/bin/cc
$ file /opt/ansic/bin/cc
/opt/ansic/bin/cc: PA-RISC1.1 shared executable dynamically linked
$
@@ Kwang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2006 05:25 PM
01-11-2006 05:25 PM
Re: /usr/ccs/bin/ld: Can't find library: "clntsh"
I've also tried the line you gave:
$ cc try.c -noshared +DA1.1 -I$ORACLE_HOME/precomp/public -L$ORACLE_HOME/lib -l /app/app/oracle/product/10.1.0/lib/libclntsh.sl
/usr/ccs/bin/ld: Can't find library: "/app/app/oracle/product/10.1.0/lib/libclntsh.sl"
$
@@ Kwang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2006 05:44 PM
01-11-2006 05:44 PM
Re: /usr/ccs/bin/ld: Can't find library: "clntsh"
Are you sure you are giving the right path.
Your latest lib is /app/app/oracle/product/10.1.0/lib/libclntsh.sl.10.1
Is there a link named libclntsh.sl pointing to the above one in the same directory.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2006 05:49 PM
01-11-2006 05:49 PM
Re: /usr/ccs/bin/ld: Can't find library: "clntsh"
Is /app/app/oracle/product/10.1.0/lib/ a NFS mounted dir ? also, you should n't try to compile with +DA1.1 since it is for generating 32 bit objects and you want 64 bit.
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2006 05:59 PM
01-11-2006 05:59 PM
Re: /usr/ccs/bin/ld: Can't find library: "clntsh"
The options to cc are okay with the exception of the "-noshared" switch. This causes cc to use archive instead of shared libraries (ones that are suffixed *.sl). So unless you have an archive library (one that ends in *.a) in the library path specified with the "-L" switch, cc will keep complaining. Suggest you revise the options to cc as follows:
# cc try.c +DA1.1 -I$ORACLE_HOME/precomp/public -L$ORACLE_HOME/lib -lclntsh
Basically removing the "-noshared" option to cc should give you a successful compilation.
cheers!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2006 06:09 PM
01-11-2006 06:09 PM
Re: /usr/ccs/bin/ld: Can't find library: "clntsh"
Yes, it is the latest library and the link are both found in:
$ ll /app/app/oracle/product/10.1.0/lib/libclntsh.*
lrwxrwxr-x 1 oracle dba 17 Jan 3 18:43 /app/app/oracle/product/10.1.0/lib/libclntsh.sl -> libclntsh.sl.10.1
-rwxr-xr-x 1 oracle dba 19105640 Jan 3 18:42 /app/app/oracle/product/10.1.0/lib/libclntsh.sl.10.1
@@ Kwang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2006 06:09 PM
01-11-2006 06:09 PM
Re: /usr/ccs/bin/ld: Can't find library: "clntsh"
Acknowledge, I'll not use "+DA1.1". I've used one earlier when I was replying to Prabu.
BTW, "/app/app/oracle/product/10.1.0/lib/" is _not_ NFS mounted.
@@ Kwang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2006 06:19 PM
01-11-2006 06:19 PM
Re: /usr/ccs/bin/ld: Can't find library: "clntsh"
Do a man on ld...man ld(1) which should shed more light on this stuff or search for it on docs.hp.com.
hope it helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2006 07:33 PM
01-11-2006 07:33 PM
Re: /usr/ccs/bin/ld: Can't find library: "clntsh"
It's a successful compilation!
$ cc try.c +DA2.0W -I/app/app/oracle/product/10.1.0/precomp/public -L/app/app/oracle/product/10.1.0/lib -lclntsh
$ a.out
Thank-you to you Arun, Prabu, Vibhor and Sandman for helping out! :)
$
After this I'll be trying to compile other programs ;)
@@ Kwang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2006 07:50 PM
01-11-2006 07:50 PM
Re: /usr/ccs/bin/ld: Can't find library: "clntsh"
Could you reply an empty message to this thread? Thank-you.
@@ Kwang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2006 08:07 PM
01-11-2006 08:07 PM
Re: /usr/ccs/bin/ld: Can't find library: "clntsh"
+DA2.0W - Compiles in 64-bit mode for the PA-RISC 2.0 architecture. The macros __LP64__ and _PA_RISC2_0 are #defined.
__LP64__ Macro that is automatically defined by the HP aC++ compiler when compiling in 64-bit mode. Can be used within conditional directives to isolate 64-lbit mode code.
+DD64 Recommended option for compiling in 64-bit mode on the PA-RISC 2.0 architecture. The macros __LP64__ and _PA_RISC2_0 are #defined. (Same as +DA2.0W.)
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2006 02:55 AM
01-12-2006 02:55 AM
Re: /usr/ccs/bin/ld: Can't find library: "clntsh"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2006 10:01 PM
01-15-2006 10:01 PM
Re: /usr/ccs/bin/ld: Can't find library: "clntsh"
@@ Kwang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2006 10:09 PM
01-15-2006 10:09 PM
Re: /usr/ccs/bin/ld: Can't find library: "clntsh"
Thanks for the recommendation.
I'll note down what you said. :) See ya!
@@ Kwang