Showing results for 
Search instead for 
Do you mean 

Compiling problem

SOLVED
Go to Solution
Highlighted
Advisor

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
2 REPLIES
Acclaimed Contributor Acclaimed Contributor

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 Honored Contributor

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