Operating System - HP-UX
1833053 Members
2573 Online
110049 Solutions
New Discussion

link gcc 3.3.3 HPUX 11.11 ld: cannot find -l:libcl.sl

 
bruneau
Occasional Advisor

link gcc 3.3.3 HPUX 11.11 ld: cannot find -l:libcl.sl

Hello,

We have installed gcc 3.3.3 on HPUX 11.11 on a L1000.
Oracle 9.2.0.1.0 is also installed.
If we compile with cc everything is ok. while compiling with gcc, at link time we have the following message :

/usr/local/pa64/lib/gcc-lib/hppa64-hp-hpux11.11/3.3.3/../../../../hppa64-hp-hpux11.11/bin/ld: cannot find -l:libcl.sl

It is the same with those librairies :
-l:librt.sl -l:libnss_dns.1 -l:libdld.sl

The link librairies are :
"-L$ORACLE_HOME/lib/ -lclntsh `cat $ORACL
E_HOME/lib/ldflags` -L/lib/pa64 `cat $ORACLE_HOME/lib/sysliblist` -lm -lpthread
This correspond to :
-L/home/oracle/app/oracle/product/9.2.0.1.0/lib/ -lclntsh -lnbeq9 -lnhost9 -lnus9 -lnldap9 -lldapclnt9 -lnsslb9 -lnoname9 -lntcp9 -lntcps9 -lnsslb9 -lntcp9 -lntns9 -L/lib/pa64 -l:libcl.sl -l:librt.sl -lpthread -l:libnss_dns.1 -l:libdld.sl -lm -lpthread

The compiler is 64bit compiler :
/usr/local/pa64/bin/gcc

LD_LIBRARY_PATH is :
$ORACLE_HOME/lib:/usr/local/pa64/lib
also tried :
$ORACLE_HOME/lib:/lib/pa20_64


The same makefile was working on another HP server HPUX11.00 with oracle 8.1.7 and
gcc version 3.2 20020708 (experimental)


Thanks for your reply,
Sincerely.
xbruneau
13 REPLIES 13
Robert-Jan Goossens
Honored Contributor

Re: link gcc 3.3.3 HPUX 11.11 ld: cannot find -l:libcl.sl

Hi Bruneau,

Could you check on your system wich version of LIBCL patch you are running ?

# swlist -l patch | grep -i libcl

Kind regards,
Robert-Jan
Manish Srivastava
Trusted Contributor

Re: link gcc 3.3.3 HPUX 11.11 ld: cannot find -l:libcl.sl

Hi,

Just check whether the libraries you are linking to are 64-bit and check the LD_LIBRARY_PATH to have /usr/lib/pa20_64 in it.

manish
Harri Pasanen
Occasional Advisor

Re: link gcc 3.3.3 HPUX 11.11 ld: cannot find -l:libcl.sl

-l:libcl.sl looks suspect in context of gcc.

-lcl should work, and link against libcl.sl

If I recall, 64 bit gcc on HP-UX uses the GNU linker, not HP linker, and it will most probably not understand the previous syntax.

Harri
ranganath ramachandra
Esteemed Contributor

Re: link gcc 3.3.3 HPUX 11.11 ld: cannot find -l:libcl.sl

bruneau
Occasional Advisor

Re: link gcc 3.3.3 HPUX 11.11 ld: cannot find -l:libcl.sl

Hello,

Thanks for your replies.

swlist -l patch | grep -i libcl
answers :
PHSS_28303 1.0 LIBCL patch

I've tried :LD_LIBRARY_PATH=have /usr/lib/pa20_64


-l:libcl.sl worked ok for previous version of gcc/lib/libcl.sl: PA-RISC1.1 shared library -not stripped

-lcl works but how do i do to replace
-l:libnss_dns.1 ?

remark : gcc -print-file-name=libcl.sl
gives /lib/libcl.sl and
file lib/libcl.sl send
/lib/libcl.sl: PA-RISC1.1 shared library -not stripped

instead of
file /lib/pa20_64/libcl/lib/pa20_64/libcl.sl: ELF-64 shared object file - PA-RISC 2.0 (LP64).sl

It seems to link with 32bits librairies because the path of lib contains /lib and not /lib/pa20_64

How do I override path of lib for gcc 64 bits ?

Thanks again,
Bye
xbruneau
ranganath ramachandra
Esteemed Contributor

Re: link gcc 3.3.3 HPUX 11.11 ld: cannot find -l:libcl.sl

well as someone already said, you can simply replace "-l:libcl.sl" by "-lcl" (and so on).

you dont see this problem in PA32 because there is no gnu linker for PA32, and it seems that you configured PA64 gcc to use the gnu linker.
 
--
ranga
hp-ux 11i v3[i work for hpe]

Accept or Kudo

bruneau
Occasional Advisor

Re: link gcc 3.3.3 HPUX 11.11 ld: cannot find -l:libcl.sl

Hello ranganath,

Thanks for your reply, but what can i do for -l:libnss_dns.1 ?
-lnss_dns.1 doesn't work.

Good Bye.
xbruneau
ranganath ramachandra
Esteemed Contributor

Re: link gcc 3.3.3 HPUX 11.11 ld: cannot find -l:libcl.sl

use -lnss_dns . not specifying the '.1' should not be a problem since there will be a symlink to libnss_dns.1 as libnss_dns.sl.
 
--
ranga
hp-ux 11i v3[i work for hpe]

Accept or Kudo

ranganath ramachandra
Esteemed Contributor

Re: link gcc 3.3.3 HPUX 11.11 ld: cannot find -l:libcl.sl

by the way, someone mentioned LD_LIBRARY_PATH - this variable affects the library lookup only at process load-time/runtime. only the loader looks at it, not the linker.if you want to tell the linker where to look for libraries at link time, you should set LPATH. that is for the hp linker, but there is a good chance that it will be the same with the gnu ld too.
 
--
ranga
hp-ux 11i v3[i work for hpe]

Accept or Kudo

bruneau
Occasional Advisor

Re: link gcc 3.3.3 HPUX 11.11 ld: cannot find -l:libcl.sl

ranganath ramachandra said :
use -lnss_dns . not specifying the '.1' should not be a problem since there will be a symlink to libnss_dns.1 as libnss_dns.sl

I've tried -lnss_dns and unfortunently it doesn't work .
I've checked on all the server, there is only libnss_dns.1 and not libnss_dns.sl on it.
Do I require some other installation to install this library (libnss_dns.sl).
I saw some information on page
http://devrsrc1.external.hp.com/STK/impacts/i255.html
which explains libnss_dns.sl exists.
xbruneau
ranganath ramachandra
Esteemed Contributor

Re: link gcc 3.3.3 HPUX 11.11 ld: cannot find -l:libcl.sl

you are right, there is no such symbolic link.

so simply replace -l:libnss_dns with the full path name - /usr/lib/libnss_dns.1 .
 
--
ranga
hp-ux 11i v3[i work for hpe]

Accept or Kudo

ranganath ramachandra
Esteemed Contributor

Re: link gcc 3.3.3 HPUX 11.11 ld: cannot find -l:libcl.sl

i guess you are building a 64-bit application, then the path is /usr/lib/pa20_64/libnss_dns.1 .

i think what the devresource page says is that the porting kit provides you that library. the symbolic link that i mentioned is needed in a development environment so that you can pass things like -lnss_dns to the linker. in the runtime its not a problem since the loader looks for the library by the recorded internal name.

in case of the hpux linker, the workaround is -l:libnss_dns.1. however that does not work with the gnu linker so you need to specify the full path (or make a symbolic link /usr/lib/pa20_64/libnss_dns.sl yourself, to point tp libnss_dns.1).
 
--
ranga
hp-ux 11i v3[i work for hpe]

Accept or Kudo

H.Merijn Brand (procura
Honored Contributor

Re: link gcc 3.3.3 HPUX 11.11 ld: cannot find -l:libcl.sl

GNU gcc/64 comes with GNU ld (in most cases), and GNU ld doesn't recognize that syntax.

Just temporarily move GNU ld out of the way (rename it to Gld or so) and try again with HP's ld

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