Operating System - HP-UX
1833790 Members
2936 Online
110063 Solutions
New Discussion

Re: Error: /usr/lib/dld.sl: Can't open shared library: /usr/lib/libdld.2

 
SOLVED
Go to solution
Patricia_18
Occasional Contributor

Error: /usr/lib/dld.sl: Can't open shared library: /usr/lib/libdld.2

I'm trying to run a C++ program on a HP-UX 10.20. The program was compiled in a HP-UX 11.00 with a aCC A.03.13 compiler. The following error appears:
"/usr/lib/dld.sl: Can't open shared library: /usr/lib/libdld.2"
How can I solve this error in order to be able to run the program on the HP-UX 10.20 machine?
troi
5 REPLIES 5
Donald Kok
Respected Contributor

Re: Error: /usr/lib/dld.sl: Can't open shared library: /usr/lib/libdld.2

compile it on the 10.20 machine.
The .2 files belong to ux 11, and are not found on 10.20 systems.
My systems are 100% Murphy Compliant. Guaranteed!!!
Patricia_18
Occasional Contributor

Re: Error: /usr/lib/dld.sl: Can't open shared library: /usr/lib/libdld.2

That means that it not possible to transport a program between different HP-UX platforms?
troi
Steven Gillard_2
Honored Contributor
Solution

Re: Error: /usr/lib/dld.sl: Can't open shared library: /usr/lib/libdld.2

Not in that direction. Binaries compiled on earlier releases generally work on later releases of the OS without re-compilation (ie moving a 10.20 binary to 11.0 usually works). But binaries compiled on later releases cannot be moved back to earlier releases - this is not supported and as you've found out it just doesn't work.

The STK contains more information:

http://devresource.hp.com/STK/binarycompat.html

Regards,
Steve
Adam J Markiewicz
Trusted Contributor

Re: Error: /usr/lib/dld.sl: Can't open shared library: /usr/lib/libdld.2

>>
That means that it not possible to transport a program between different HP-UX platforms?
<<

Thew only good aswer is: It's not so obvious.
If your program is linked to use functions from dynamically linked libraries, that libraries have to be reachable in the moment you start your program.

Standard and system functions are in such libraries. When you make your program aCC is configured to produce native code by default. So, for HP-UX 11.00 it will use libraries from HP-UX 11.00. If they were not existing previously (or exist in too old version for current program) you'll get into trouble.

I guess that everythink from 10.20 will run on 11.00.
I also think that it should be possible to configure aCC on 11.00 to produce executables like they were compiled on 10.20.

But I've never done it myself.

Adam
I do everything perfectly, except from my mistakes
Patricia_18
Occasional Contributor

Re: Error: /usr/lib/dld.sl: Can't open shared library: /usr/lib/libdld.2

Thank you very much to all :)
troi