Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 684682 - net-libs/webkit-gtk-2.24.1 - .../work/webkitgtk-2.24.1/Source/JavaScriptCore/assembler/ARM64Assembler.h:3769:100: error: ‘class JSC::AssemblerBuffer’ has no member named ‘data’ on machines with Cortex-A53 CPU
Summary: net-libs/webkit-gtk-2.24.1 - .../work/webkitgtk-2.24.1/Source/JavaScriptCore/...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: ARM64 Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-28 23:35 UTC by Andrius Štikonas
Modified: 2022-03-27 17:42 UTC (History)
2 users (show)

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


Attachments
build.log.xz (build.log.xz,24.50 KB, application/x-xz)
2019-04-28 23:36 UTC, Andrius Štikonas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrius Štikonas 2019-04-28 23:35:46 UTC
webkit-gtk fails to build on my aarch64 (rk3399) system.

Reproducible: Always




[ebuild     U ~] net-libs/webkit-gtk-2.24.1:4/37::gentoo [2.22.6:4/37::gentoo] USE="X egl geolocation gstreamer introspection jpeg2k%* libnotify opengl spell wayland webgl (-aqua) -coverage -doc -gles2 -gnome-keyring -nsplugin -test (-jit%*)" 0 KiB
Comment 1 Andrius Štikonas 2019-04-28 23:36:45 UTC
Created attachment 574582 [details]
build.log.xz

Build log
Comment 2 Andrius Štikonas 2019-09-02 06:29:41 UTC
This bug is specific to Cortex-A53 CPUs.
Comment 3 Mart Raudsepp gentoo-dev 2019-09-02 11:27:55 UTC
Yes, this looks like very clearly broken upstream code for this code path.

Source/JavaScriptCore/assembler/AssemblerBuffer.h has this for the data member:

#if !CPU(ARM64) // If we were to define this on arm64e, we'd need a way to update the hash as we write directly into the buffer.
        void* data() const { return m_storage.buffer(); }
#endif

while Source/JavaScriptCore/assembler/ARM64Assembler.h has this:

#if CPU(ARM64_CORTEXA53)
        CHECK_DATASIZE();
        if (datasize == 64) {
            if (LIKELY(m_buffer.codeSize() >= sizeof(int32_t))) {
                // From ARMv8 Reference Manual, Section C4.1: the encoding of the
                // instructions in the Loads and stores instruction group is:
                // ---- 1-0- ---- ---- ---- ---- ---- ----
                if (UNLIKELY((*reinterpret_cast_ptr<int32_t*>(reinterpret_cast_ptr<char*>(m_buffer.data()) + m_buffer.codeSize() - sizeof(int32_t)) & 0x0a000000) == 0x08000000))
                    nop();
            }
        }
#endif

There you can see if tries to access m_buffer.data(), but it's not even declared in the header if CPU(ARM64).

Please find upstream bug report for this, perhaps check it isn't fixed in their subversion trunk already (I think they have git mirror too, or have converted it all to git by now), and if nothing, file a new upstream bug and report the link here.
Comment 4 Mart Raudsepp gentoo-dev 2019-09-02 11:30:18 UTC
The build system detects this CPU type from /proc/cpuinfo in Source/cmake/OptionsCommon.cmake and sets up the preprocessor vars and also prepends "-mfix-cortex-a53-835769" to CFLAGS/CXXFLAGS. The latter you may want to research and do yourself too if not already doing (albeit I'm not sure all a53 need that errata toolchain workaround).
Comment 5 Nia 2020-10-11 09:40:13 UTC
upstream bug report https://bugs.webkit.org/show_bug.cgi?id=197192.

The fix would land in webkit-gtk-2.29.1.