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 2JBvJ6zmhGGeGQEAgWs5BA (envelope-from ) for ; Fri, 05 Nov 2021 09:09:16 +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 yNkhI6zmhGFuQQAAB5/wlQ (envelope-from ) for ; Fri, 05 Nov 2021 08:09:16 +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 F23E59CFF for ; Fri, 5 Nov 2021 09:09:15 +0100 (CET) Received: from localhost ([::1]:58930 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1miuHj-0005bf-3u for larch@yhetil.org; Fri, 05 Nov 2021 04:09:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39832) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1miuHX-0005ZI-7b for bug-guix@gnu.org; Fri, 05 Nov 2021 04:09:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33226) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1miuHW-0007rI-VS for bug-guix@gnu.org; Fri, 05 Nov 2021 04:09:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1miuHW-00021j-HK for bug-guix@gnu.org; Fri, 05 Nov 2021 04:09:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#51591: webkitgtk fails to build on i686-linux; possibly a clang issue Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 05 Nov 2021 08:09: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: Mark H Weaver , 51591@debbugs.gnu.org Received: via spool by 51591-submit@debbugs.gnu.org id=B51591.16360996947730 (code B ref 51591); Fri, 05 Nov 2021 08:09:02 +0000 Received: (at 51591) by debbugs.gnu.org; 5 Nov 2021 08:08:14 +0000 Received: from localhost ([127.0.0.1]:44772 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1miuGj-00020c-Ou for submit@debbugs.gnu.org; Fri, 05 Nov 2021 04:08:14 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:28897) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1miuGg-00020Q-UJ for 51591@debbugs.gnu.org; Fri, 05 Nov 2021 04:08:12 -0400 Received: from lprikler-laptop.ist.intra (gw.ist.tugraz.at [129.27.202.101]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4HltRV3RK1z1LZWS; Fri, 5 Nov 2021 09:08:06 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 mailrelay.tugraz.at 4HltRV3RK1z1LZWS DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1636099686; bh=6u4GKZ4+UQyMFKyOvZj7LfjuZqHvu48/UyfShYOg/To=; h=Subject:From:To:Date:In-Reply-To:References:From; b=MNsjNDIU4DHI0JQEB1iCu7h0Vi7pmnvFnmZbubYGMxOmdqZu8d/e9JYVCSRnHBTHz njJdPLrIxOr7oIDV7SNi0peu6nqgQc1kzWYq314szu6YElUMLIZX4CwLuH4cXChyPk 17hVBwThcVudC2SbyNJSmOzVVWqqpZt8Qe7j7nlU= Message-ID: <9dd1626d19a68eb6ff1f51d1324692c7801b1ee7.camel@ist.tugraz.at> From: Liliana Marie Prikler Date: Fri, 05 Nov 2021 09:08:05 +0100 In-Reply-To: <87lf23v7fg.fsf@netris.org> References: <875yt9m6ye.fsf@netris.org> <871r3xlzlu.fsf@netris.org> <87lf23v7fg.fsf@netris.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-TUG-Backscatter-control: waObeELIUl4ypBWmcn/8wQ X-Scanned-By: MIMEDefang 2.74 on 129.27.10.116 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=1636099756; 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:dkim-signature; bh=6u4GKZ4+UQyMFKyOvZj7LfjuZqHvu48/UyfShYOg/To=; b=DqgVTGbXLQJmYHQmw7eJqqBiDeqabIMbH4jn0On6gAr9FP4c//petoy8pZVjloSQopMyXh I1DbaIpCPuv/y1H33Yo900DSuyBJbi0GIcWKGQonIfYBHaQQ8aFv0KIosKr07kMSkM4KgS tas57ZuWzSZ5FKKphtu7yd+M0XQWhnEt4hleUVTp5pDG69+Ae4AvTLtAMFzv9xU2aXq8iS OcOlNQxjSn4QIqrTzSxdiXiuLhGLuJ6Z4mHZcfHhrnHgMmhPZrMeaXYWvzuD8lvNfqOJJN ckEr9SV6d5FWcwU4oy45F30oTNl8SQNAuno/RQCGPDbHy/QlW7plsgahsyagjg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1636099756; a=rsa-sha256; cv=none; b=tZWkH15uyp1EhqViNKsq6Zv3tkKkbXN/5AsYuEPJq1WrsiKh1h74J/O8KA8VpNFGVthCAp VbKBeC8Uc2L/xXKuARttW6dHPJqyGnyFYpdX5vE1UIOWvXGyF/rfH6QAfX5G3oMWGRr7y4 sJ9kSl16DMHGoEbon0V+nUGnA1m9KQYPyMFvVaGw+PxFSW64dDNCARc9Vzn1xuy1bJKkyR SBmTWUipPBBUBNh6t/N9gWwm3Jk8WMtPrrGnbjOGqKP1lAE+JBXIg5mvQRpnLXouMwQ3pi edGtocyxgTc9DFh2CUmLB5lYQsytSqB+0k3AqywooQ9vl6dqmXpkmRsKbWnVDw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tugraz.at header.s=mailrelay header.b=MNsjNDIU; dmarc=fail reason="SPF not aligned (relaxed)" header.from=tugraz.at (policy=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: -1.32 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tugraz.at header.s=mailrelay header.b=MNsjNDIU; dmarc=fail reason="SPF not aligned (relaxed)" header.from=tugraz.at (policy=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: F23E59CFF X-Spam-Score: -1.32 X-Migadu-Scanner: scn0.migadu.com X-TUID: qOQIUEO//Pyd Hi, Am Donnerstag, den 04.11.2021, 19:15 -0400 schrieb Mark H Weaver: > 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'. > > > > > > Here are some relevant links: > > > > > > https://bugs.webkit.org/show_bug.cgi?id=190208 > > > 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. I think the overhead might be comparable to using GCC 10 everywhere Webkit is linked. > 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. > > 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. Given that GTK is mostly a plain C land, I don't think too many C++ libraries are actually linked against it, perhaps stuff built on top of glibmm might get the same treatment. > > > Also, I just noticed that "-mfpmath=sse -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. I did some static code analysis and it seems we could comment out the line CHECK_FOR_SSE2() in Source/cmake/DetectSSE2.cmake. In my personal opinion, we should probably do so on all platforms. Cheers