Compiling problem (197 Views)
Reply
Advisor
Andre Ford
Posts: 30
Registered: ‎08-22-2001
Message 1 of 3 (197 Views)
Accepted Solution

Compiling problem

I'm looking to see what (if anything) can be done to solve a compiling problem we are experiencing here. A couple of our programmers are compiling a locally written application on our HP-UX 9000 running 10.20. Once compiled, the executable is taken to a computer running HP-UX 10.10 but it won't run. The error that we are receiving says "library version error:libc.1". What I need to know is if/how this program can be compiled on a HP-UX 10.20 system and taken to a HP-UX 10.10 environment for execution. Can the appropriate ;ibrary file be moved in one direction or another? Or must the library files be installed. I'm still getting the hang of Unix so any help is appreciated. Thanks!

Andre
Acclaimed Contributor
A. Clay Stephenson
Posts: 17,825
Registered: ‎07-16-1998
Message 2 of 3 (197 Views)

Re: Compiling problem

Hi Andre:

It's almost always a problem trying to get a programrun on an earlier OS release. Your best bet is to statically link you code (i.e. use the .a libraries) so that no shared libraies are used on the target box. Your code files will be bigger but it should execute.

If it ain't broke, I can fix that.
Honored Contributor
Santosh Nair_1
Posts: 1,020
Registered: ‎07-18-2000
Message 3 of 3 (197 Views)

Re: Compiling problem

Andre,

What you're asking is almost impossible. The two OS's have differing versions of libc. 10.20 has versions of the 10.10 library for compatibility purposes, but you're trying to go the other way.

I would say your best bet would be to compile on the older OS so that your application would run on both OSes. Alternatively, you could try building your binary strictly with static, i.e. archive, libraries and avoid using any shared libs.

Hope this helps.

-Santosh
Life is what's happening while you're busy making other plans
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.