1851686 Members
3055 Online
104061 Solutions
New Discussion

Unsatisified symbols

 
SOLVED
Go to solution
Ed Hon
Regular Advisor

Unsatisified symbols

I ran a vendor's script on HP-UX 11.0 to relink his software. Here is an excerpt of what I got. What is it telling me?

/usr/ccs/bin/ld: Unsatisfied symbols:
cma_socket (code)
cma_send (code)
cma_sendto (code)
pthread_create (code)
cma_connect (code)
cma_accept (code)
cma_open (code)

Thanks,

Ed
12 REPLIES 12
H.Merijn Brand (procura
Honored Contributor

Re: Unsatisified symbols

l1:/usr/lib 102 > grep cma_socket defs.nm
T 0x0005BCA8 ./libcma.sl:cma_socket
T 0x0005C150 ./libcma.sl:cma_socketpair
T 0x00068080 ./libcma.sl:cma_socket2
T 0x00068538 ./libcma.sl:cma_socketpair2
T 0x00068040 ./libcma.sl:cma_socket2
T 0x0005C120 ./libcma.sl:cma_socketpair
T 0x0005BC48 ./libcma.sl:cma_socket
T 0x000684F8 ./libcma.sl:cma_socketpair2
T 0x000D2D70 ./libdce.sl:cma_socket
T 0x001A3250 ./libdce.sl:cma_socket
T 0x0039D1C0 ./libdce.sl:cma_socket
T 0x00127B40 ./libdce.sl:cma_socket
l1:/usr/lib 103 >

did you pass -lcma and/or -ldce? Both also contain pthread_create

Enjoy, have FUN! H.Merijn

Enjoy, Have FUN! H.Merijn
Ed Hon
Regular Advisor

Re: Unsatisified symbols

>> did you pass -lcma and/or -ldce? Both also contain pthread_create

You are above me on this one. What are -lcma and -ldce?
A. Clay Stephenson
Acclaimed Contributor

Re: Unsatisified symbols

The -lcma (et al) is a shorthand for the linker to use libcma.a (or .so) found in the default library location(s) -- typically /usr/lib.

You need to find the line in the makefile or script that invokes the linker (ld) or it may be a line that links several .o's using cc and simply add -lcma to that line.

If you post your linking script or makefile, it should be easy to tell you where to put it.

If it ain't broke, I can fix that.
H.Merijn Brand (procura
Honored Contributor

Re: Unsatisified symbols

options to ld (the loader that links all objects together), the process that issues above message

# ld -o runnable -Llibrary/path -llib -llib2 ...

Do you actually *have* /usr/lib/libcma.sl and/or /usr/lib/libdce.sl ?

Enjoy, have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Ed Hon
Regular Advisor

Re: Unsatisified symbols

Here's what's in the vendor supplied script. The assumption is that the current working directory is the vendor's lib subdirectory.

[ -s syslibs ] && . ./syslibs

XLIBS=""
#
# Uncomment on HP/UX 10
#
#XLIBS=-lcl

for i in dlc83d.o
do
proexe=`echo $i | sed -e 's/dlc/pro/' -e 's/\.o//'`_sv
echo "-- $proexe"
cc -s -o $proexe pro8_sv.o $i $XLIBS $SYSLIBS || continue

[ -x /usr/bin/mcs ] && /usr/bin/mcs -d $proexe
mv $proexe ../bin
ls -l ../bin/$proexe
done
Mike Stroyan
Honored Contributor

Re: Unsatisified symbols

Those cma_* entry points are very uncommon for code built on 11.00. They are more common for code built on 10.20. You can't relink 10.20 code on an 11.00 system. It is not supported and often fails to work.

You could check the release notes or check with the vendor to see if there is an 11.00 version of the software.

It is often possible to see what compiler was used to build libraries and .o files.
/usr/ccs/bin/odump -compunit some.o
will report details about how some.o was built.
That may include the compiler version such as
HP92453-01 ; W.11.01.
or
HP92453-03; UX.10.20.02 (DAVIS)

Ed Hon
Regular Advisor

Re: Unsatisified symbols

# pwd
/usr/lib
# ll libcma*
-r-xr-xr-x 1 bin bin 528384 Mar 8 2000 libcma.1
-r-xr-xr-x 1 bin bin 540672 Feb 24 2000 libcma.2
lrwxr-xr-x 1 root sys 8 Jan 11 2000 libcma.sl -> libcma.2
# ll libdce*
-r-xr-xr-x 1 bin bin 4812800 Mar 8 2000 libdce.1
-r-xr-xr-x 1 bin bin 4849664 Feb 29 2000 libdce.2
lrwxr-xr-x 1 root sys 8 Jan 11 2000 libdce.sl -> libdce.2
-r-xr-xr-x 1 bin bin 1449984 Feb 29 2000 libdcecp.1
lrwxr-xr-x 1 root sys 10 Jan 11 2000 libdcecp.sl -> libdcec
p.1
-r-xr-xr-x 1 bin bin 176128 Feb 29 2000 libdcedpvt.1
lrwxr-xr-x 1 root sys 12 Jan 11 2000 libdcedpvt.sl -> libdc
edpvt.1
Ed Hon
Regular Advisor

Re: Unsatisified symbols

It looks like I don't have odump:

# ll *.o
-rw-rw-r-- 1 root sys 2310648 Sep 3 09:22 dlc83d.o
-rw-r--r-- 1 root sys 705464 Mar 7 2001 pro8_sv.o
-rw-r--r-- 1 root sys 470436 Jul 31 2002 pro9_sv.o
# /usr/ccs/bin/odump -compunit pro8_sv.o
sh: /usr/ccs/bin/odump: not found.
Adam J Markiewicz
Trusted Contributor

Re: Unsatisified symbols

Check:

XLIB=-lcma

Could work.

Good luck
Adam
I do everything perfectly, except from my mistakes
Ed Hon
Regular Advisor

Re: Unsatisified symbols

Setting XLIB=-lcma gets me down to one unsatisfied symbol:

/usr/ccs/bin/ld: Unsatisfied symbols:
U_STACK_TRACE (code)

Mike Stroyan
Honored Contributor

Re: Unsatisified symbols

You can get odump as part of patch PHSS_28434.
ranganath ramachandra
Esteemed Contributor
Solution

Re: Unsatisified symbols

U_STACK_TRACE is in libcl. so you need XLIB="-lcma -lcl"

PHSS_28434 has problems. PHSS_26559 should do.
 
--
ranga
hp-ux 11i v3[i work for hpe]

Accept or Kudo