Bug #3196
ao_gendisp use by make is racey
Added by Rich Lowe over 8 years ago.
Updated almost 8 years ago.
Category:
tools - gate/build tools
Description
We build ao_gendisp once, but then use it from other makefiles in a way that is apparently racely.
We've caught it at least twice, now, were the script is executed before it is executable.
It should probably be built by the consuming makefiles, so that they may depend on it more correctly.
I saw this in my build log:
/usr/bin/rm -f ../../i86pc/cpu/scripts/ao_gendisp;
/usr/bin/sed -e "s@TEXT_DOMAIN@\\"\\"@" ../../i86pc/cpu/scripts/ao_gendisp.pl > ../../i86pc/cpu/scripts/ao_gendisp;
/usr/bin/chmod +x ../../i86pc/cpu/scripts/ao_gendisp
../../i86pc/cpu/scripts/ao_gendisp ../../i86pc/cpu/amd_opteron/ao_mca_disp.in >debug64/ao_mca_disp.c
sh: line 1: ../../i86pc/cpu/scripts/ao_gendisp: cannot execute [Permission denied]
Root Cause:
The root cause seems to be that the usr/src/uts/Makefile runs all intel related architectures in parallel:
38 i386_ARCHITECTURES = i86pc i86xpv intel
39
40 #
41 # For i386 all architectures can be compiled in parallel.
42 #
43 # intel/Makefile knows how to build prerequisites needed for parallel build.
44 #
45 i386_PREREQ = intel
46 i386_PARALLEL = $(i386_ARCHITECTURES)
47
48 #
49 # For sparc all architectures can be compiled in parallel.
50 #
51 # sun4/Makefile knows how to build prerequisites needed for parallel build.
52 # can start.
53 #
54 sparc_PREREQ = sun4
55 sparc_PARALLEL = $(sparc_ARCHITECTURES)
56
57 #
58 # Platforms defined in $(MACH)_PARALLEL are built in parallel. DUMMY is placed
59 # at the end in case $(MACH)_PARALLEL is empty to prevent everything going in
60 # parallel.
61 #
62 .PARALLEL: $($(MACH)_PARALLEL) DUMMY
The ao_gendisp is built here:
usr/src/uts/i86pc/cpu/scripts/Makefile
but it is used here:
usr/src/uts/i86xpv/amd_opteron/Makefile
usr/src/uts/i86pc/amd_opteron/Makefile
so there is a chance that the i86xpv will need the ao_gendisp before it was properly built in the i86pc.
- Category set to tools - gate/build tools
- Assignee set to Marcel Telka
- Status changed from New to Pending RTI
- Status changed from Pending RTI to Resolved
Also available in: Atom
PDF