GNU bug report logs - #51863
[PATCH] gnu: webkitgtk: Really disable SSE2 on i686-linux.

Previous Next

Package: guix-patches;

Reported by: Diego Nicola Barbato <dnbarbato <at> posteo.de>

Date: Mon, 15 Nov 2021 11:30:03 UTC

Severity: normal

Tags: patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 51863 in the body.
You can then email your comments to 51863 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#51863; Package guix-patches. (Mon, 15 Nov 2021 11:30:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Diego Nicola Barbato <dnbarbato <at> posteo.de>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 15 Nov 2021 11:30:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Diego Nicola Barbato <dnbarbato <at> posteo.de>
To: guix-patches <at> gnu.org
Cc: Mark H Weaver <mhw <at> netris.org>,
 Liliana Marie Prikler <liliana.prikler <at> gmail.com>,
 Leo Famulari <leo <at> famulari.name>
Subject: [PATCH] gnu: webkitgtk: Really disable SSE2 on i686-linux.
Date: Mon, 15 Nov 2021 11:29:23 +0000
[Message part 1 (text/plain, inline)]
Hey Guix,

Commit d82fd7c2dd542693988f61fb15c020e3209ac7ec (gnu: webkitgtk: Disable
SSE2 when not on x86_64.) on master breaks webkitgtk on i686-linux.

(I'm Cc-ing Leo, Liliana, and Mark since you were all involved in
upgrading webkitgtk to 2.34.1.)

The offending patch attempts to disable SSE2 by conditionally adding a
phase which removes the call to 'CHECK_FOR_SSE2' from the end of
'Source/cmake/DetectSSE2.cmake'.  This phase doesn't do anything about
'SSE2_SUPPORT_FOUND' being set to 'FALSE' at line 34 in the same file,
which causes the following snippet starting at line 152 in
'Source/cmake/WebKitCompilerFlags.cmake'

--8<---------------cut here---------------start------------->8---
    # Force SSE2 fp on x86 builds.
    if (WTF_CPU_X86 AND NOT CMAKE_CROSSCOMPILING)
        WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-msse2 -mfpmath=sse)
        include(DetectSSE2)
        if (NOT SSE2_SUPPORT_FOUND)
            message(FATAL_ERROR "SSE2 support is required to compile WebKit")
        endif ()
    endif ()
--8<---------------cut here---------------end--------------->8---

to fail with the following error when building for i686.

--8<---------------cut here---------------start------------->8---
CMake Error at Source/cmake/WebKitCompilerFlags.cmake:157 (message):
  SSE2 support is required to compile WebKit
--8<---------------cut here---------------end--------------->8---

The attached patch removes the code for adding the broken 'disable-sse2'
phase.  Instead it disables SSE2 using a patch from Debian and by
setting 'CFLAGS' and 'CXXFLAGS' to '-march=i686' in the
'prepare-build-environment' phase when building for i686.  The latter is
necessary because clang, unlike gcc, defaults to '-march=pentium4',
which enables SSE2.

With this patch I've successfully built webkitgtk and epiphany on
i686-linux and x86_64-linux.

Regards,

Diego

[0001-gnu-webkitgtk-Really-disable-SSE2-on-i686-linux.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#51863; Package guix-patches. (Mon, 15 Nov 2021 19:30:01 GMT) Full text and rfc822 format available.

Message #8 received at 51863 <at> debbugs.gnu.org (full text, mbox):

From: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
To: Diego Nicola Barbato <dnbarbato <at> posteo.de>, 51863 <at> debbugs.gnu.org
Cc: Mark H Weaver <mhw <at> netris.org>, Leo Famulari <leo <at> famulari.name>
Subject: Re: [PATCH] gnu: webkitgtk: Really disable SSE2 on i686-linux.
Date: Mon, 15 Nov 2021 20:29:33 +0100
Hi Diego,

Am Montag, den 15.11.2021, 11:29 +0000 schrieb Diego Nicola Barbato:
> Hey Guix,
> 
> Commit d82fd7c2dd542693988f61fb15c020e3209ac7ec (gnu: webkitgtk:
> Disable SSE2 when not on x86_64.) on master breaks webkitgtk on i686-
> linux.
No, it does not.  It merely fails to fix it ;)

> (I'm Cc-ing Leo, Liliana, and Mark since you were all involved in
> upgrading webkitgtk to 2.34.1.)
> 
> The offending patch attempts to disable SSE2 by conditionally adding
> a phase which removes the call to 'CHECK_FOR_SSE2' from the end of
> 'Source/cmake/DetectSSE2.cmake'.  This phase doesn't do anything
> about 'SSE2_SUPPORT_FOUND' being set to 'FALSE' at line 34 in the
> same file, which causes the following snippet starting at line 152 in
> 'Source/cmake/WebKitCompilerFlags.cmake'
> 
> --8<---------------cut here---------------start------------->8---
>     # Force SSE2 fp on x86 builds.
>     if (WTF_CPU_X86 AND NOT CMAKE_CROSSCOMPILING)
>         WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-msse2 -mfpmath=sse)
>         include(DetectSSE2)
>         if (NOT SSE2_SUPPORT_FOUND)
>             message(FATAL_ERROR "SSE2 support is required to compile
> WebKit")
>         endif ()
>     endif ()
> --8<---------------cut here---------------end--------------->8---
> 
> to fail with the following error when building for i686.
> 
> --8<---------------cut here---------------start------------->8---
> CMake Error at Source/cmake/WebKitCompilerFlags.cmake:157 (message):
>   SSE2 support is required to compile WebKit
> --8<---------------cut here---------------end--------------->8---
> 
> The attached patch removes the code for adding the broken 'disable-
> sse2' phase.  Instead it disables SSE2 using a patch from Debian and
> by setting 'CFLAGS' and 'CXXFLAGS' to '-march=i686' in the
> 'prepare-build-environment' phase when building for i686.  The latter
> is necessary because clang, unlike gcc, defaults to '-
> march=pentium4', which enables SSE2.
These two things don't require combination though, right?  Like one
thing disables the SSE check whereas the other fixes a mostly unrelated
issue, am I correct?

I'd like the comment about the "-march=whatever" thing to be closer to
the setenvs, also if GCC does not require it there ought to be a TODO
or XXX stating that it should be removed on core-updates-frozen.

Otherwise LGTM, cheers!





Reply sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
You have taken responsibility. (Fri, 26 Nov 2021 04:16:02 GMT) Full text and rfc822 format available.

Notification sent to Diego Nicola Barbato <dnbarbato <at> posteo.de>:
bug acknowledged by developer. (Fri, 26 Nov 2021 04:16:02 GMT) Full text and rfc822 format available.

Message #13 received at 51863-done <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
Cc: Mark H Weaver <mhw <at> netris.org>, Leo Famulari <leo <at> famulari.name>,
 51863-done <at> debbugs.gnu.org, Diego Nicola Barbato <dnbarbato <at> posteo.de>
Subject: Re: bug#51863: [PATCH] gnu: webkitgtk: Really disable SSE2 on
 i686-linux.
Date: Thu, 25 Nov 2021 23:15:41 -0500
Hello,

Fixed with a variant of Diego's patch in d13d5f3141 on master and
68d47844b1 on core-updates-frozen.

Thanks a lot!

Closing.

Maxim




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 24 Dec 2021 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 85 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.