Bug 258769

Summary: Intermittent parallel build failures related to GIR file
Product: WebKit Reporter: Jan Palus <jpalus>
Component: CMakeAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Log
none
Patch for non parallel build none

Description Jan Palus 2023-07-01 07:41:39 PDT
Created attachment 466892 [details]
Patch

Sometimes build fails with errors like:

[100%] Generating WPEWebKit-1.0.typelib
cd /tmp/B.0d8_p500/BUILD/wpewebkit-2.38.6/build-soup2/Source/WebKit && /usr/bin/g-ir-compiler --includedir=/tmp/B.0d8_p500/BUILD/wpewebkit-2.38.6/build-soup2 --output=/tmp/B.0d8_p500/BUILD/wp
ewebkit-2.38.6/build-soup2/WPEWebKit-1.0.typelib /tmp/B.0d8_p500/BUILD/wpewebkit-2.38.6/build-soup2/WPEWebKit-1.0.gir
error parsing file /tmp/B.0d8_p500/BUILD/wpewebkit-2.38.6/build-soup2/WPEWebKit-1.0.gir: Error on line 1 char 1: Document was empty or contained only whitespace

(see attached log)

While most recent occurrence of this issue is related to WPEWebKit, the same behavior was observed for "normal" WebKit as well. Mechanism in question is exactly the same in both.

The reason for the errors are multiple commands generating same GIR file executed in parallel.

See attached patch for more details and fix. Feel free to use it or not. Unfortunately it was not possible to create pull request as the baroque `git-webkit setup` script has hard dependency on keyring which I unfortunately cannot satisfy.
Comment 1 Jan Palus 2023-07-01 07:42:04 PDT
Created attachment 466893 [details]
Log
Comment 2 Radar WebKit Bug Importer 2023-07-08 07:42:14 PDT
<rdar://problem/111953858>
Comment 3 Jan Palus 2023-07-10 00:02:51 PDT
Created attachment 466996 [details]
Patch for non parallel build

Follow up patch for issue found and fixed by Jakub Bogusz with non parallel build.