Operating System - HP-UX
1854700 Members
7964 Online
104102 Solutions
New Discussion

porting code from HP-UX 10.20 to HP-UX 11.00

 
Haribaskar
Occasional Advisor

porting code from HP-UX 10.20 to HP-UX 11.00

I have mysoftware running HP-UX 10.20.
Now I have to port that to HP-UX 11.00

When I compiled the code using( aCC C.03.30) in HP-UX 11.00, I got the following kind of warnings


Warning 7004: Exact position unknown; near ["/usr/include/sys/_inttypes.h", line 58]. # Debug information may be corrupt: 2 unresolvable reference s (7004)


When I tried to run the executable created , I got the following error.

aCC runtime: ERROR: Unexpected use of shared libraries
aCC runtime: ERROR: Read aCC manpage, +A option
/usr/lib/libnss_dns.1
Abort(coredump)

Please suggest to solve this problem








5 REPLIES 5
Steven Gillard_2
Honored Contributor

Re: porting code from HP-UX 10.20 to HP-UX 11.00

Firstly, I suggest you take a look at the 11.x STK (if you haven't already). It contains detailed information on transitioning your software from HPUX 10 -> 11. See http://devresource.hp.com/STK/howto.html

The warning on corrupt debug information can be ignored, although it may indicate a potential problem if you try to debug your code with gdb. I've seen this error on some of our code but its never caused any problems. I will get around to logging a call on it one day.

The other error you're getting regarding the "unexpected use of shared library" is probably because you're using gethostbyname() or a similar call while compiling with +A. These resolver calls use shl_load to load the libnss_*.sl libraries depending on your /etc/nsswitch.conf settings, therefore you cannot use +A. Try -Wl,-b,archive_shared instead.

For more information see the gethostbyname() man page or the HPUX 11.0 release notes in /usr/share/doc.

Regards,
Steve
Steven Gillard_2
Honored Contributor

Re: porting code from HP-UX 10.20 to HP-UX 11.00

OK its Monday. I meant:

-Wl,-a,archive_shared

Cheers,
Steve
Sanjay_6
Honored Contributor

Re: porting code from HP-UX 10.20 to HP-UX 11.00

Haribaskar
Occasional Advisor

Re: porting code from HP-UX 10.20 to HP-UX 11.00

Hi Steve,

Thanks for your suggestions. I compiled the code with
-Wl,aarchived_shared option. I got the same kind of warnings.
But I could run my software without any problems.
Could you please suggest me how to get rid of those warnings?
Please explain why the same kind of problem did not occur with Hp-UX 10.20.
Steven Gillard_2
Honored Contributor

Re: porting code from HP-UX 10.20 to HP-UX 11.00

No, I haven't worked out how to get rid of the "debug information may be corrupt" messages. I still get them on some of our code as well, but they haven't caused any noticable problems yet.

Try the latest aCC patches, and if that fails log a call with HP.

Regards,
Steve