Operating System - HP-UX
1753865 Members
7293 Online
108809 Solutions
New Discussion юеВ

I have a shared library "library.so", how can i find out how this particular library was built ?

 
SOLVED
Go to solution
Syed Madar J S
Frequent Advisor

I have a shared library "library.so", how can i find out how this particular library was built ?

What were the CFLAGS or other parameters used for building this library ? and the version of the compiler, etc .
8 REPLIES 8
Dennis Handly
Acclaimed Contributor

Re: I have a shared library "library.so", how can i find out how this particular library was built ?

Why do you care?
You could use footprints(1) for HP's compilers.
Syed Madar J S
Frequent Advisor

Re: I have a shared library "library.so", how can i find out how this particular library was built ?

Thanks Dennis,

We wanted to find the difference between the library we built locally and the one that was built in the HP-Connect.

As the one we use from Connect has a different behavior. So we are just checking if there is any way to triage this issue
Dennis Handly
Acclaimed Contributor

Re: I have a shared library "library.so", how can i find out how this particular library was built ?

>As the one we use from Connect has a different behavior.

Which one works? ;-) What library?
Are you using HP's compilers?
Syed Madar J S
Frequent Advisor

Re: I have a shared library "library.so", how can i find out how this particular library was built ?

Hi Dennis,

Thanks for the follow-up :)

The library built from connect works!

It is the "libexpat" library, Yes we are using the HP Compiler - HP C/aC++ v6.20 to build the libexpat from the downloaded source from connect.
mobidyc
Trusted Contributor

Re: I have a shared library "library.so", how can i find out how this particular library was built ?

Hi,

if you want to know how is built libexpat from the connect site.
why don't take a look at the installation document from it ?

http://hpux.connect.org.uk/hppd/cgi-bin/wwwtar?/hpux/Development/Tools/expat-2.0.1/expat-2.0.1-src-11.11.tar.gz+expat-2.0.1/HPUX.Install+text

All compilation steps are documented.

Regards,
Cedrick Gaillard
Best regards, Cedrick Gaillard
Andre-Marcel Hellmund
Frequent Advisor
Solution

Re: I have a shared library "library.so", how can i find out how this particular library was built ?

Hey,

beside the footprints tools, you could also use the elfdump(1) command to display the compilation unit directory (in the .notes section).

/usr/ccs/bin/elfdump -dc

A sample output:

A.06.17 [Mar 4 2008] [Build N/A *E001*]
ecom options = -target_os 11.22 -ext on -lang c,c99 [...]

Unfortunately, the compilation directory only lists the ecom options, not the options given to the compiler driver aCC/cc. But nevertheless it might be helpful, at least for the compiler version used during compilation.

Dennis Handly
Acclaimed Contributor

Re: I have a shared library "library.so", how can i find out how this particular library was built ?

>HP C/aC++ A.06.20 to build the libexpat from the downloaded source from connect.

You could try dropping the opt level to +O1.
The latest patch is A.06.22, with A.06.23 coming out next month.
Syed Madar J S
Frequent Advisor

Re: I have a shared library "library.so", how can i find out how this particular library was built ?

Hi,

Thanks for the suggestions and pointers, and since i was building the "libexpat" to be used by perl for module XML::Parser, i had to use the same flags as used for building perl.

I have the issue resolved.

Thanks All.