Bug 65161 - Issues in parallel builds due to multiple targets rule in a makefile
Summary: Issues in parallel builds due to multiple targets rule in a makefile
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Build (show other bugs)
Version: 2.4.46
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-26 22:53 UTC by Borys Popławski
Modified: 2021-02-26 22:53 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
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