Re: HPUX-pa libCsup.2 problem (263 Views)
Reply
Occasional Advisor
Fei Shen
Posts: 6
Registered: ‎09-21-2006
Message 1 of 12 (263 Views)

HPUX-pa libCsup.2 problem

Hi,
I HPUX-pa software developer with NCR. Currently we are having an issue with unresolved symbol in our 64bit library during run time. The unresolved symbol is __ShlTerm. The truss ouput shows that
/usr/lib/pa20_64/libCsup.2 is opened and mapped, and nm shows that __shlTerm is defined there.
Then these facts are true, what could be other factors causing __shlTerm not resolved?

Thanks.

fs185009@ncr.com
Please use plain text.
Acclaimed Contributor
Dennis Handly
Posts: 24,705
Registered: ‎03-06-2006
Message 2 of 12 (263 Views)

Re: HP-UX PA libCsup.2 problem

[ Edited ]

__shlTerm (not __ShlTerm) is exported from libCsup.2 so you should not be getting this unsat, provided you include libCsup.2 on your link line. Were there any other errors?

Please use plain text.
Occasional Advisor
Fei Shen
Posts: 6
Registered: ‎09-21-2006
Message 3 of 12 (263 Views)

Re: HPUX-pa libCsup.2 problem

the library built by aC++, there is no need to supply -lCsup. The same library works on other sysetem correctly resolving the symbol.
Please use plain text.
Acclaimed Contributor
Dennis Handly
Posts: 24,705
Registered: ‎03-06-2006
Message 4 of 12 (263 Views)

Re: HP-UX PA libCsup.2 problem

[ Edited ]

>the library built by aC++, there is no need to supply -lCsup.

This is only correct if you have a aC++ executable.

Please use plain text.
Occasional Advisor
Fei Shen
Posts: 6
Registered: ‎09-21-2006
Message 5 of 12 (263 Views)

Re: HPUX-pa libCsup.2 problem

the linking was ok, because library did get built. The problematic system also has a libCsup.2 in /usr/lib/pa20_64, which has __shlTerm defined. Truss shows that libCsup.2 was mmap'ed. But our library complained that __shlTerm not resolved.
Please use plain text.
Acclaimed Contributor
Dennis Handly
Posts: 24,705
Registered: ‎03-06-2006
Message 6 of 12 (263 Views)

Re: HP-UX PA libCsup.2 problem

[ Edited ]

>the linking was ok, because library did get built.

Since you don't usually get unsat errors when building shlibs, this is meaningless.

Can you explain when you are getting the error? At load or runtime? The latter means shl_load or dlopen.
And what do the errors look like? And what linker patch do you have?

Please use plain text.
Occasional Advisor
Fei Shen
Posts: 6
Registered: ‎09-21-2006
Message 7 of 12 (263 Views)

Re: HPUX-pa libCsup.2 problem

when dlopen library A which uses the __shlTerm, dlopen failed

dlopen failed: Unsatisfied data symbol '__shlTerm' in load module A
Please use plain text.
Acclaimed Contributor
Dennis Handly
Posts: 24,705
Registered: ‎03-06-2006
Message 8 of 12 (263 Views)

Re: HP-UX PA libCsup.2 problem

[ Edited ]

>when dlopen library A which uses the __shlTerm, dlopen failed

Now you need to answer the question implied by:    This is only correct if you have a aC++ executable.

And what are your dlopen parms?

If this is a C executable, you need to follow the directions on:
http://www.docs.hp.com/en/7762/5991-4874/distributing.htm#linking

Please use plain text.
Occasional Advisor
Fei Shen
Posts: 6
Registered: ‎09-21-2006
Message 9 of 12 (263 Views)

Re: HPUX-pa libCsup.2 problem

Thanks.

Did you mean if there is aC++ executables on the system that builds the library or the runtime system?

The build system does have aCC executables and we use aCC to do the linking.

For the runtime system, I dont know if there is a aCC or aC++.

Please use plain text.
Acclaimed Contributor
Dennis Handly
Posts: 24,705
Registered: ‎03-06-2006
Message 10 of 12 (263 Views)

Re: HP-UX PA libCsup.2 problem

[ Edited ]

>Did you mean if there is aC++ executables

No. I meant what type of application is doing the dlopen. Is it C or aC++?
(Also, what linker patch do you have installed?)

Please use plain text.
Occasional Advisor
Fei Shen
Posts: 6
Registered: ‎09-21-2006
Message 11 of 12 (263 Views)

Re: HPUX-pa libCsup.2 problem

The call sequence is as follows
customer application calls our C library and the C library dlopen the C++ library. The C++ library uses __shlTerm.

Our C library is built with -lCsup by cc. C++ library is built by aCC without -lCsup.

Now sure what customer application is written in.

The dlopen param is

dlopen(C++ library name, RTLD_GLOBAL | RTLD_LAZY);

Not sure about the patch level of aCC, how do I find out?



Please use plain text.
Acclaimed Contributor
Dennis Handly
Posts: 24,705
Registered: ‎03-06-2006
Message 12 of 12 (263 Views)

Re: HP-UX PA libCsup.2 problem

[ Edited ]

>customer application calls our C library and the C library dlopen the C++ library. Our C library is built with -lCsup by cc. C++ library is built by aCC without -lCsup.

While this is not what we recommend, it should work.

>Now sure what customer application is written in.

It probably doesn't matter if your lib has libCsup. Do you also have libstream and libstd on your lib?

>Not sure about the patch level of aCC, how do I find out?

I was asking about linker versions.

To find the patch, you need to use swlist:
/usr/sbin/swlist -l product | fgrep -i -e aC++ -e linker

A what(1) on the shlibs would also give you a version.

Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation