1827294 Members
1790 Online
109960 Solutions
New Discussion

Re: dld.sl, aCC

 
Ryan Twombly
Occasional Advisor

dld.sl, aCC

We just installed aCC for 11i and ChiliSoft. I have been attempting to build a demo program included in ChiliSoft using thier Makefile and keep getting the error when I try to run the executable :

/usr/lib/dld.sl: Can't open shared library: ../exe/libodbcinst.sl
/usr/lib/dld.sl: No such file or directory

It is true that /exe/libodbcinst.sl does not exist, and I wonder why. Also, I found a version of libodbcinst.sl and placed it in a newly created /usr/exe directory, but to no avail. Even after re-comiling I get the same message. Am I missing something here
7 REPLIES 7
harry d brown jr
Honored Contributor

Re: dld.sl, aCC

What are the permissions on the file?

live free or die
harry
Live Free or Die
Ryan Twombly
Occasional Advisor

Re: dld.sl, aCC

-rwxrwxrwx, and the same goes for the directory
harry d brown jr
Honored Contributor

Re: dld.sl, aCC

It must be looking for the file elsewhere and not under /usr/exe, could it be /usr/lib/exe? Where did you find the file, because you include the directory into your pathes.

live free or die
harry
Live Free or Die
Ryan Twombly
Occasional Advisor

Re: dld.sl, aCC

There's no /usr/lib/exe either. I found the file in ChiliSoft's package and simply copied it over there. Should I add /usr/exe to my paths I wonder?
harry d brown jr
Honored Contributor

Re: dld.sl, aCC

To your SHLIB and maybe your LDPATH variables.

live free or die
harry
Live Free or Die
Chris De Angelis
Frequent Advisor

Re: dld.sl, aCC

Ryan,

It sounds like you need to further explore the "path" that Harry is suggesting with "SHLIB" and/or "LDPATH". The dynamic loader (dld) has a certain algorithm to finding shared libraries, depending on the options given to the linker when the executable is built (and also depending on whether you're on a PA_RISC 1.x (32bit) processor or PA_RISC 2.0 (64bit)).

In general, I would first try setting the environment variable SHLIB_PATH to point to the absolute path that the shared library in question is located in ("/usr/exe", in this case):

export SHLIB_PATH=/usr/exe

Try running the exe again. You might find the "ldd" command to come in handy; try doing /usr/ccs/bin/ldd (exe-name). It will tell you what dynamic libraries are required by the executable and where those libraries will be found at run-time.

References:
- look at the man page for "dld.sl"
- If that doesn't tell you enough about the dynamic loader and shared libraries, check out "HP-UX Linker and Libraries User's Guide".
While it's probably on HP's website, it's probably right there on your system since aCC is installed. On my system it's at:

/usr/share/html/C/linker/linkhelp.html

It's a beastly document, but there's a wealth of information in there. The Table of Contents is at the end (in my copy at least) =)

Hope this helps -
- Chris
Ryan Twombly
Occasional Advisor

Re: dld.sl, aCC

Thanks for your help guys. I've found that the problem was, as usual, simpler than I was trying to make it. I was interpreting the error line (and the results of ldd) as refering to /usr/exe, a ../ from /usr/lib, where in fact it was refering to one step above the directory in which the executable was being run. Apparently the guys at Chili!Soft changed the location of the .sl in question from ../exe to ../lib, but a little copying fixed the problem...mostly. I'm still haveing unresolved symbols, but I suspect it's a different problem altogether. Thanks again