1753460 Members
4570 Online
108794 Solutions
New Discussion юеВ

Linker errors

 
Sanjib Talukdar
Occasional Advisor

Linker errors

All,
I am trying to port our application from HP UX B.10.20 to HP UX B.11.0. I am getting the following error from one of our third party libraries while building the application:

/usr/ccs/bin/ld: Unsatisfied symbols:
xdr_float (first referenced in /prod/ssi/ssi-3.18/uia/hasde/lib/libhasde.a(msg_xdr.o)) (code)
xdr_vector (first referenced in /prod/ssi/ssi-3.18/uia/hasde/lib/libhasde.a(msg_xdr.o)) (code)
xdr_string (first referenced in /prod/ssi/ssi-3.18/uia/hasde/lib/libhasde.a(msg_xdr.o)) (code)
xdr_pointer (first referenced in /prod/ssi/ssi-3.18/uia/hasde/lib/libhasde.a(msg_xdr.o)) (code)
xdrstdio_create (first referenced in /prod/ssi/ssi-3.18/uia/hasde/lib/libpd.a(pd_main.o)) (code)
xdr_bytes (first referenced in /prod/ssi/ssi-3.18/uia/hasde/lib/libhasde.a(msg_xdr.o)) (code)
xdr_int (first referenced in /prod/ssi/ssi-3.18/uia/hasde/lib/libpd.a(pd_main.o)) (code)
xdr_u_char (first referenced in /prod/ssi/ssi-3.18/uia/hasde/lib/libhasde.a(msg_xdr.o)) (code)
xdr_long (first referenced in /prod/ssi/ssi-3.18/uia/hasde/lib/libhasde.a(msg_xdr.o)) (code)
xdr_u_short (first referenced in /prod/ssi/ssi-3.18/uia/hasde/lib/libhasde.a(msg_xdr.o)) (code)
xdr_char (first referenced in /prod/ssi/ssi-3.18/uia/hasde/lib/libhasde.a(msg_xdr.o)) (code)

All are related to the rpc functions and on HP UX 10.20 they were getting linked from libc.a in /usr/lib directory. I am led to believe so from the following output:

$> odump -sym libc.a | grep -e xdr_float -e xdr_int -e xdr_vector -e xdr_string
-e xdr_pointer -e xdrstdio_create -e xdr_bytes -e xdr_u_char -e xdr_long -e xdr_
u_short -e xdr_char

$> 00000000 00000000 Code Unsat 0 ....... 0 00000 _xdr_string
00000000 00000000 Code Unsat 0 ....... 0 00000 _xdr_string
00000000 00000000 Code Unsat 0 ....... 0 00000 _xdr_int
00000000 00000005 Code Unsat 0 ....... 0 00000 _xdrstdio_create
00000000 00000002 Code Unsat 0 ....... 0 00000 _xdr_string
00000000 00000005 Code Unsat 0 ....... 0 00000 _xdr_int
00000000 00000000 Code Unsat 0 ....... 0 00000 _xdr_u_short
00000000 00000000 Code Unsat 0 ....... 0 00000 _xdr_bytes
0000000b 00000002 Entry Univ 0 ....... 3 11001 _xdr_int
0000000b 00000002 Entry Univ 0 ......S 3 11001 xdr_int
000000cb 00000004 Entry Univ 0 ....... 3 11001 _xdr_long
000000cb 00000004 Entry Univ 0 ......S 3 11001 xdr_long
0000022b 00000007 Entry Univ 0 ....... 3 11001 _xdr_u_short
0000022b 00000007 Entry Univ 0 ......S 3 11001 xdr_u_short
000004e3 0000000b Entry Univ 0 ....... 3 11111 _xdr_bytes
000004e3 0000000b Entry Univ 0 ......S 3 11111 xdr_bytes
00000773 0000000e Entry Univ 0 ....... 3 11101 _xdr_string
00000773 0000000e Entry Univ 0 ......S 3 11101 xdr_string
000008eb 00000011 Entry Univ 0 ....... 3 11001 _xdr_char
000008eb 00000011 Entry Univ 0 ......S 3 11001 xdr_char
00000973 00000012 Entry Univ 0 ....... 3 11001 _xdr_u_char
00000973 00000012 Entry Univ 0 ......S 3 11001 xdr_u_char
000001ab 00000002 Entry Univ 0 ....... 3 11111 _xdr_vector
000001ab 00000002 Entry Univ 0 ......S 3 11111 xdr_vector
00000000 00000000 Code Unsat 0 ....... 0 00000 _xdr_int
00000000 00000002 Code Unsat 0 ....... 0 00000 _xdr_string
Symbols from /usr/lib/libc.a[xdr_float.o]:
00000003 00000000 Entry Univ 0 ....... 3 11001 _xdr_float
00000003 00000000 Entry Univ 0 ......S 3 11001 xdr_float
000000f3 00000002 Entry Univ 0 ....... 3 11111 _xdr_pointer
000000f3 00000002 Entry Univ 0 ......S 3 11111 xdr_pointer
00000003 00000000 Entry Univ 0 ....... 3 11100 _xdrstdio_create
00000003 00000000 Entry Univ 0 ......S 3 11100 xdrstdio_create
00000000 00000000 Code Unsat 0 ....... 0 00000 _xdr_bytes
00000000 00000001 Code Unsat 0 ....... 0 00000 _xdr_string
00000000 00000000 Code Unsat 0 ....... 0 00000 _xdr_bytes
00000000 00000001 Code Unsat 0 ....... 0 00000 _xdr_string
00000000 00000005 Code Unsat 0 ....... 0 00000 _xdr_u_short

I checked the libc.a file on HP UX 11.0 and the above functions are not part of this library.

Can anyone please tell me which library on HP UX 11.0 will have the above rpc related functions?

Thank You.
Sanjib.
5 REPLIES 5
Mike Stroyan
Honored Contributor

Re: Linker errors

Those symbols are defined in /usr/lib/libnsl.sl.
Manish Srivastava
Trusted Contributor

Re: Linker errors

Hi,

If you are linking to the archive version then /usr/lib/libnsl.a is the right library.


manish
Sanjib Talukdar
Occasional Advisor

Re: Linker errors

Mike, Manish,
Thank you for your replies. I managed to identify the library, but I would further like to clarify if there are any backward compatibility issues or not.
Mike Stroyan
Honored Contributor

Re: Linker errors

You may also need to link with libxti.sl.
This transition impact is discussed in http://devrsrc1.external.hp.com/STK/impacts/i555.html

You could look at the "Software Transition Kit" site at http://devrsrc1.external.hp.com/STK/
There are scanner tools an lists of impacts from transitions. The 10.20 to 11.00 transition is a little bit old by now.
Manish Srivastava
Trusted Contributor

Re: Linker errors

hi,

genrally lib*.1 is for compatiblity and lib*.2 is for the latest release. You can try linking to lib*.1

manish
(Mike deservs 10 points)