From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id YBT4KQKKhWEN/wAAgWs5BA (envelope-from ) for ; Fri, 05 Nov 2021 20:46:10 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id iH6cJQKKhWGwEgAAB5/wlQ (envelope-from ) for ; Fri, 05 Nov 2021 19:46:10 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 177ADA0D6 for ; Fri, 5 Nov 2021 20:46:10 +0100 (CET) Received: from localhost ([::1]:33540 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mj5A9-0003wE-9O for larch@yhetil.org; Fri, 05 Nov 2021 15:46:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53128) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mj5A2-0003w6-M2 for bug-guix@gnu.org; Fri, 05 Nov 2021 15:46:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:35762) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mj5A2-0003vL-CD for bug-guix@gnu.org; Fri, 05 Nov 2021 15:46:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mj5A2-0007vh-6n for bug-guix@gnu.org; Fri, 05 Nov 2021 15:46:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#51591: webkitgtk fails to build on i686-linux; possibly a clang issue Resent-From: Mark H Weaver Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 05 Nov 2021 19:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51591 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Liliana Marie Prikler , 51591@debbugs.gnu.org Received: via spool by 51591-submit@debbugs.gnu.org id=B51591.163614150430400 (code B ref 51591); Fri, 05 Nov 2021 19:46:02 +0000 Received: (at 51591) by debbugs.gnu.org; 5 Nov 2021 19:45:04 +0000 Received: from localhost ([127.0.0.1]:47308 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mj595-0007uA-Rr for submit@debbugs.gnu.org; Fri, 05 Nov 2021 15:45:04 -0400 Received: from world.peace.net ([64.112.178.59]:32966) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mj593-0007tO-7R for 51591@debbugs.gnu.org; Fri, 05 Nov 2021 15:45:02 -0400 Received: from mhw by world.peace.net with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mj58w-0006rM-DJ; Fri, 05 Nov 2021 15:44:54 -0400 From: Mark H Weaver In-Reply-To: <9dd1626d19a68eb6ff1f51d1324692c7801b1ee7.camel@ist.tugraz.at> References: <875yt9m6ye.fsf@netris.org> <871r3xlzlu.fsf@netris.org> <87lf23v7fg.fsf@netris.org> <9dd1626d19a68eb6ff1f51d1324692c7801b1ee7.camel@ist.tugraz.at> Date: Fri, 05 Nov 2021 15:42:55 -0400 Message-ID: <878ry2v15x.fsf@netris.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1636141570; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post; bh=Z9wXeSo+ApDM7EGQ50IRHZAiBChUlWCRRiPYehRRhL4=; b=oJR/jz+Q2NVswlGt4WediDr+Bjqb9CgueJo3w7E/69uZWcWblc5bebGYAYTFjgdYYQ220H XxiA+tWWZgjt7+QMP/rzEcl49ggYdLAf38TYP93xMAT/qkAq6c1nMtiy3pjL0M1E8xh2Cr XRep29QFdU/XaJoqbqpurkfI7C5UAdK5G0iAPJwI6Z8kBZhQUmNlcHJc7c7woMHNepsi3e A3MYen1kHlu52EI1GmeQv32A23ZB+cmgxbyQUGX3z5LR94VY/WINiwDLHhY6gMBGfxDKnk denCJKwB4dZ/LAPYRkAKdQ+9nO1/2hS9oLAiQLNhk74O9WzxQgl2hOkVKFimRw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1636141570; a=rsa-sha256; cv=none; b=A8OsFpzbVpq2AElL+a6wBvymt2Ha80OEn3eECEfHfFmr1b8Qc9q6LrLkpf5EPRvjtlwBl3 hkshAPNg3en3h69CWuMPHQnOI0VjBn+jO2gvVZ7pTZ01fmrMYBMvg3gTPXmY9zfI3ec6Bg 0vTi0YLQfXu8u4RTYgpA67kwNC/LYRxW9T8z1aiC87RuMv461fPNWO9c28VUTd94g3UrjG IU04yH0CODejTXkcOSuakwfziGJg/bGerNh+eiO6JWruuKvzx1rB7lhhXngydXdvtL3BBn LBB6xwaPIo4ydgLUCrpL+HPpPtxu4O0wiKc+wbw4l7ynYeh1fdn2ZRm0dJJgOA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -0.92 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: 177ADA0D6 X-Spam-Score: -0.92 X-Migadu-Scanner: scn0.migadu.com X-TUID: IDYH9ZlNvLbi --=-=-= Content-Type: text/plain Hi Liliana, Liliana Marie Prikler writes: > Am Donnerstag, den 04.11.2021, 19:15 -0400 schrieb Mark H Weaver: [...] >> A more conservative approach would be to apply a patch to >> trunk/Source/WTF/wtf/CheckedArithmetic.h analogous to the one in the >> second link I cited above, namely this one: >> >> https://trac.webkit.org/changeset/272140/webkit >> >> However, it would need to be changed slightly. The patch above >> arranges to avoid using __builtin_mul_overflow on 32-bit ARM >> systems. We would need to do the same for 32-bit x86 as well. So, >> where the patch above has this: >> >> --8<---------------cut here---------------start------------->8--- >> /* On Linux with clang, libgcc is usually used instead of compiler- >> rt, and it does >> * not provide the __mulodi4 symbol used by clang for >> __builtin_mul_overflow >> */ >> #if COMPILER(GCC) || (COMPILER(CLANG) && !(CPU(ARM) && >> OS(LINUX))) >> #define USE_MUL_OVERFLOW 1 >> #endif >> --8<---------------cut here---------------end--------------->8--- >> >> We would need to change "CPU(ARM)" to "(CPU(ARM) || CPU(XXX))", where >> XXX is the appropriate symbol for 32-bit x86. Or maybe there's >> another solution. >> >> I won't be able to look at this in the next couple of days, so >> hopefully someone else can pick this up. > The #else case doesn't look so bad on this, so we could for the time > being just do #if COMPILER(GCC) or even #if 0. I just noticed that the aforementioned patch is already applied to upstream WebKitGTK-2.34.1, so all we would need to do is change "1" to "0" in the following line on i686-linux systems: #define USE_MUL_OVERFLOW 1 I pushed the following (untested) commit to 'gnuzilla-updates' that does exactly this, and does so in such a way that rebuilds will not be needed on other systems. Hopefully I didn't make a mistake. Regards, Mark --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-UNTESTED-gnu-webkitgtk-Fix-build-on-i686-linux.patch Content-Description: [PATCH] UNTESTED: gnu: webkitgtk: Fix build on i686-linux >From 7aaedf5d77bb0e088601f15bbbed8f7835bde774 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Fri, 5 Nov 2021 15:31:07 -0400 Subject: [PATCH] UNTESTED: gnu: webkitgtk: Fix build on i686-linux. Fixes . * gnu/packages/webkit.scm (webkitgtk)[arguments]: Use quasiquote for the argument list. When building on i686-linux, insert a 'substitute*' form in the 'prepare-build-environment' phase that disables of the use of '__builtin_mul_overflow'. --- gnu/packages/webkit.scm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gnu/packages/webkit.scm b/gnu/packages/webkit.scm index e54b680855..a184cc9b32 100644 --- a/gnu/packages/webkit.scm +++ b/gnu/packages/webkit.scm @@ -241,7 +241,7 @@ acceleration in mind, leveraging common 3D graphics APIs for best performance.") (build-system cmake-build-system) (outputs '("out" "doc")) (arguments - '(#:tests? #f ; no tests + `(#:tests? #f ; no tests #:build-type "Release" ; turn off debugging symbols to save space #:configure-flags (list "-DPORT=GTK" @@ -299,6 +299,13 @@ acceleration in mind, leveraging common 3D graphics APIs for best performance.") (lambda* (#:key inputs #:allow-other-keys) (setenv "CC" "clang") (setenv "CXX" "clang++") + ;; XXX Until we switch back to using GCC, + ;; work around . + ,@(if (string=? "i686-linux" (%current-system)) + '((substitute* "Source/WTF/wtf/CheckedArithmetic.h" + (("#define USE_MUL_OVERFLOW 1") + "#define USE_MUL_OVERFLOW 0"))) + '()) #t)) (add-after 'install 'move-doc-files (lambda* (#:key outputs #:allow-other-keys) -- 2.31.1 --=-=-= Content-Type: text/plain -- Disinformation flourishes because many people care deeply about injustice but very few check the facts. Ask me about . --=-=-=--