Bug 63942 - Regeneration of util_expr parser is not parallel-make safe
Summary: Regeneration of util_expr parser is not parallel-make safe
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Build (show other bugs)
Version: 2.5-HEAD
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
Depends on:
Reported: 2019-11-20 09:02 UTC by Joe Orton
Modified: 2019-11-20 10:37 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Joe Orton 2019-11-20 09:02:04 UTC
Found from a travis build failure -


The rules to regenerate util_expr_scan.c util_expr_parse.c util_expr_parse.h from util_expr_parse.y are not parallel-safe since "make -j2" will potentially run the rule multiple times in parallel, and the rule uses the outputs as intermediate files which are modified in-place.

This could potentially be fixed by using unique filenames per invocation (e.g. with mktemp or similar) though since these files are almost never regenerated it is possibly not worth the effort.
Comment 1 Joe Orton 2019-11-20 10:37:09 UTC
To repro, e.g.

 $ cd server
 $ rm -f util_expr_parse.[ch] util_expr_scan.c
 $ make -j2

if the build works you're lucky, but you'll see bison, flex etc are invoked twice.