Operating System - HP-UX
1834208 Members
2434 Online
110066 Solutions
New Discussion

Re: Invalid version for shared library: <lib_name>

 
Graham Van der vaart
Frequent Advisor

Invalid version for shared library: <lib_name>

Hi,
A few years ago (HP-UX 10.20) we created our own shared libraries (HP C/ANSI C).
We ported them to HP-UX11.00 no problem.

We later upgraded our development machine to HP-UX11.00 and HP CANSI C B.11.01.20)

I just recompiled/linked the shared libraries and found the libraries a little smaller (bytes) and when I run programs that use the libraries I got "Bad system id for shared library:" and it core dumps.
I ran file and it gave output to the effect that the library conformed to PA-RISC2.0
I added a couple of flags +z +DA1.0 +DS1.1 to the make file and I now get the following error,
"Invalid version for shared library: " and it still core dumps.
I ran file and it shows same output as old/good version of library.
What is my problem?
Regards
Graham
4 REPLIES 4
Ruediger Noack
Valued Contributor

Re: Invalid version for shared library: <lib_name>

Hi Graham,

some days ago we discussed a similar problem?
Is your box a PA-RISC1.1 ono? Then you have to compile your lib for this one.

Ruediger
Graham Van der vaart
Frequent Advisor

Re: Invalid version for shared library: <lib_name>

Hi Ruediger,

Is there any thing specific I need to know to be able to compile for this PA-RISC 1.1?
Flags etc.

Regards
Graham
Ruediger Noack
Valued Contributor

Re: Invalid version for shared library: <lib_name>

Sorry Graham,

I think so (compiler/precompiler option), but I don't know the details for this. It's not my daily job to do this.
But I'm sure you will find a prof here.
May be you will find something in your makefile.

Good luck
Ruediger
Christopher Caldwell
Honored Contributor

Re: Invalid version for shared library: <lib_name>

The following assumes HP's C/ANSI C compiler:

By default, the HP compiler will target for PA version of the machine it's on.

If you want to target for the least common denominator version of PA, use +DAportable cc option.

If you want to target for another PA RISC version, man cc will give you all of the different options. Look for DA.