Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 680464

Summary: net-libs/webkit-gtk-2.24.0 USE=-jit - .../work/webkitgtk-2.24.0/Source/WTF/wtf/Platform.h:1020:2: error: #error "Cannot enable the JIT or RegExp JIT without enabling the Assembler"
Product: Gentoo Linux Reporter: 4nykey
Component: Current packagesAssignee: Gentoo Linux Gnome Desktop Team <gnome>
Status: RESOLVED FIXED    
Severity: normal CC: atoth, c.apeltauer, creideiki+gentoo-bugzilla, fordfrog, gentoo
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: fix to ebuild to get webkit-gtk compiled without JIT

Description 4nykey 2019-03-15 16:53:20 UTC
/var/tmp/portage/net-libs/webkit-gtk-2.24.0/work/webkitgtk-2.24.0/Source/WTF/wtf/Platform.h:1020:2: error: #error "Cannot enable the JIT or RegExp JIT without enabling the Assembler"

corresponding part of the offending header:
>/* If either the JIT or the RegExp JIT is enabled, then the Assembler must be
>   enabled as well: */
>#if ENABLE(JIT) || ENABLE(YARR_JIT) || !ENABLE(C_LOOP)
>#if defined(ENABLE_ASSEMBLER) && !ENABLE_ASSEMBLER
>#error "Cannot enable the JIT or RegExp JIT without enabling the Assembler"

So I wen t ahead and disabled C_LOOP, then cmake barfed:
>CMake Error at Source/cmake/WebKitFeatures.cmake:275 (message):
>ENABLE_SAMPLING_PROFILER conflicts with ENABLE_C_LOOP.  You must disable
>one or the other

Didn't dig any further, but adding these lines to the ebuild made the build process proceed
>-DENABLE_SAMPLING_PROFILER=$(usex jit)
>-DENABLE_C_LOOP=$(usex !jit)
Comment 1 Andy Pettinger 2019-03-16 03:33:50 UTC
I can confirm the same error with -jit flag.
Comment 2 Mart Raudsepp gentoo-dev 2019-03-16 07:38:20 UTC
Ok, thanks for the report and tests on what is missing - but why are you guys using -jit?
Comment 3 Andy Pettinger 2019-03-16 08:41:55 UTC
(In reply to Mart Raudsepp from comment #2)
> Ok, thanks for the report and tests on what is missing - but why are you
> guys using -jit?

Hardened profile so not default jit flag ?
Comment 4 Mart Raudsepp gentoo-dev 2019-03-16 08:44:22 UTC
But the ebuild IUSE default enables it anyways, so you must have a USE=-jit in make.conf or some such; no?
Comment 5 Andy Pettinger 2019-03-16 08:49:44 UTC
(In reply to Mart Raudsepp from comment #4)
> But the ebuild IUSE default enables it anyways, so you must have a USE=-jit
> in make.conf or some such; no?

No i  don't have a -jit flag in make.conf
Comment 6 4nykey 2019-03-16 09:32:11 UTC
Jit is profile masked on hardened.
Comment 7 4nykey 2019-03-16 09:36:53 UTC
Sorry, not masked, just disabled by default
Comment 8 tonemgub 2019-03-16 13:28:32 UTC
(In reply to ak from comment #7)
> Sorry, not masked, just disabled by default

I have the same issue, confirming. I never set any special use flags for this package, but jit it is disabled by default in hardened profile.
Comment 9 Christian Apeltauer 2019-03-17 19:20:14 UTC
Created attachment 569548 [details, diff]
fix to ebuild to get webkit-gtk compiled without JIT

When disabling JIT on webkit-gtk-2.24, C_LOOP must be enabled instead, which in turn needs SAMPLING_PROFILER disabled. The attached patch for the ebuild should fix this issue.
Comment 10 Attila Tóth 2019-03-19 08:44:23 UTC
(In reply to Christian Apeltauer from comment #9)
> Created attachment 569548 [details, diff] [details, diff]
> fix to ebuild to get webkit-gtk compiled without JIT
> 
> When disabling JIT on webkit-gtk-2.24, C_LOOP must be enabled instead, which
> in turn needs SAMPLING_PROFILER disabled. The attached patch for the ebuild
> should fix this issue.

Thank you for the patch, sir. Works flawlessly!
Comment 11 Matt Whitlock 2019-03-19 19:15:12 UTC
(In reply to Mart Raudsepp from comment #2)
> but why are you guys using -jit?

Smaller attack surface. I only use WebKit-GTK for popup documentation in Eclipse. No need for JIT there.

Also, I would assume that disabling JIT shortens the build time.
Comment 12 Markus Walter 2019-04-04 19:49:57 UTC
I can confirm that the build succeeds with the patched ebuild, however a quick check with epiphany showed only errors and the following output on the command line:

** (epiphany:5657): WARNING **: 21:48:01.094: Error running javascript: 

** (epiphany:5657): WARNING **: 21:48:01.094: Web process crashed

This however is probably a completely different issue.
Comment 13 Mart Raudsepp gentoo-dev 2019-04-05 09:03:41 UTC
(In reply to Markus Oehme from comment #12)
> This however is probably a completely different issue.

Unless it's failing because you don't have JIT?
Comment 14 Enne Eziarc 2019-04-10 11:18:38 UTC
(In reply to Mart Raudsepp from comment #2)
> Ok, thanks for the report and tests on what is missing - but why are you
> guys using -jit?

They might be using hardened, but I use -jit because I don't see much need for optimising hot JS loops in an RSS reader.
Comment 15 Larry the Git Cow gentoo-dev 2019-04-13 19:05:51 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=08e02e08cb8befcf19ded8e1cee3dd32025bf4bd

commit 08e02e08cb8befcf19ded8e1cee3dd32025bf4bd
Author:     Mart Raudsepp <leio@gentoo.org>
AuthorDate: 2019-04-13 18:58:50 +0000
Commit:     Mart Raudsepp <leio@gentoo.org>
CommitDate: 2019-04-13 18:59:07 +0000

    net-libs/webkit-gtk: security bump to 2.24.1, drop JIT control
    
    JIT manual control is getting complicated for limited benefits, which
    mostly involve oneself shooting in the foot. Let upstream build system
    figure out whether it should do JIT or not and don't get in the way.
    May be revisited based on any fallout and relevant bug reports after
    discussions on such reports convince it's needed.
    
    Bug: https://bugs.gentoo.org/683234
    Bug: https://bugs.gentoo.org/680580
    Bug: https://bugs.gentoo.org/680464
    Package-Manager: Portage-2.3.52, Repoman-2.3.12
    Signed-off-by: Mart Raudsepp <leio@gentoo.org>

 net-libs/webkit-gtk/Manifest                 |   1 +
 net-libs/webkit-gtk/webkit-gtk-2.24.1.ebuild | 281 +++++++++++++++++++++++++++
 2 files changed, 282 insertions(+)
Comment 16 Mart Raudsepp gentoo-dev 2019-04-19 11:04:23 UTC
No follow-up issues reported so far, so closing this one as FIXED. If there are concerns about USE=jit going away (and having upstream figure out which to do), or other related or unrelated bugs, please file a new bug entry.