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

HP-UX Handbook Rev 13.00 Page 71 (of 101)
Chapter 11 Software Development
October 29, 2013
Compiler/Linker Aborts
Besides the problems described above, which are typically user errors, it also can happen that a
compilation/link aborts because of internal errors.
Compilers as well as the linker can abort if there is not enough memory available to build the
program. Possible error messages that indicate such a problem are:
Error 8203: Exact position unknown; near ["/usr/include/errno.h", line
32]. #
memory exhausted at 966636 Kbytes; try increasing swap space or the
maxdsiz kernel parameter (8203)
cc: error 1405: "/usr/ccs/bin/ld" terminated abnormally with signal 10.
While the first message from aCC is very precise about the cause, the latter doesn't really say
what's wrong. It could be a memory problem but also an internal linker problem. To verify that
lack of memory is really the problem, you could start compiling/linking, watch the size of the
processes with top(1) and compare it to the setting of maxdsiz and to the output of swapinfo -
t.
The solution to out of memory problems is to provide more memory by increasing maxdsiz
and/or adding swap space.
Internal errors of compilers or the linker will lead to aborts of the build process. Often they
receive a signal due to an illegal operation. The compilers typically print a message like
"compiler internal error", possibly print a stacktrace, print the signal that was received, and
abort. Sometimes they leave a core file.
In case of a linker abort, check all linker input files (objects and libraries) with odump -
verifyall (or elfdump(1) on IA64 and 64-bit PA-RISC) to find out if one of them is corrupt,
and if so, recompile the defective files.
Otherwise check if the latest version of the compiler/linker is already installed. If not, upgrade it.
If yes, check the internal knowledge databases for known problems, contact the languages
WTEC [7] to find workarounds and/or to have them submit a new defect report. Try to get a
small test case that reproduces the problem, to provide to the labs.
In case of a C/C++ compiler abort, alternatively to a test case, ask the programmer for the
preprocessed output file of his sources. There is a good chance to reproduce the problem with the
.i file.