From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id eHr/Fz9qhGGUGAAAgWs5BA (envelope-from ) for ; Fri, 05 Nov 2021 00:18:23 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id cAqfEz9qhGGEXgAAB5/wlQ (envelope-from ) for ; Thu, 04 Nov 2021 23:18:23 +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 DA1282A143 for ; Fri, 5 Nov 2021 00:18:22 +0100 (CET) Received: from localhost ([::1]:38710 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1milzy-0002Xh-2p for larch@yhetil.org; Thu, 04 Nov 2021 19:18:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54474) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1milze-0002XY-4H for bug-guix@gnu.org; Thu, 04 Nov 2021 19:18:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60565) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1milzd-0002Fd-S3 for bug-guix@gnu.org; Thu, 04 Nov 2021 19:18:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1milzd-0006VT-O8 for bug-guix@gnu.org; Thu, 04 Nov 2021 19:18:01 -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: Thu, 04 Nov 2021 23:18:01 +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.163606784824967 (code B ref 51591); Thu, 04 Nov 2021 23:18:01 +0000 Received: (at 51591) by debbugs.gnu.org; 4 Nov 2021 23:17:28 +0000 Received: from localhost ([127.0.0.1]:43878 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1milz6-0006Ud-6d for submit@debbugs.gnu.org; Thu, 04 Nov 2021 19:17:28 -0400 Received: from world.peace.net ([64.112.178.59]:59708) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1milz4-0006UM-QC for 51591@debbugs.gnu.org; Thu, 04 Nov 2021 19:17:27 -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 1milyy-0000vD-7T; Thu, 04 Nov 2021 19:17:20 -0400 From: Mark H Weaver In-Reply-To: References: <875yt9m6ye.fsf@netris.org> <871r3xlzlu.fsf@netris.org> Date: Thu, 04 Nov 2021 19:15:20 -0400 Message-ID: <87lf23v7fg.fsf@netris.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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=1636067903; 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: content-transfer-encoding:content-transfer-encoding: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=gjdVc227hkUHsiJo8xplxlIqSd5lMEhXmK5/lMg/ggo=; b=sq1H3q4StJ0fjrm5Eez9n5IzGtvelHnKhBHhGKi2qwCPdMX3Rzq643pqGzYWrhvFNTLRLb 8zN0OisuU65BPXSIfxoT7Di0j9US019Hrqy4xwE+GTnmp43LpnQ0IIaEca5wvMCg6eZhP4 Q8H8zktzSDq69KKyrtRlOBPxizahF6gwYaor8fx+R2XXyGMSI3DXktcfnm2w4M45raKjYl BLp4VYCrH3Q2DOLCyM6xUs2q/Hy1FuFVDBKGjAUgpE3W3cvCfj0zH975kmWRQVNqcHp4Dp 5xQ/2N/zJS2gA1ZvzoNUaAEEWEznV3ZAwvzjWPTcq8svRZ0qeqqq86VdNzSSsg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1636067903; a=rsa-sha256; cv=none; b=TT1RB4VJm0Ky88tpyRMMjQlc3eWTldLn5X96c3R39PQrkThd1TI2NCLMAgmMrw1kY7haKJ LQkondXfytZrEDZmNkGuvRt3wxiS/z236rIGo4cXX5ObxOWQp6pmHK+kDgQIti7CJBkK9q bWXlrQVKdVT+oVwVGmMCHuzyhnkK5+DXJe8pxprs5U91ZuuIMEKI27+4Zsy/9JLDh6KOta pT0cyE0NOCnghrKk7XKdbMVlYFtZiowDLdamRhdbccZtb4Bs4be1IY1Zufayz4Z4L5JRkA X8u40UuRY7/GqsYpbMik3o2hKwxnWTlh3oq6cM9/+fTmX9hjFTX6Hrs8y/E5sg== 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: -2.42 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: DA1282A143 X-Spam-Score: -2.42 X-Migadu-Scanner: scn0.migadu.com X-TUID: 3CFG4kB5PDAd Liliana Marie Prikler writes: > Am Mittwoch, den 03.11.2021, 17:04 -0400 schrieb Mark H Weaver: >> Earlier, I wrote: >> > libwebkit2gtk-4.0.so fails to link on i686-linux, due to an >> > undefined reference to '__mulodi4'. >>=20 >> Here are some relevant links: >>=20 >> https://bugs.webkit.org/show_bug.cgi?id=3D190208 >> https://trac.webkit.org/changeset/272140/webkit >> https://github.com/android/ndk/issues/506 > This error does not occur when compiling with GCC [1]. Right. As mentioned in the first link above: "This is because clang generates code using the __mulodi4 symbol for __builtin_mul_overflow. But this symbol is available only in compiler-rt, and not in the libgcc runtime used by most Linux distributions of clang." So, one possible solution might be to link with compiler-rt, which is the 'clang-runtime-11' package in Guix. However, it's possible that this might cause other complications. 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=20=20=20=20 * not provide the __mulodi4 symbol used by clang for __builtin_mul_overflo= w=20=20=20=20 */=20=20=20=20 #if COMPILER(GCC) || (COMPILER(CLANG) && !(CPU(ARM) && OS(LINUX)))=20=20=20= =20 #define USE_MUL_OVERFLOW 1=20=20=20=20 #endif=20=20=20=20 --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. > However, now dependant packages fail to link Webkit [2]. We might have > to add GCC 11 to all of them -- or at least to a fair number. I've > verified that gnome-online-accounts builds with GCC 11 added, we might > want to make sure we check the rest of the gnome package as well. I'm not sure about this approach. Maybe it's feasible, but there might be problems if *any* C++ library built using GCC 7 is linked together with WebKitGTK. > On that note, which GCC will be the standard once core-updates-frozen > is merged? If it's not GCC 11 =E2=80=93 say GCC 10 =E2=80=93 we might wa= nt to try to > get Webkit building with that instead, so that at least after the merge > we're clean on that front. The standard compiler on 'core-updates-frozen' is GCC 10. As I wrote elsewhere, I think it's quite likely that these workarounds will not be needed on 'core-updates-frozen'. >> Also, I just noticed that "-mfpmath=3Dsse -msse2" is being passed on >> the compile command line. Historically, we've chosen not to assume >> the availability of SSE or SSE2 on i686-linux, so it would be good to >> inhibit those flags. > This is still true for the GCC build. Could you add the necessary > flags to disable them? I don't know when I'll be able to look into it. It's a busy time for me. Regards, Mark --=20 Disinformation flourishes because many people care deeply about injustice but very few check the facts. Ask me about .