Operating System - HP-UX
1827294 Members
2302 Online
109717 Solutions
New Discussion

List symbols in a library file

 
SOLVED
Go to solution
Dave Johnson_1
Super Advisor

List symbols in a library file

My DBA is having a problem linking an Oracle module. We are getting the message of many symbols not satisfied. I would like to be able to list out the symbols in the file /opt/aCC/lib/lib++.a to see if that is where they are. Once I figure out where these are, we can work to get the Oracle linker to include that library on it command line.
FYI: some of the symbols we need are: cout, streambuf, ostream, istream, exception, and a few others.
20 REPLIES 20
Steven E. Protter
Exalted Contributor

Re: List symbols in a library file

Shalom,

If you could provide the command line being used and the error message, someone might recognize the problem and give you a fix.

These issues are sometimes as simple as setting the right shared library path.

If you insist on seeing the symbols provided, you might be better off checking the documentation for the library versus running OS commands like strings on the libraries.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
James R. Ferguson
Acclaimed Contributor

Re: List symbols in a library file

Hi Dave:

Have a look with 'nm(1)':

http://docs.hp.com/en/B2355-60130/nm.1.html

Regards!

...JRF...
Dave Johnson_1
Super Advisor

Re: List symbols in a library file

The attached file is from the adrelink.lsv log file.
Dave Johnson_1
Super Advisor

Re: List symbols in a library file

Ping this back to the head of the list. Any ideas anyone?
Steven E. Protter
Exalted Contributor

Re: List symbols in a library file

Shalom,

Not much to learn:

Ideas:
1) Bad code. Does it compile on other systems?
2) Bad environment. Check PATH SHLIB_PATH variables do not pick up the wrong libraries.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Dennis Handly
Acclaimed Contributor

Re: List symbols in a library file

>We are getting the message of many symbols not satisfied.

What are some of the symbols?
Is this for Integrity?

I would like to be able to list out the symbols in the file /opt/aCC/lib/lib++.a to see if that is where they are.

You should NOT be using the obsolete USL Standard Components! It was recommended when porting from cfront to aC++ to stop using it.

>some of the symbols we need are: cout, streambuf, ostream, istream, exception

These are in the -AP shlibs, you shouldn't be using them on Integrity. If you link with aCC, you automatically get them. They are in libstream. You should not be using any other driver to link aC++ applications.

For your original question, to scan libs you can do:
nm -pxAN libs... | grep -e sym1 -e sym2

For tricky PA32 shlibs:
odump -slexport libs... | grep -e sym1 -e sym2

For other shlibs:
elfdump -n .dynsym -s libs... | grep -e sym1 -e sym2

>The attached file is from the adrelink.lsv log file.

Can you add -v to the aCC options. What does "whence aCC" show?

>SEP: 1) Bad code. Does it compile on other systems?

This cfront code is likely to be HP-UX specific.

>2) Check PATH SHLIB_PATH variables do not pick up the wrong libraries.

This is not the right variable for linking.
Dave Johnson_1
Super Advisor

Re: List symbols in a library file

The 2 servers I am working on are PA-RISC running HP-UX 11.11.
We are not writing any code here, just relinking/compiling Oracle shipped standard modules. I had initially used B9007AAEVAL B.11.11.20.EV HP C/aC++ Developer's Bundle for Evaluation License. Oracle told us as long as we do not write code here and try to use the compiler, it is legal to leave this installed so we have access to the linker.
I later found out HP had created a linker only bundle HP-ACC-Link B.11.11.18 HP aCC_Link Bundle, which I had to find on a release CD. The DBA is getting the same unsatisfied symbol error no matter which one we have installed on either rp3440 server.
I am looking for what I can tell the DBA to do differently in his config files so the appropriate library gets included in the link phase so these things can be found.
Oracle has been very little help with this. They most recently asked for the value of maxdsiz and maxssiz system parameters. Like that could have any effect on resolving symbols during the link phase.
The real frustrating part of this is, I had installed the eval package in January, and the DBA was able to link the modules for one of our development instances. I then removed it as it is eval and having found the linker bundle. We are just now getting around to testing the linker bundle, now neither one allows them to link the modules.
Please keep the questions/suggestions coming.
Thanks,
-Dave
Dennis Handly
Acclaimed Contributor

Re: List symbols in a library file

>just relinking/compiling Oracle shipped standard modules.

What product?

>I later found out HP had created a linker only bundle HP-ACC-Link aCC_Link Bundle

Yes, I developed it.

>The DBA is getting the same unsatisfied symbol error no matter which one we have installed on either rp3440 server.

As I asked above, can you add -v to the link line and provide the output.
One strange thing about your output, some symbols are demangled correctly and others aren't??

>so the appropriate library gets included in the link phase so these things can be found.

I need to see the existing link line with the cats evaluated.

>I then removed it as it is eval and having found the linker bundle.

You will have to replace that "aCC" by aCC_link.
Dave Johnson_1
Super Advisor

Re: List symbols in a library file

Dennis,
I will be uninstalling the eval compiler then reinstall the link bundle and have the DBA give it a try with the -v option on the command line, then update this with the result.
Thanks,
-Dave
Dennis Handly
Acclaimed Contributor

Re: List symbols in a library file

>have the DBA give it a try with the -v option on the command line

If it is faster you can try adding -v to what you already have.

Is this related to your previous thread?
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1405270
Dave Johnson_1
Super Advisor

Re: List symbols in a library file

Yes this thread is the same topic and problem as the one you listed.
The DBA is rather busy getting ready for an upgrade in production this weekend. He might not be able to test the linker until next week. I will update this thread with news when I have some.
Thanks,
-Dave
Dave Johnson_1
Super Advisor

Re: List symbols in a library file

The DBA had some time to try this out. Here is an excerpt from adrelink.lsv after the run.
Dennis Handly
Acclaimed Contributor

Re: List symbols in a library file

>Here is an excerpt from adrelink.lsv after the run.

As I suspected from the bogus demangling. You have somehow illegally defined aCC to be g++.

You need to hunt down and remove all symlinks (or aliases?) with aCC:
whence aCC

If you need a symlink, it should be to aCC_link.
Dave Johnson_1
Super Advisor

Re: List symbols in a library file

Illegally??? Really????
I removed the link to gcc and replaced it with a link to aCC_link as requested. The DBA ran the link again and it worked just fine. It would appear to have fixed the problem.
Thanks,
-Dave
Dave Johnson_1
Super Advisor

Re: List symbols in a library file

Dennis,
I am planning to apply patches to a IA-64 server running 11.23. Oracle has spec'd patches to the C compiler. I assume that they really mean the linker just like above. Can you tell me what the patch number is for the run time for 11.23 on IA-64?
Dennis Handly
Acclaimed Contributor

Re: List symbols in a library file

>Oracle has spec'd patches to the C compiler. I assume that they really mean the linker just like above. Can you tell me what the patch number is for the runtime for 11.23 on IA-64?

I doubt it is for the runtime. They quite often ask you to install patches to non-existent C compiler versions or old versions.

For a list of aC++ 11.23 patches, you can look here:
http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801/?ciid=8b080f1bace021100f1bace02110275d6e10RCRD#b11.23
Dave Johnson_1
Super Advisor

Re: List symbols in a library file

We do not have any C compiler other than the one that comes with every UNIX install. We needed to link some of the apps and Oracle told us to install the full C compiler (the trial and just not uninstall it when we were done. You provided the patch for aCC_link that resolved the linking issues for us.
Once again they are telling us for the DB upgrade we need to patch our C compiler, but we do not have one. I assume there is an aCC_link patch that will give us what we need when we install the upgrade. We do not have any need for the C compiler other than the Oracle install process.
We have not tried the install yet, I am trying to be proactive on this.
James R. Ferguson
Acclaimed Contributor
Solution

Re: List symbols in a library file

Hi Dave:

I think you want the 'HP-ACC-Link' bundle which should be available on the Application DVD. This obviates the need (stated by Oracle) for a full, aCC compiler ($).

Regards!

...JRF...
Dave Johnson_1
Super Advisor

Re: List symbols in a library file

That is exactly what I was looking for. It happened to be on DVD #2 of 2, or part number 5013-8853, HP-UX 11i V2 Application Software September 2008.
Many thanks to Dennis and James,
-Dave
Dennis Handly
Acclaimed Contributor

Re: List symbols in a library file

>We needed to link some of the apps and Oracle told us to install the full C compiler (the trial and just not uninstall it when we were done.

You shouldn't need the full C compiler to install.

>Once again they are telling us for the DB upgrade we need to patch our C compiler, but we do not have one.

That's why you ignore that advice.

>I assume there is an aCC_link patch that will give us what we need when we install the upgrade.

This will only help if installing E Business Apps.