Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 704194 - =net-libs/webkit-gtk-2.26.2 on ARM : .../work/webkitgtk-2.26.2/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp:471:36: error: ‘OpAdd’ was not declared in this scope
Summary: =net-libs/webkit-gtk-2.26.2 on ARM : .../work/webkitgtk-2.26.2/Source/JavaScr...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 704182
  Show dependency tree
 
Reported: 2019-12-29 17:34 UTC by tt_1
Modified: 2020-01-22 16:08 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
output from emerge --info (cross-target) (emerge-info,5.01 KB, text/plain)
2019-12-29 17:34 UTC, tt_1
Details
compressed build log (webkit-gtk-2.26.2-build.log.gz,80.83 KB, application/gzip)
2019-12-29 17:34 UTC, tt_1
Details
snippet of the most important part of the build log (error.log,142.16 KB, text/plain)
2019-12-29 17:36 UTC, tt_1
Details
compressed build log with more useflags enabled (build.log.gz,108.38 KB, application/gzip)
2019-12-29 18:58 UTC, tt_1
Details
compressed build log from amd64 (webkit-amd64.log.gz,170.35 KB, application/gzip)
2019-12-29 21:10 UTC, tt_1
Details
output from emerge --info (emerge-info,7.28 KB, text/plain)
2019-12-29 21:12 UTC, tt_1
Details
compressed build log from arm (build-arm.log.gz,88.20 KB, application/gzip)
2020-01-04 09:58 UTC, tt_1
Details
proposed patch (webkit-gtk-2.26.2-fix-arm.patch,451 bytes, patch)
2020-01-04 21:03 UTC, tt_1
Details | Diff
compressed build log from arm (build.log.gz,101.87 KB, application/gzip)
2020-01-04 21:07 UTC, tt_1
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tt_1 2019-12-29 17:34:23 UTC
Created attachment 601714 [details]
output from emerge --info (cross-target)

emerge -pv =webkit-2.26.2 

[ebuild     U *] net-libs/webkit-gtk-2.26.2:4/37::gentoo [2.24.4:4/37::gentoo] to /usr/armv7a-unknown-linux-gnueabihf/ USE="X (seccomp%*) (-aqua) -coverage -doc -egl* -geolocation -gles2-only% -gnome-keyring -gstreamer -introspection -jpeg2k* -jumbo-build% -libnotify -opengl* -spell -test -wayland -webgl (-gles2%) (-nsplugin%)" 0 KiB

Total: 1 package (1 upgrade), Size of downloads: 0 KiB

This used to work with webkit-gtk-2.24.4. 

Mostly a remainer to myself to look into this and to find out: 

does this happen on native compile too, or is it cross specific
where is the webkit-gtk bugtracker, and has a similar bug been reported? 
is it related to USE="seccomp"?
Comment 1 tt_1 2019-12-29 17:34:42 UTC
Created attachment 601716 [details]
compressed build log
Comment 2 tt_1 2019-12-29 17:36:05 UTC
Created attachment 601718 [details]
snippet of the most important part of the build log

given that it's some 70 errors at once, this might turn nasty.
Comment 3 Mart Raudsepp gentoo-dev 2019-12-29 18:13:44 UTC
Try with jumbo-build and with opengl/egl perhaps. I don't know why you are disabling those. Of course if it turns out to be an issue, we deal with it, but please check it's not those changes in your build now compared to previous.
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2019-12-29 18:24:12 UTC
Comment on attachment 601718 [details]
snippet of the most important part of the build log

This is already contained in the full build log that you attached.
Comment 5 tt_1 2019-12-29 18:58:09 UTC
Created attachment 601720 [details]
compressed build log with more useflags enabled

Calculating dependencies... done!
[ebuild     U *] net-libs/webkit-gtk-2.26.2:4/37::gentoo [2.24.4:4/37::gentoo] to /usr/armv7a-unknown-linux-gnueabihf/ USE="X egl jpeg2k jumbo-build%* opengl (seccomp%*) (-aqua) -coverage -doc -geolocation -gles2-only% -gnome-keyring -gstreamer -introspection -libnotify -spell -test -wayland -webgl (-gles2%) (-nsplugin%)" 0 KiB

Total: 1 package (1 upgrade), Size of downloads: 0 KiB


this only makes it more angry! :(
Comment 6 tt_1 2019-12-29 20:26:52 UTC
This combination is working: 

Calculating dependencies... done!
[ebuild   R   *] net-libs/webkit-gtk-2.26.2:4/37::gentoo to /usr/armv7a-unknown-linux-gnueabihf/ USE="X egl gstreamer jpeg2k jumbo-build opengl (seccomp) webgl (-aqua) -coverage -doc -geolocation -gles2-only -gnome-keyring -introspection -libnotify -spell -test -wayland" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB


there is also an issue with compiling the gstreamer deps, but that's another bug. 

using the same useflags, but disabling jumbo-build makes it fail again.
Comment 7 tt_1 2019-12-29 20:31:44 UTC
this fails too: 

Calculating dependencies... done!
[ebuild   R   *] net-libs/webkit-gtk-2.26.2:4/37::gentoo to /usr/armv7a-unknown-linux-gnueabihf/ USE="X egl gstreamer jpeg2k jumbo-build opengl (seccomp) (-aqua) -coverage -doc -geolocation -gles2-only -gnome-keyring -introspection -libnotify -spell -test -wayland -webgl*" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB
Comment 8 tt_1 2019-12-29 21:10:54 UTC
Created attachment 601734 [details]
compressed build log from amd64

something is really off: 

this time with amd64

Calculating dependencies... done!
[ebuild  N    ~] net-libs/webkit-gtk-2.26.2:4/37::gentoo  USE="X egl jpeg2k opengl (seccomp) (-aqua) -coverage -doc -geolocation -gles2-only -gnome-keyring -gstreamer -introspection -jumbo-build -libnotify -spell -test -wayland -webgl" 0 KiB

Total: 1 package (1 new), Size of downloads: 0 KiB
Comment 9 tt_1 2019-12-29 21:12:14 UTC
Created attachment 601736 [details]
output from emerge --info

emerge --info from the amd64 machine
Comment 10 tt_1 2019-12-29 22:30:23 UTC
working combination: 

Calculating dependencies... done!
[ebuild   R   ~] net-libs/webkit-gtk-2.26.2:4/37::gentoo  USE="X egl gstreamer jpeg2k opengl (seccomp) webgl (-aqua) -coverage -doc -geolocation -gles2-only -gnome-keyring -introspection -jumbo-build -libnotify -spell -test -wayland" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB

on amd64
Comment 11 Mart Raudsepp gentoo-dev 2020-01-04 09:08:20 UTC
Perhaps all the failures were with USE="opengl -webgl", which was unsupported and now removed?
Comment 12 Mart Raudsepp gentoo-dev 2020-01-04 09:14:05 UTC
But this seems to be issues in JavascriptCore JIT stuff, hard to imagine webgl affecting it, yet USE=gstreamer and USE=webgl only were toggled between one of your failures vs successes, if I'm reading this right
Comment 13 tt_1 2020-01-04 09:52:29 UTC
working combination on ARM: 

emerge -pv webkit-gtk

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   *] net-libs/webkit-gtk-2.26.2:4/37::gentoo to /usr/armv7a-unknown-linux-gnueabihf/ USE="X egl gstreamer jumbo-build opengl (seccomp) (-aqua) -coverage -doc -geolocation -gles2-only -gnome-keyring -introspection -jpeg2k -libnotify -spell -test -wayland" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB


I think it's jumbo-build which triggers the NodesCodegen.cpp specific bug. Given the promise of a faster compile I'm all in to use it, but I'm worried the 1gb of ram aren't sufficent for compiling this nativly. 

could be this one: https://bugs.webkit.org/show_bug.cgi?id=193073 

?
Comment 14 tt_1 2020-01-04 09:58:04 UTC
Created attachment 602518 [details]
compressed build log from arm

disabling jumbo-build use flag: 

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   *] net-libs/webkit-gtk-2.26.2:4/37::gentoo to /usr/armv7a-unknown-linux-gnueabihf/ USE="X egl gstreamer opengl (seccomp) (-aqua) -coverage -doc -geolocation -gles2-only -gnome-keyring -introspection -jpeg2k -jumbo-build* -libnotify -spell -test -wayland" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB

Would you like to merge these packages? [Yes/No] 

I'm going to check out wether this happens on amd64 with the same use flags.
Comment 15 tt_1 2020-01-04 11:09:52 UTC
emerge -pv webkit-gtk

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] net-libs/webkit-gtk-2.26.2:4/37::gentoo  USE="X egl opengl (seccomp) (-aqua) -coverage -doc -geolocation -gles2-only -gnome-keyring -gstreamer -introspection -jpeg2k -jumbo-build -libnotify -spell -test -wayland" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB

same combination on amd64, works. 


so, that means  -DENABLE_UNIFIED_BUILDS=OFF  is broken on arm?
Comment 16 Mart Raudsepp gentoo-dev 2020-01-04 20:51:13 UTC
Looks that way, and I can't reproduce on arm64.

Can you try adding this #include alongside the rest in the failing file in Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp and see if it fixes it all:

#include "BytecodeStructs.h"
Comment 17 tt_1 2020-01-04 21:03:19 UTC
Created attachment 602572 [details, diff]
proposed patch

I'm not 100% sure, but this is how I understood your suggestion. 

Is it correct?
Comment 18 tt_1 2020-01-04 21:07:54 UTC
Created attachment 602574 [details]
compressed build log from arm

with your suggestions, if I got them correct, there are more errors further down the road in JavaScriptCore/heap/MachineStackMarker.cpp
Comment 19 Mart Raudsepp gentoo-dev 2020-01-04 22:10:21 UTC
It's a matter of finding all those things and adding the missing #include's :(

There was a patch to that effect for master here:

https://bugs.webkit.org/show_bug.cgi?id=204891
https://trac.webkit.org/changeset/253538/webkit

But it doesn't apply cleanly due to a bunch of refactors there and it doesn't seem to even cover those files we had problems before and now after the first fix (I think things got renamed and moved around or something in master).

So if someone could go through the errors one by one, add the missing #include's (by figuring out what needs to be included by grepping for the symbol in header files, etc - note that some things to include might not be in the tarball, but rather generated, so look inside the failed builddir as well if don't find in main sources), then we could get it going.

It doesn't happen with USE=jumbo-build because many source files get unified into one bigger source file, and some earlier source file in that unified file already includes the necessary header. But if you disable this prone to break option (upstream doesn't test it much, that's why I had to remove the option in 2.24 too after a brief period of it being there), each source file has to be correct with the header includes naturally - it's also the correct thing to do, but is flying under the radar upstream often, as unified builds (jumbo-build) has been the default ever since 2.24 or even 2.22.

It doesn't happen on amd64 because issues affecting it have apparently been ironed out or not happening, and it's some arch specific code that has some issues still. This one seems shared with some other arches, like sparc, but not amd64.

So yeah, if someone could help dig through upstream or just figure out all the missing includes and provide a complete patch, we can get this fixed.
For me it's going to be taking time due to time constraints and having to set up some cross-compilation (or get some access somewhere with fast enough machine and poke at it), as those issues don't happen on amd64 and arm64.
Comment 20 Mart Raudsepp gentoo-dev 2020-01-19 18:24:38 UTC
I was able to get a wayland webkit-gtk armv7a cross-compile mostly going (forcefully ignoring wpebackend and some other cross-compile non-clean hacks to succeed) and replicate the OpAdd and the following issue. For me in this setup, it turned out that the OpAdd thing + MachineStackMarker.cpp thing (missing CPU.h include) were the only thing really, so just needed that MachineStackMarker figured out.

I will add a patch to main tree soon after some final tests - please check with that with your (hopefully various) USE flag combinations, if all is fine now and let us know (despite me closing the bug with that commit, in the hope it's fine and bug 704182 is signalled to be able to continue). I can't test with many combinations, just USE="egl gles2-only jpeg2k libnotify (seccomp) spell wayland -X (-aqua) -coverage -doc -geolocation -gnome-keyring -gstreamer -introspection -jumbo-build -opengl -test" right now.
Comment 21 Larry the Git Cow gentoo-dev 2020-01-19 18:49:13 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=67cc73686f1c4ea44aa0b639d2be4659c21c4c9c

commit 67cc73686f1c4ea44aa0b639d2be4659c21c4c9c
Author:     Mart Raudsepp <leio@gentoo.org>
AuthorDate: 2020-01-19 18:47:40 +0000
Commit:     Mart Raudsepp <leio@gentoo.org>
CommitDate: 2020-01-19 18:48:01 +0000

    net-libs/webkit-gtk: fix USE=-jumbo-build builds on non-amd64
    
    In some non-amd64 architectures (arm and sparc at least), there
    are missing headers in JSC. Not sure what the trigger is - maybe
    lack of FTL, or some other differences. Hopefully fix it by
    patching in the necessary includes to the places I could identify
    with limited armv7a cross-compiling.
    
    Closes: https://bugs.gentoo.org/704194
    Package-Manager: Portage-2.3.79, Repoman-2.3.12
    Signed-off-by: Mart Raudsepp <leio@gentoo.org>

 .../files/2.26.2-fix-arm-non-unified-build.patch   | 27 ++++++++++++++++++++++
 net-libs/webkit-gtk/webkit-gtk-2.26.2.ebuild       |  1 +
 2 files changed, 28 insertions(+)
Comment 22 tt_1 2020-01-22 16:08:46 UTC
I can confirm that the patch fixes the issues with arm, so thank you for all your effort on this. 

Can you please upstream it? That would be great.