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

HP-UX Handbook Rev 13.00 Page 68 (of 101)
Chapter 11 Software Development
October 29, 2013
In the makefile "xxx" was specified as a dependent, but neither does the file exist nor was there a
rule to build it. The writer of the makefile must check if this file is really needed to build the
targets. If not, remove the file from your dependents. If yes, get a copy for make(1) to find or
find out how to create it and add a rule to the makefile to create it.
PA2.0 Warning
/usr/ccs/bin/ld: (Warning) At least one PA 2.0 object file (x.o) was
detected. The linked output may not run on a PA 1.x system.
This is a warning issued by older linker versions. It says that the linker has built an executable
for PA2.0 (PA8000) CPU's which cannot be run on old PA1.1 (PA7000) systems. Trying to
execute such a program on a PA1.1 system will result in an error message.
This message usually occurs when building on PA2.0 systems, because the compilers check the
hardware to determine what code to generate. Generating PA2.0 programs is the default on such
systems. To create portable code that can also be run on PA1.1 systems, the compiler option
+DAportable must be used for ALL objects loaded into the executable.
PA1.1 systems have become rare these days, so most of the time this warning can safely be
ignored.
Unsatisfied Symbols
On PA:
/usr/ccs/bin/ld: Unsatisfied symbols:
a (first referenced in x.o) (code)
b (first referenced in x.o) (data)
On IA:
/usr/ccs/bin/ld -o a.out -u___exit umain -x.o -lc
ld: Unsatisfied symbol "a" in file x.o
ld: Unsatisfied symbol "b" in file x.o
2 errors.
The linker reports that it found references to one or more symbols, but the symbols could not be
found in any of the objects and libraries. The linker will create the binary file, but will not give
execute permissions to it because the symbol table is incomplete.
In the above case there was a reference to symbol a, type code, which means it is a function, and
there was a reference to symbol b, type data, which means it must be a global variable. And we
see that both symbols were referenced within the object x.o.
Unsatisfied symbol problems can have multiple reasons, and their resolution can become very
tricky: