Bug 835424

Summary: make patch to fix webkitgtk parallel build
Product: [Fedora] Fedora Reporter: Kalev Lember <kalevlember>
Component: makeAssignee: Petr Machata <pmachata>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: maxim.yegorushkin, mnewsome, pmachata, tgl
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-09-17 22:46:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Kalev Lember 2012-06-26 07:19:27 UTC
Hello,

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 17:58:07 UTC
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 18:10:32 UTC
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 09:06:07 UTC
FYI, make maintainers just applied the patch:

https://savannah.gnu.org/bugs/?30653
http://cvs.savannah.gnu.org/viewvc/make/remake.c?root=make&r1=1.153&r2=1.154

Comment 4 Kalev Lember 2012-09-10 15:22:06 UTC
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 18:13:05 UTC
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 19:18:38 UTC
make-3.82-13.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/make-3.82-13.fc18

Comment 7 Fedora Update System 2012-09-10 19:19:10 UTC
make-3.82-13.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/make-3.82-13.fc17

Comment 8 Fedora Update System 2012-09-11 19:11:46 UTC
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:
https://admin.fedoraproject.org/updates/FEDORA-2012-13808/make-3.82-13.fc18
then log in and leave karma (feedback).

Comment 9 Fedora Update System 2012-09-17 22:46:38 UTC
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 08:57:33 UTC
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.