HP-UX HB v13.00 Ch-11 - Software Development

HP-UX Handbook Rev 13.00 Page 73 (of 101)
Chapter 11 Software Development
October 29, 2013
message and terminate the program. On PA-RISC it uses abort(3C) which causes a coredump
to be written.
A core file analysis is in such a case normally not required, because the error message should
explain what happened. But the core file is not totally useless, because the dld message does not
print the name of the program that had a problem. When running a shell script that starts several
programs, there is no easy way to tell which of the programs had the problem. To find out, do
$ file core
core: core file from 'a.out' - received SIGABRT
The output will tell you the program name.
Library Search Problems
/usr/lib/dld.sl: Can't open shared library: /mypath/libmylib.sl
/usr/lib/dld.sl: No such file or directory
The message says that the library libmylib.sl could not be found in any of the search paths
given to the dynamic loader. The path printed in the message is the default path for this library.
To fix this problem, make sure that the library exists on the system. There is no way making the
program work without it. Run chatr(1) on the program to find out which paths are searched by
dld.sl:
$ chatr a.out
a.out:
shared executable
shared library dynamic path search:
SHLIB_PATH disabled second
embedded path enabled first /somepath:/usr/lib
shared library list:
dynamic /mypath/libmylib.sl
dynamic /usr/lib/libc.2
:
In the above case the dynamic loader will search libmylib.sl in /somepath, /usr/lib
(embedded path) and then in the default location /mypath, so make sure the library exists in one
of these directories.
If the library does not exist on the system, the biggest problem here might be to find out where to
get this library from. The default location may give a hint. A default location of /usr/lib or
anything below that path indicates that this is an HP-UX library. If the path is something like
/opt/somepath/lib, it might belong to a product that installs in /opt/somepath, and maybe