Bug 835424 - make patch to fix webkitgtk parallel build
make patch to fix webkitgtk parallel build
Product: Fedora
Classification: Fedora
Component: make (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Petr Machata
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2012-06-26 03:19 EDT by Kalev Lember
Modified: 2015-05-04 21:37 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-09-17 18:46:38 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Kalev Lember 2012-06-26 03:19:27 EDT

webkitgtk/webkitgtk3 currently fail to build with parallel make. An investigation upstream [1] lead to a conclusion that it's actually an issue within make, and that make-intermediate-parallel-bug.patch from http://savannah.gnu.org/bugs/?30653 fixes it. Would it be possible to apply this patch to rawhide, please?

webkitgtk is a huge library and using parallel make would cut down the build time from ~6h to less than 2h, making its packaging much easier to handle.

[1] https://bugs.webkit.org/show_bug.cgi?id=79498
Comment 1 Tom Lane 2012-09-09 13:58:07 EDT
This same bug is affecting postgresql.  Here is a self-contained test case that fails for me on both F16 and F17:

Grab postgresql-9.1.5.tar.bz2 (eg, from current Fedora F17 git)
Be sure you have gcc, bison, flex installed

tar xfj postgresql-9.1.5.tar.bz2
cd postgresql-9.1.5
./configure --enable-depend
make -j4 -s

Building the full tree may or may not fail, but if you then do
cd src/interfaces/ecpg
you can repeat the following sequence of steps:

make -s maintainer-clean
rm -rf ~/.ccache/
make -j4 -s

and it will fail upwards of 75% of the time with

config.status: creating src/interfaces/ecpg/include/ecpg_config.h
parser.c:25:21: fatal error: preproc.h: No such file or directory
compilation terminated.
make[1]: *** [parser.o] Error 1
make[1]: *** Waiting for unfinished jobs....
keywords.c:20:21: fatal error: preproc.h: No such file or directory
compilation terminated.
make[1]: *** [keywords.o] Error 1
make: *** [all-preproc-recurse] Error 2
make: *** Waiting for unfinished jobs....

Depending on what hardware you try it on, you might need to adjust the -j value a bit (a value near your number of CPUs seems most prone to trigger the problem).

Sometimes there are other errors, which I suspect are due to bogosities in the makefiles, but if you look into ecpg/preproc/Makefile I think you will agree there is no way that it should be trying to compile parser.c or keywords.c before it's run bison to create preproc.h.  But it does.

I have reproduced this with make-3.82-8.fc16 on F16, and with make-3.82-9.fc17 on F17 on different hardware.

I rebuilt make with make-intermediate-parallel-bug.patch from the upstream bug report, and that seems to fix it.  Dunno if the fix is any good stylistically, but please press upstream to do something about this.
Comment 2 Tom Lane 2012-09-09 14:10:32 EDT
BTW, I forgot to mention that --enable-depend seems to be necessary to trigger the bug in postgresql builds.  I am not sure if the modified build rules (see the "autodepend" stanza in src/Makefile.global.in for details) actually have some influence on the bug, or if it's just a matter of getting the timing right.
Comment 3 Maxim Egorushkin 2012-09-10 05:06:07 EDT
FYI, make maintainers just applied the patch:

Comment 4 Kalev Lember 2012-09-10 11:22:06 EDT
Oh, this is good new. Petr, what would you think about backporting the patch to the Fedora package, or would you mind if I do this?
Comment 5 Petr Machata 2012-09-10 14:13:05 EDT
OK, the test case provided in 30653 triggers, and the patch indeed fixes it.  I'll add this to impacted Fedora releases.
Comment 6 Fedora Update System 2012-09-10 15:18:38 EDT
make-3.82-13.fc18 has been submitted as an update for Fedora 18.
Comment 7 Fedora Update System 2012-09-10 15:19:10 EDT
make-3.82-13.fc17 has been submitted as an update for Fedora 17.
Comment 8 Fedora Update System 2012-09-11 15:11:46 EDT
Package make-3.82-13.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing make-3.82-13.fc18'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
Comment 9 Fedora Update System 2012-09-17 18:46:38 EDT
make-3.82-13.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 10 Fedora Update System 2012-09-26 04:57:33 EDT
make-3.82-13.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.