|Anonymous | Login | Signup for a new account||2019-02-24 06:52 CET|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0006729||OCaml||configure and build/install||public||2014-12-21 19:29||2016-12-07 11:47|
|Target Version||Fixed in Version||4.02.2+dev / +rc1|
|Summary||0006729: Remove race conditions in parallel builds|
|Description||There are a few annoying race conditions that break builds with high -j values.|
|Tags||No tags attached.|
|Attached Files||no-suffixes.patch [^] (3,339 bytes) 2014-12-22 18:12 [Show Content]|
Reminder sent to: gasche
@gasche: One of the race conditions is present in interaction between make's built-in functionality that removes intermediate files referred to by .SUFFIXES: and explicit rm's. I rewrote the rules and now `make -C byterun -j1000` always finishes successfully. Ditto for asmrun.
There are still more races in world, though.
|Maybe we could apply the same treatment to the Makefile.nt (which is run under Windows) to avoid divergence? byerun/Makefile.nt does not have pic rules, but asmrun/Makefile.nt has some suffix rules left.|
|I've updated the patch.|
FTR, it's not only for race condition, but it will also make my life easier when debugging the runtime.
But: could you minimise the patch? This does three things:
1. change the build instructions to remove the race conditions
2. change the rule style from ".c.o:" to "%.o : %.c"
3. reorder some rules in asmrun/Makefile
I think (3) is really not needed, and I'd be more comfortable with the patch if it didn't do (2) at the same time, unless (1) somehow depends on it.
|It does. The automatic removal performed by make is linked to the suffix being in the .SUFFIXES: list.|
|On the other hand, the gmake documentation describes suffix rules as obsolete ( https://www.gnu.org/software/make/manual/html_node/Suffix-Rules.html [^] ) and advises to replace them with pattern rules. As someone that doesn't know much about make, I find pattern rules much easier to read (I would never figure what ".s.p.o:" means).|
Patch altered to not reorder rules in asmrun/Makefile.
@gasche: I've also removed the only other instance of .SUFFIXES: used to build C files. The build system also has widespread use of .SUFFIXES: to build ML files, but fixing that would be a part of much larger refactoring effort.
|Merged in trunk and 4.02.|
|2014-12-21 19:29||whitequark||New Issue|
|2014-12-21 19:29||whitequark||File Added: no-suffixes.patch|
|2014-12-21 19:32||whitequark||Note Added: 0012922|
|2014-12-21 22:36||gasche||Note Added: 0012925|
|2014-12-21 23:17||whitequark||File Deleted: no-suffixes.patch|
|2014-12-21 23:17||whitequark||File Added: no-suffixes.patch|
|2014-12-21 23:18||whitequark||Note Added: 0012927|
|2014-12-22 18:06||doligez||Note Added: 0012942|
|2014-12-22 18:07||doligez||Status||new => feedback|
|2014-12-22 18:08||whitequark||Note Added: 0012943|
|2014-12-22 18:08||whitequark||Status||feedback => new|
|2014-12-22 18:09||gasche||Note Added: 0012944|
|2014-12-22 18:10||whitequark||File Deleted: no-suffixes.patch|
|2014-12-22 18:10||whitequark||File Added: no-suffixes.patch|
|2014-12-22 18:11||whitequark||File Deleted: no-suffixes.patch|
|2014-12-22 18:12||whitequark||File Added: no-suffixes.patch|
|2014-12-22 18:12||whitequark||Note Added: 0012945|
|2014-12-22 18:15||doligez||Note Added: 0012946|
|2014-12-22 19:42||doligez||Status||new => confirmed|
|2014-12-27 09:46||gasche||Note Added: 0012992|
|2014-12-27 09:46||gasche||Status||confirmed => resolved|
|2014-12-27 09:46||gasche||Fixed in Version||=> 4.02.2+dev / +rc1|
|2014-12-27 09:46||gasche||Resolution||open => fixed|
|2014-12-27 09:46||gasche||Assigned To||=> whitequark|
|2016-12-07 11:47||xleroy||Status||resolved => closed|
|2017-02-23 16:38||doligez||Category||OCaml internal build/install (Makefiles, configure) => configure and build/install|
|Copyright © 2000 - 2011 MantisBT Group|