Bug 170106 - generate-bindings-all.pl shouldn't use Perl threads
Summary: generate-bindings-all.pl shouldn't use Perl threads
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Local Build
Hardware: PC Other
: P2 Blocker
Assignee: Fujii Hironori
URL:
Keywords:
Depends on: 161433
Blocks:
  Show dependency treegraph
 
Reported: 2017-03-26 05:59 PDT by Antoine Jacoutot
Modified: 2017-04-09 14:48 PDT (History)
8 users (show)

See Also:


Attachments
WIP Patch (2.59 KB, patch)
2017-03-27 03:22 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff
Patch (3.73 KB, patch)
2017-03-27 21:43 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antoine Jacoutot 2017-03-26 05:59:48 PDT
Hi.

Could the generate-bindings-all.pl script be modified to not require a threaded perl?
"The use of interpreter-based threads in perl is officially discouraged" by upstream and not all Linux distributions compile perl with threads support; that's also the case of the BSDs.

Trying to build on OpenBSD fails with:
This Perl not built to support threads
Compilation failed in require at ./webkitgtk4-2.16.0/webkitgtk-2.16.0/Source/WebCore/bindings/scripts/generate-bindings-all.pl line 35.
BEGIN failed--compilation aborted at ./webkitgtk4-2.16.0/webkitgtk-2.16.0/Source/WebCore/bindings/scripts/generate-bindings-all.pl line 35.
ninja: build stopped: subcommand failed.

Thanks.
Comment 1 Fujii Hironori 2017-03-26 22:24:39 PDT
http://search.cpan.org/~rybskej/forks/lib/forks.pm

This seems useful. I'll try it.
Comment 2 Antoine Jacoutot 2017-03-27 00:25:15 PDT
Thanks for looking into it. If you need me to test anything, feel free to ask :-)
Comment 3 Fujii Hironori 2017-03-27 03:20:28 PDT
(In reply to Fujii Hironori from comment #1)
> http://search.cpan.org/~rybskej/forks/lib/forks.pm
> This seems useful. I'll try it.

This doesn't work for me.
I need to give up using threads in Perl.
Comment 4 Fujii Hironori 2017-03-27 03:22:43 PDT
Created attachment 305459 [details]
WIP Patch

I created a WIP patch of using fork&exec&wait.

I feel slower in case of using Windows Perl.
Comment 5 Antoine Jacoutot 2017-03-27 09:37:07 PDT
Ah that seems to work fine so far :-)
Still building but I am way passed the original failure.
I'll keep you posted once the build is done. Thanks.
Comment 6 Fujii Hironori 2017-03-27 19:50:54 PDT
(In reply to Fujii Hironori from comment #4)
> I feel slower in case of using Windows Perl.

This my feeling was wrong. I did benchmark:

with threads:    00:04:01.83
without threads: 00:04:01.32
Comment 7 Fujii Hironori 2017-03-27 21:43:40 PDT
Created attachment 305559 [details]
Patch
Comment 8 Antoine Jacoutot 2017-03-27 23:06:42 PDT
I can confirm that with this patch I am able to build WebKit fine :-)
Thank you!
Comment 9 Fujii Hironori 2017-04-08 15:53:44 PDT
Could anyone review this?

Gentoo Linux also gets the trouble.
https://paste.pound-python.org/show/cC5FbmhCBLSg1qrwoLuv/
Comment 10 Yusuke Suzuki 2017-04-09 14:20:22 PDT
Comment on attachment 305559 [details]
Patch

r=me
Comment 11 WebKit Commit Bot 2017-04-09 14:48:09 PDT
Comment on attachment 305559 [details]
Patch

Clearing flags on attachment: 305559

Committed r215166: <http://trac.webkit.org/changeset/215166>
Comment 12 WebKit Commit Bot 2017-04-09 14:48:11 PDT
All reviewed patches have been landed.  Closing bug.