Operating System - HP-UX
1753762 Members
4683 Online
108799 Solutions
New Discussion юеВ

ERROR:dlopen failed: Unsatisfied code symbol '__shlTerm'

 
dnboy
Occasional Advisor

ERROR:dlopen failed: Unsatisfied code symbol '__shlTerm'

Hi,
When I execute my program, This error was occured.
dlopen failed: Unsatisfied code symbol '__shlTerm' in load module '/ideptestdb/app/app/AGENT/lib/libIdepNMP.sl'.

aCC versioin:
#aCC -V
aCC: HP ANSI C++ B3910B A.03.50
#swlist | grep -i ac++
B3913DB C.03.50 HP aC++ Compiler (S800)

oracle version:
9.2.0.8.0

#ldd /ideptestdb/app/app/AGENT/lib/libIdepNMP.sl
libclntsh.sl.9.0 => /source_va/oracle/app/oracle/product/9.2.0/lib/libclntsh.sl.9.0
libnetsnmpagent.sl.16 => /ideptestdb/app/app/AGENT/lib/libnetsnmpagent.sl.16
libnetsnmphelpers.sl.16 => /ideptestdb/app/app/AGENT/lib/libnetsnmphelpers.sl.16
libnetsnmpmibs.sl.16 => /ideptestdb/app/app/AGENT/lib/libnetsnmpmibs.sl.16
libnetsnmp.sl.16 => /ideptestdb/app/app/AGENT/lib/libnetsnmp.sl.16
libpthread.1 => /usr/lib/pa20_64/libpthread.1
libsec.2 => /usr/lib/pa20_64/libsec.2
librt.2 => /usr/lib/pa20_64/librt.2
libnsl.1 => /usr/lib/pa20_64/libnsl.1
libm.2 => /usr/lib/pa20_64/libm.2
libwtc9.sl => /source_va/oracle/app/oracle/product/9.2.0/lib/libwtc9.sl
librt.2 => /lib/pa20_64/librt.2
libpthread.1 => /lib/pa20_64/libpthread.1
libnss_dns.1 => /lib/pa20_64/libnss_dns.1
libdl.1 => /lib/pa20_64/libdl.1
libm.2 => /lib/pa20_64/libm.2
libc.2 => /lib/pa20_64/libc.2
libcl.2 => /lib/pa20_64/libcl.2
libnetsnmp.sl.16 => /ideptestdb/app/app/AGENT/lib/libnetsnmp.sl.16
libc.2 => /lib/pa20_64/libc.2
libnetsnmpagent.sl.16 => /ideptestdb/app/app/AGENT/lib/libnetsnmpagent.sl.16
libnetsnmp.sl.16 => /ideptestdb/app/app/AGENT/lib/libnetsnmp.sl.16
libc.2 => /lib/pa20_64/libc.2
libnetsnmphelpers.sl.16 => /ideptestdb/app/app/AGENT/lib/libnetsnmphelpers.sl.16
libnetsnmpagent.sl.16 => /ideptestdb/app/app/AGENT/lib/libnetsnmpagent.sl.16
libnetsnmp.sl.16 => /ideptestdb/app/app/AGENT/lib/libnetsnmp.sl.16
libnm.sl => /lib/pa20_64/libnm.sl
libc.2 => /lib/pa20_64/libc.2
libc.2 => /usr/lib/pa20_64/libc.2
libm.2 => /usr/lib/pa20_64/libm.2
libdl.1 => /usr/lib/pa20_64/libdl.1
libxti.2 => /usr/lib/pa20_64/libxti.2
libdl.1 => /usr/lib/pa20_64/libdl.1
libdl.1 => /usr/lib/pa20_64/libdl.1
libdl.1 => /usr/lib/pa20_64/libdl.1

Can you tell me how to resolve it?
thanks!
10 REPLIES 10
Dennis Handly
Acclaimed Contributor

Re: ERROR:dlopen failed: Unsatisfied code symbol '__shlTerm'

>dlopen failed: Unsatisfied code symbol '__shlTerm' in load module libIdepNMP.sl.

You have an aC++ shlib but you seem to have a C application. You'll have to either relink your shlib or your application.

If you want to have aC++ plugins for C, you need to follow the directions here:
http://docs.hp.com/en/14672/Help/distributing.htm#linking

>A.03.50

This is very old. The latest version is A.03.90 (on 11.23 and 11.31).
dnboy
Occasional Advisor

Re: ERROR:dlopen failed: Unsatisfied code symbol '__shlTerm'

Theanks, Dennis Handly!
Yes, I have a C Program to call aC++ shlib, and this problem was resolved by your way, but another problem was occured.
dlopen failed: '/usr/lib/pa20_64/libpthread.1' contains a static TLS reference to '__thread_specific_seg' defined in a d
ynamically loaded library '/usr/lib/pa20_64/libpthread.1'. Use +tls=dynamic to re-compile '/usr/lib/pa20_64/libpthread.1
'


Dennis Handly
Acclaimed Contributor

Re: ERROR:dlopen failed: Unsatisfied code symbol '__shlTerm'

>but another problem was occurred.
>dlopen failed: '/usr/lib/pa20_64/libpthread.1' contains a static TLS reference

You'll have to link your C application with -mt.
You really shouldn't link your shlib with -lpthread, that belongs on the executable.
dnboy
Occasional Advisor

Re: ERROR:dlopen failed: Unsatisfied code symbol '__shlTerm'

tanks Dennis Handly!

this program can running, but a strange thing occured.
no matter where I send a request to this program, the program print the IP and port always 0.0.0.0:0

Received SNMP packet(s) from UDP: [0.0.0.0]->[0.0.0.0]:0
GETNEXT message
-- IDEPAGENT-MIB::csidep

Received 50 bytes from UDP: [0.0.0.0]->[0.0.0.0]:0
0000: 30 30 02 01 01 04 06 70 75 62 6C 69 63 A1 23 02 00.....public?.
0016: 04 0F 9F AF 44 02 01 00 02 01 00 30 15 30 13 06 ...├з ......0.0..
0032: 0F 2B 06 01 04 01 84 F8 68 02 67 02 02 01 01 01 .+.....├й┬┤ .g.....
0048: 05 00

Is there some process changed the IP and port?

thanks!
Dennis Handly
Acclaimed Contributor

Re: ERROR:dlopen failed: Unsatisfied code symbol '__shlTerm'

>the program print the IP and port always 0.0.0.0:0

Are you multithreaded when this happens?
dnboy
Occasional Advisor

Re: ERROR:dlopen failed: Unsatisfied code symbol '__shlTerm'

I don't know, It's a third tool(net-snmp), I
just develop some components on it. May be multi-threaded.
but the codes running OK on AIX.
Dennis Handly
Acclaimed Contributor

Re: ERROR:dlopen failed: Unsatisfied code symbol '__shlTerm'

> I don't know, It's a third tool(net-snmp), I just develop some components on it. May be multi-threaded.

Then you need to get out your debugger and find where those zeros come from.
dnboy
Occasional Advisor

Re: ERROR:dlopen failed: Unsatisfied code symbol '__shlTerm'

Thanks Dennis Handly!

The 'zero' error is net-snmp error, I search it on google, the result is net-snmp can't support 64bit for HP.

Tanks very much!

Best Regards!
Dennis Handly
Acclaimed Contributor

Re: ERROR:dlopen failed: Unsatisfied code symbol '__shlTerm'

>Tanks very much!

If you are happy with the answers you were given, please read the following on how to assign points:
http://forums.itrc.hp.com/service/forums/helptips.do?#33