Patch Name: PHCO_24689 Patch Description: s700_800 10.20 make(1) cumulative patch Creation Date: 01/11/06 Post Date: 01/11/12 Hardware Platforms - OS Releases: s700: 10.20 s800: 10.20 Products: N/A Filesets: OS-Core.UX-CORE Automatic Reboot?: No Status: General Release Critical: No Path Name: /hp-ux_patches/s700_800/10.X/PHCO_24689 Symptoms: PHCO_24689: 1. make(1) does not build the target correctly if the target name in the makefile starts with a dot and appears in multiple lines. 2. make(1) does not build the target correctly when target is a link to a non existing file. PHCO_18638: 1. PHCO_16923 make(1) coredumps running non-interpreter (#!) script. 2. make uses inference rule in the presence of an explicit rule. 3. make(1) dumps core for filenames having long suffixes. PHCO_16923: Make(1) output the error message "Too many exec arguments" if the number of arguments exceeds 500 PHCO_16371: make(1) gives error "line too long" if the number of characters for exec() arguments exceeds 20478. PHCO_14612: 10.x make(1) is much slower compared to 9.x make(1). PHCO_11760: make(1) silently fails to search the list of directories to search for prerequisites if VPATH is longer than MAXPATHLEN. PHCO_10836: 1. Performance of make(1) degrades drastically for very long VPATH. 2. 10.X make is much slower than 9.X make. 3. make does not see files built for previous prerequisites. 4. make can ignore the line following an "include" in Makefile. PHCO_8893: 1. make(1) does not use the SHELL variable to run the commands always. 2. make(1) does not rebuild libraries as mentioned in the man-pages. 3. Dynamic pre-requisite variables like $${@:.o=.c} does not work as expected. 4. make(1) does not support multiple conditional macros. 5. make(1) ignores the last command line if there is no non-white characters after the '\' character. Defect Description: PHCO_24689: 1. If the target starts with a dot and appears multiple times in the Makefile, make(1) has a problem to associate the target and the rule. Example 1: ---------- $cat makefile .SUFFIXES: hello: ./hello.o ./hello.o: hello.c cc -c hello.c ./hello.o: hello.h If we run make(1) on the above makefile after touching hello.c and hello.h, the following error is given: "/usr/ccs/bin/ld: Can't open hello.o" Example 2: ---------- $cat makefile acad: ../acad.o ../acad.o: cc -o acad ../acad.c ../acad.o: acad.h If we run make(1) on the above makefile after touching ../acad.c and acad.h, default rule is used instead of the rule mentioned in the makefile. Resolution: make(1) had problems to associate the target and the rule, when the target appears on multiple lines, and when the target starts with a dot. Now, make(1) is modified to associate the target and the rule appropriately and build the target correctly. 2. When the target is a symbolic link to a non-existing file, make(1) doesn't build the target. The following example will demonstrate the problem: 1. Create makefile with following contents a:a.o a.o:a.c 2. Create source file a.c with the following contents. void main() {} 3. Create dummy links ln -s aa.o a.o ln -s aa a 4.Run make(1) as below $ make a.o It gives the message "`a.o' is up to date" instead of building aa.o to which a.o is a symbolic link. Resolution: This defect is a side effect of fix for JAGab15897. The fix for JAGab15897 was using lstat that uses the timestamp of a symbolic link instead of the time of the file that it points to. Because of this, make(1) is coming out with the message "symbolic name" upto date, instead of building the object that the symbolic link is pointing to. make(1) is modified to build the object to which the symbolic link is pointing. PHCO_18638: 1. Make(1) dumps core when executing non-interpreter shell scripts within it i.e scripts without a #! in the beginning of the line. Resolution: Make(1) was trying to access a memory location which is not malloced(i.e beyond the malloced area). The operation *--argv = (unsigned char *) "sh" is illegal, because we are assigning "sh" to an address, which is not malloced. So some memory operation(free, in this case) on this address was causing a memory fault(core dump). Having a local buffer (localargv) with correct pointer initialization solves the problem. 2. There is a bug in make's handling of symbolic links. If the ".c" file is a symbolic link to a non-existent file, then make(1) stops with the following error message: Make: Don't know how to make x.c. Stop. Ex: Have a makefile as follows: x.o : z @echo "OK" z : cc -o -c x.o y.c then to reproduce the problem, do the following ln -s junk x.c make Make: Don't know how to make x.c. Stop. Resolution: Make(1) uses stat(2) to obtain the last modification time of a file. When the file is a symbolic link and the link points to a non-existent file, then stat returns an error. So using lstat will solve the problem. The lstat function detects symbolic links and returns information(modification time) about the symbolic link, not the file referenced by the symbolic link. 3. make(1) dumps core for filenames having long suffixes. PHCO_16923: Make(1) has the value of OUTARGVMAX hardcoded to 500. Thus, if the number of argments exceeded 500, an error occurred. PHCO_16371: make(1) uses the ARG_MAX constant defined in limit.h and this value(20478) has been hardcoded in the make code, as ARG_MAX is configurable make(1) now determines the value of ARG_MAX dynamically. PHCO_14612: 10.x make(1) used to make number of pathconf(2) calls. This is due to the fix for DSDe423658. Also make(1) used to make unnecessary access(2) calls to check the existence of the file. PHCO_11760: make(1) silently fails to search the list of directories to search for prerequisites if path set in VPATH holds longer than MAXPATHLEN. PHCO_10836: 1. Performance of make(1) degrades drastically for very long VPATH. 2. 10.X make is much slower than 9.X make. 3. make does not see files built for previous prerequisites. 4. make can ignore the line following an "include" in Makefile. PHCO_8893: 1. make(1) does not use the SHELL variable to run the commands always. 2. make(1) does not rebuild libraries as mentioned in the man-pages. 3. Dynamic pre-requisite variables like $${@:.o=.c} does not work as expected. 4. make(1) does not support multiple conditional macros. 5. make(1) ignores the last command line if there is no non-white characters after the '\' character. SR: 8606102118 8606183215 1653302935 1653303073 1653254441 1653279174 5003395251 5003345728 4701318378 1653197533 5003338079 1653177501 5003317768 1653189845 Patch Files: /usr/lib/nls/msg/C/make.cat /usr/ccs/bin/make what(1) Output: /usr/lib/nls/msg/C/make.cat: None /usr/ccs/bin/make: $Revision: 78.1.1.24 $ PATCH_10_20: main.o doname.o misc.o files.o rules.o dosys.o gram.o dyndep.o prtmem.o nl_strchr.o filehash.o hpux_rel.o 01/11/06 cksum(1) Output: 963206234 2129 /usr/lib/nls/msg/C/make.cat 50172333 81920 /usr/ccs/bin/make Patch Conflicts: None Patch Dependencies: None Hardware Dependencies: None Other Dependencies: None Supersedes: PHCO_8893 PHCO_10836 PHCO_11760 PHCO_14612 PHCO_16371 PHCO_16923 PHCO_18638 Equivalent Patches: PHCO_24688: s700: 11.00 s800: 11.00 Patch Package Size: 140 KBytes Installation Instructions: Please review all instructions and the Hewlett-Packard SupportLine User Guide or your Hewlett-Packard support terms and conditions for precautions, scope of license, restrictions, and, limitation of liability and warranties, before installing this patch. ------------------------------------------------------------ 1. Back up your system before installing a patch. 2. Login as root. 3. Copy the patch to the /tmp directory. 4. Move to the /tmp directory and unshar the patch: cd /tmp sh PHCO_24689 5a. For a standalone system, run swinstall to install the patch: swinstall -x autoreboot=true -x match_target=true \ -s /tmp/PHCO_24689.depot By default swinstall will archive the original software in /var/adm/sw/patch/PHCO_24689. If you do not wish to retain a copy of the original software, you can create an empty file named /var/adm/sw/patch/PATCH_NOSAVE. WARNING: If this file exists when a patch is installed, the patch cannot be deinstalled. Please be careful when using this feature. It is recommended that you move the PHCO_24689.text file to /var/adm/sw/patch for future reference. To put this patch on a magnetic tape and install from the tape drive, use the command: dd if=/tmp/PHCO_24689.depot of=/dev/rmt/0m bs=2k Special Installation Instructions: None