Patch Name: PHCO_24688 Patch Description: s700_800 11.00 make(1) cumulative patch Creation Date: 01/10/20 Post Date: 01/11/05 Hardware Platforms - OS Releases: s700: 11.00 s800: 11.00 Products: N/A Filesets: OS-Core.UX-CORE,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP Automatic Reboot?: No Status: General Release Critical: No Category Tags: defect_repair general_release Path Name: /hp-ux_patches/s700_800/11.X/PHCO_24688 Symptoms: PHCO_24688: 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_18676: 1. PHCO_16923 make(1) coredumps running non-interpreter (#!) script. 2. make uses inference rule in the presence of an explict rule. 3. make(1) dumps core for filenames having long suffixes. 4. Make(1) output the error message "Too many exec arguments" if the number of arguments exceeds 500 5. make(1) fails to match inference rules. 6. make(1) gives error "line too long" if the number of characters for exec() arguments exceeds 20478. 7. 10.x make(1) is much slower compared to 9.x make(1). Defect Description: PHCO_24688: 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 cc hello.o -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_18676: 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 symblic 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 about the symbolic link. 3. make(1) dumps core for filenames having long suffixes. 4. Make(1) has the value of OUTARGVMAX hardcoded to 500. Thus, if the number of argments exceeded 500, an error occurred. 5. make(1) fails to build the target if *.c files were created dynamically. 6. 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. 7. 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. SR: 8606102118 8606183215 1653302935 1653303073 1653254441 1653279174 5003395251 4701385419 Patch Files: OS-Core.UX-CORE,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: /usr/lib/nls/msg/C/make.cat /usr/ccs/bin/make what(1) Output: OS-Core.UX-CORE,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: /usr/lib/nls/msg/C/make.cat: None OS-Core.UX-CORE,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: /usr/ccs/bin/make: $Revision: 82.20.1.15 $ PATCH_11_00: main.o doname.o misc.o files.o rules.o dosys.o gram.o dyndep.o prtmem.o nl_strchr.o filehash.o parallel.o hpux_rel.o 01/10/20 cksum(1) Output: OS-Core.UX-CORE,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: 554470782 2416 /usr/lib/nls/msg/C/make.cat OS-Core.UX-CORE,fr=B.11.00,fa=HP-UX_B.11.00_32/64,v=HP: 263757543 94208 /usr/ccs/bin/make Patch Conflicts: None Patch Dependencies: None Hardware Dependencies: None Other Dependencies: None Supersedes: PHCO_18676 Equivalent Patches: PHCO_24689: s700: 10.20 s800: 10.20 Patch Package Size: 120 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_24688 5. Run swinstall to install the patch: swinstall -x autoreboot=true -x patch_match_target=true \ -s /tmp/PHCO_24688.depot By default swinstall will archive the original software in /var/adm/sw/save/PHCO_24688. If you do not wish to retain a copy of the original software, use the patch_save_files option: swinstall -x autoreboot=true -x patch_match_target=true \ -x patch_save_files=false -s /tmp/PHCO_24688.depot WARNING: If patch_save_files is false when a patch is installed, the patch cannot be deinstalled. Please be careful when using this feature. For future reference, the contents of the PHCO_24688.text file is available in the product readme: swlist -l product -a readme -d @ /tmp/PHCO_24688.depot To put this patch on a magnetic tape and install from the tape drive, use the command: dd if=/tmp/PHCO_24688.depot of=/dev/rmt/0m bs=2k Special Installation Instructions: None