f



Has someone got "/usr/ccs/bin/ld: Can't find library: "dl"" error

Dear friends

While building the server executable for Systinet Server And Im getting
the following error.
$ make all
No suffix list.
Making all in basic
No suffix list.
Making all in arrays
        cd ../.. && make  am--refresh
No suffix list.
No suffix list.
        /bin/sh ../../libtool --mode=link /opt/aCC/bin/aCC  -g     -o
arrays  client.o arrays.lo arraysStructs.lo
/opt/systinet/server_cpp65/lib/libwasp.la
/opt/systinet/server_cpp65/lib/libwasp_stl.la
/opt/aCC/bin/aCC -g -o arrays client.o .libs/arrays.o
..libs/arraysStructs.o  /opt/systinet/server_cpp65/lib/libwasp_stl.sl
/opt/systinet/server_cpp65/lib/libwasp.sl -lm -ldl -lpthread  -Wl,+b
-Wl,/opt/systinet/server_cpp65/lib -Wl,+s
/usr/ccs/bin/ld: Can't find library: "dl"
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.

when I checked under /sr/ccs/bin/ ld is an executable.

Does someone know why such error come and what could be the solution
for this ?

Thanks 
Amit

0
11/17/2006 5:54:52 AM
comp.sys.hp.hpux 4408 articles. 1 followers. dewi.bening (7) is leader. Post Follow

9 Replies
854 Views

Similar Articles

[PageSpeed] 17

"Amit_Basnak" <Amit.Basnak@gmail.com> writes:

> While building the server executable for Systinet Server And Im getting
> the following error.
....
> /usr/ccs/bin/ld: Can't find library: "dl"
> *** Error exit code 1

The makefile you are using clearly was not created for HP-UX.

There never was libdl.* libray on it. Somewhat equivalent library
is called libdld. Try changing '-ldl' to '-ldld' and see what
happens.

Cheers,
-- 
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
0
Paul
11/17/2006 6:34:46 AM
Amit_Basnak wrote:
>         /bin/sh ../../libtool --mode=link /opt/aCC/bin/aCC  -g     -o
> arrays  client.o arrays.lo arraysStructs.lo
> /opt/systinet/server_cpp65/lib/libwasp.la
> /opt/systinet/server_cpp65/lib/libwasp_stl.la
> /opt/aCC/bin/aCC -g -o arrays client.o .libs/arrays.o
> .libs/arraysStructs.o  /opt/systinet/server_cpp65/lib/libwasp_stl.sl
> /opt/systinet/server_cpp65/lib/libwasp.sl -lm -ldl -lpthread  -Wl,+b
> -Wl,/opt/systinet/server_cpp65/lib -Wl,+s
> /usr/ccs/bin/ld: Can't find library: "dl"
> *** Error exit code 1

Linker is searching for libdl.sl (helper for dynamic loading).
It is usually available in /usr/lib/. Looks like it is not
available in the default path. Search for it and pass the
directory to ld with -L option.

--vishwas.
0
Vishwas
11/17/2006 6:35:56 AM
Paul Pluzhnikov <ppluzhnikov-nsp@charter.net> writes:

> The makefile you are using clearly was not created for HP-UX.
> There never was libdl.* libray on it.

At least not in 32-bit mode.

There is a 64-bit libdl under /usr/lib/pa20_64/
but you (apparently) aren't linking 64-bit objects.

Cheers,
-- 
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
0
Paul
11/17/2006 6:51:03 AM
Thanks Paul and Vishwas for your inputs
Paul yes there is a 64 bit libdl under  /usr/lib/pa20_64
The error may be coming as whenever I log in to my shell , I get a
message
${HOME:-.}/.profile[33]: SHLIB_PATH: parameter not set
However I have set my path for SHLIB_PATH  in my .profile as below
WASPC_HOME=/export/home/amitbas/systinet/server_cpp65
PATH=$WASPC_HOME/bin:$PATH
SHLIB_PATH=$WASPC_HOME/lib:$SHLIB_PATH
export WASPC_HOME PATH SHLIB_PATH
Now when I logout and log in , I get SHLIB_PATH not set. Why would I
get such an error when I set the path in my .profile ?

Thanks for your time
Amit


Paul Pluzhnikov wrote:
> Paul Pluzhnikov <ppluzhnikov-nsp@charter.net> writes:
>
> > The makefile you are using clearly was not created for HP-UX.
> > There never was libdl.* libray on it.
>
> At least not in 32-bit mode.
>
> There is a 64-bit libdl under /usr/lib/pa20_64/
> but you (apparently) aren't linking 64-bit objects.
>
> Cheers,
> --
> In order to understand recursion you must first understand recursion.
> Remove /-nsp/ for email.

0
Amit_Basnak
11/17/2006 8:22:12 AM
I managed to set the correct SHLIB path in my .profile now

The thing I identified is while configuring the server I should have
configured it with
../configure CXX= /opt/aCC/bin/aCC LD= /opt/aCC/bin/aCC

Paul and Vishwas
For changing '-ldl' to '-ldld' , does it need to be passed like make
all -ldld  ??
Please let me know

Thank you for your time
Amit



Amit_Basnak wrote:
> Thanks Paul and Vishwas for your inputs
> Paul yes there is a 64 bit libdl under  /usr/lib/pa20_64
> The error may be coming as whenever I log in to my shell , I get a
> message
> ${HOME:-.}/.profile[33]: SHLIB_PATH: parameter not set
> However I have set my path for SHLIB_PATH  in my .profile as below
> WASPC_HOME=/export/home/amitbas/systinet/server_cpp65
> PATH=$WASPC_HOME/bin:$PATH
> SHLIB_PATH=$WASPC_HOME/lib:$SHLIB_PATH
> export WASPC_HOME PATH SHLIB_PATH
> Now when I logout and log in , I get SHLIB_PATH not set. Why would I
> get such an error when I set the path in my .profile ?
>
> Thanks for your time
> Amit
>
>
> Paul Pluzhnikov wrote:
> > Paul Pluzhnikov <ppluzhnikov-nsp@charter.net> writes:
> >
> > > The makefile you are using clearly was not created for HP-UX.
> > > There never was libdl.* libray on it.
> >
> > At least not in 32-bit mode.
> >
> > There is a 64-bit libdl under /usr/lib/pa20_64/
> > but you (apparently) aren't linking 64-bit objects.
> >
> > Cheers,
> > --
> > In order to understand recursion you must first understand recursion.
> > Remove /-nsp/ for email.

0
Amit_Basnak
11/17/2006 9:21:52 AM
"Amit_Basnak" <Amit.Basnak@gmail.com> writes:

Please do not top-post:

    A: Because it reverses the logical flow of conversation.
    Q: Why is top posting frowned upon?

> I managed to set the correct SHLIB path in my .profile now

SHLIB_PATH has *nothing* to do with your problem.

> The thing I identified is while configuring the server I should have
> configured it with
> ./configure CXX= /opt/aCC/bin/aCC LD= /opt/aCC/bin/aCC

You can't have spaces between the CXX= and its value.

> For changing '-ldl' to '-ldld' , does it need to be passed like make
> all -ldld  ??

No. You need to edit Makefile and replace '-ldl' with '-ldld' in it.

Cheers,
-- 
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
0
Paul
11/17/2006 2:25:03 PM
Hi paul
I tried searching for -ldl and ldld in all Makefile but didnt find it
there. Im trying everything but still getting the same error.
I dont know what to do now


Paul Pluzhnikov wrote:
> "Amit_Basnak" <Amit.Basnak@gmail.com> writes:
>
> Please do not top-post:
>
>     A: Because it reverses the logical flow of conversation.
>     Q: Why is top posting frowned upon?
>
> > I managed to set the correct SHLIB path in my .profile now
>
> SHLIB_PATH has *nothing* to do with your problem.
>
> > The thing I identified is while configuring the server I should have
> > configured it with
> > ./configure CXX= /opt/aCC/bin/aCC LD= /opt/aCC/bin/aCC
>
> You can't have spaces between the CXX= and its value.
>
> > For changing '-ldl' to '-ldld' , does it need to be passed like make
> > all -ldld  ??
>
> No. You need to edit Makefile and replace '-ldl' with '-ldld' in it.
>
> Cheers,
> --
> In order to understand recursion you must first understand recursion.
> Remove /-nsp/ for email.

0
Amit_Basnak
11/21/2006 10:08:38 AM
Amit_Basnak wrote:
> Hi paul
> I tried searching for -ldl and ldld in all Makefile but didnt find it
> there. Im trying everything but still getting the same error.
> I dont know what to do now

I think (I'm just guessing) your ./configure script
writes the makefile. So, it would be good if you take
a look at how the configure script generates -ldl
in the makefile.

--vishwas.
0
Vishwas
11/21/2006 12:21:57 PM
Vishwas Thanks for the reply here is what my configure script has for
ldl
# if libdl is installed we need to link against it
    echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
if test "${ac_cv_lib_dl_dlopen+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ldl  $LIBS"

if test $ac_cv_lib_dl_dlopen = yes; then
  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
else

    lt_cv_dlopen="dyld"
    lt_cv_dlopen_libs=
    lt_cv_dlopen_self=yes

fi
---------------------------------------------------------------------------------------------------------------------------

For -ldld

if test $ac_cv_lib_svld_dlopen = yes; then
  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
else
  echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
if test "${ac_cv_lib_dld_dld_link+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ldld  $LIBS"

>From these code snippet , there isnt solid on this

Thanks for your time
Amit
Vishwas Pai wrote:
> Amit_Basnak wrote:
> > Hi paul
> > I tried searching for -ldl and ldld in all Makefile but didnt find it
> > there. Im trying everything but still getting the same error.
> > I dont know what to do now
>
> I think (I'm just guessing) your ./configure script
> writes the makefile. So, it would be good if you take
> a look at how the configure script generates -ldl
> in the makefile.
> 
> --vishwas.

0
Amit_Basnak
11/21/2006 1:01:09 PM
Reply: