Operating System - Linux
1824806 Members
3969 Online
109674 Solutions
New Discussion юеВ

ldd shows multiple link to same shared libraries

 
Alain H.
Advisor

ldd shows multiple link to same shared libraries

Hello,

On HPUX Itanium 11.23 system, ldd shows multiple links to same libraries.

Is it a linker issue, or just an option issue?

$ ldd temip_framework_am | sort | uniq -c | sort -n
1 /usr/opt/temip/lib//libwtc9.so =>
/usr/opt/temip/lib//libwtc9.so
....
1 libxti.so.1 => /usr/lib/hpux64/libxti.so.1
2 libm.so.1 => /usr/lib/hpux64/libm.so.1
2 libstd_v2.so.1 => /usr/lib/hpux64/libstd_v2.so.1
3 libCsup.so.1 => /usr/lib/hpux64/libCsup.so.1
3 libnsl.so.1 => /usr/lib/hpux64/libnsl.so.1
3 libunwind.so.1 => /usr/lib/hpux64/libunwind.so.1
4 libc.so.1 => /usr/lib/hpux64/libc.so.1
4 libdl.so.1 => /usr/lib/hpux64/libdl.so.1
4 libpthread.so.1 => /usr/lib/hpux64/libpthread.so.1

HPUX Patches:
-------------
BUNDLE11i B.11.23.0409.3 Required Patch Bundle for HP-UX 11i v2 (B.11.23), September 2004

B3913DB C.11.23.09 HP aC++ Compiler (S800)
PHSS_33350 1.0 aC++ Runtime (IA: A.06.05, PA: A.03.65)
PHSS_34047 1.0 aC++ Compiler (A.06.06)
2 REPLIES 2
A. Clay Stephenson
Acclaimed Contributor

Re: ldd shows multiple link to same shared libraries

Probably neither; it's not all that uncommon.

Add the -v option to ldd and you will get more data. Basically you will find that some functions are required directly by the program itself and others are required indirectly by functions in other libraries.
These are not mutually exclusive events.
If it ain't broke, I can fix that.
Dennis Handly
Acclaimed Contributor

Re: ldd shows multiple link to same shared libraries

>Is it a linker issue, or just an option issue?

Clay's right. It is a developer design decision. If you want your lib to be used as a plugin, you need to attach all of the shlibs you need to your lib. Especially if you don't know how the application is linked.

You can use chatr(1) on each shlib to see their dependent shlibs.

>4 libc.so.1 => /usr/lib/hpux64/libc.so.1

This is plain broken. Only the executable should be linked against libc and it should always be present.

Note: dlopen has a bunch of fancy-smancy options that may require duplication.

You haven't assigned any points yet in a year for your 3 threads. Please read:
http://forums1.itrc.hp.com/service/forums/helptips.do?#33
http://forums1.itrc.hp.com/service/forums/pageList.do?userId=CA1109764&listType=unassigned&forumId=1

You can reopen your recent thread and assign points with:
http://forums1.itrc.hp.com/service/forums/helptips.do?#41