Bug 65161

Summary: Issues in parallel builds due to multiple targets rule in a makefile
Product: Apache httpd-2 Reporter: Borys Popławski <borysp>
Component: BuildAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: NEW ---    
Severity: normal    
Priority: P2    
Version: 2.4.46   
Target Milestone: ---   
Hardware: PC   
OS: Linux   

Description Borys Popławski 2021-02-26 22:53:42 UTC
Inside server/Makefile.in there is a rule:

util_expr_scan.c util_expr_parse.c util_expr_parse.h: util_expr_scan.l util_expr_parse.y

It generates those 3 files at once (in one run of the rule). This should be expressed as grouped targets (&:, available in Make 4.3 or later) or using intermediate target, so that make is aware that each run always generates all of these targets.
Currently, when we run a parallel build, this rule might be execute more than one time and, if such two runs happen at the same time, it might break the generated files.

There is a comment above this rule: "we really don't expect end users to use these targets!", so this might be the issue, as this rule is ran in a normal build.

I'm building the 2.4.46 version using:
./configure --prefix=$(abspath $(INSTALL_DIR)) --with-mpm=prefork --enable-mpms-shared='prefork worker event' --enable-ssl
make -j8