From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id qEAANfKtOmSjAQAASxT56A (envelope-from ) for ; Sat, 15 Apr 2023 16:00:18 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id eJsNNPKtOmQPHQEAG6o9tA (envelope-from ) for ; Sat, 15 Apr 2023 16:00:18 +0200 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 4E928229F3 for ; Sat, 15 Apr 2023 16:00:18 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pngRh-0001CS-7C; Sat, 15 Apr 2023 10:00:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pngRf-0001CF-0p for guix-patches@gnu.org; Sat, 15 Apr 2023 10:00:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pngRe-0005CW-N6 for guix-patches@gnu.org; Sat, 15 Apr 2023 10:00:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pngRe-0001Yg-AH for guix-patches@gnu.org; Sat, 15 Apr 2023 10:00:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62861] [PATCH v1] gnu: ghc-basement: fix build for i686 Resent-From: Denis 'GNUtoo' Carikli Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 15 Apr 2023 14:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 62861 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62861@debbugs.gnu.org Cc: Denis 'GNUtoo' Carikli X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16815671955943 (code B ref -1); Sat, 15 Apr 2023 14:00:02 +0000 Received: (at submit) by debbugs.gnu.org; 15 Apr 2023 13:59:55 +0000 Received: from localhost ([127.0.0.1]:49910 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pngRX-0001Xm-3G for submit@debbugs.gnu.org; Sat, 15 Apr 2023 09:59:55 -0400 Received: from lists.gnu.org ([209.51.188.17]:40596) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pngRU-0001Xe-BR for submit@debbugs.gnu.org; Sat, 15 Apr 2023 09:59:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pngRT-0001Av-VF for guix-patches@gnu.org; Sat, 15 Apr 2023 09:59:51 -0400 Received: from cyberdimension.org ([2001:910:1314:ffff::1] helo=gnutoo.cyberdimension.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1pngRR-00057I-O4 for guix-patches@gnu.org; Sat, 15 Apr 2023 09:59:51 -0400 Received: from gnutoo.cyberdimension.org (localhost [127.0.0.1]) by cyberdimension.org (OpenSMTPD) with ESMTP id 208af0e0; Sat, 15 Apr 2023 13:59:44 +0000 (UTC) Received: from localhost.localdomain (localhost [::1]) by gnutoo.cyberdimension.org (OpenSMTPD) with ESMTP id 7ec67378; Sat, 15 Apr 2023 13:59:44 +0000 (UTC) From: Denis 'GNUtoo' Carikli Date: Sat, 15 Apr 2023 15:59:21 +0200 Message-Id: <20230415135921.1266-1-GNUtoo@cyberdimension.org> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2001:910:1314:ffff::1; envelope-from=GNUtoo@cyberdimension.org; helo=gnutoo.cyberdimension.org X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1681567218; a=rsa-sha256; cv=none; b=WFKCzz4gPJybk2AhbajxzfiaDM1fTcUv8TZzVR09ugAS/1y5jS+8mnZq0uLyvUKvorgZg+ UwrXFDMBwGhKtBY6FuItiR8fSs2ZN9rLJHhcDRnkrfHQ7hi/0dIw+xfJdr/TM72AD9rT21 hZoBTK3grhvcLd++kn1uAn9f1lHrHq1scS++jxNKI1hgkC9V3YpVX4YCvy85+YUTaTYlR7 gQFsBdcEfbvh3+s4lRnFTtxHvrNfCwrviHl24rQIXRoewW8Z+oLwqSA4O1pwBij43z/XKC AbVVyxJAXYmvmNjcU+3qmOhZn7LRQkY1uTwvz/uZi4+tYTC+khwQbNGTKbqb1g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1681567218; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=ASWONpi+aA4zeS73MEo53UFN4WGoyqit7K8vTmfdINs=; b=NfHySrevhVpSzw82AxloRgTlt3ht1Yf1R9raPC/CCGrKa6OBRhMh8kJd2caP+30zcKR8X4 Qk903XU6AuBEWAma6Ww/4qqETw8eeXaUIHFVf6lTW8aiKuBNjsf90Js4YygX6pvGBtT9Vx Lft0nXPLGL3PZNddKkG1M8To7LS1GqqNe/aTgxHj0zQMX3LMleqbsfGXXU6QTgBd1ltk2v hbrEoCFdzdvgGQMht8QRb2V8ghhDJJyhn9b9o7/Wdv1bOYFDjI1OorgEkv7bs7DKXtvEXu RbLF6WmdUzdlK0Hy177oQs0lEhrIyl9BAZ9St5FjvAVL2pJ3cyv/xyJQ/RGa6g== X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -1.92 X-Spam-Score: -1.92 X-Migadu-Queue-Id: 4E928229F3 Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none X-TUID: mo3Zdvxo8Czs * gnu/packages/haskell-xyz.scm (ghc-basement): [source]: Add patch. * gnu/packages/patches/ghc-basement-0.0.15-i686-fix.patch: New file. * gnu/local.mk (dist_patch_DATA): --- gnu/local.mk | 1 + gnu/packages/haskell-xyz.scm | 3 +- .../ghc-basement-0.0.15-i686-fix.patch | 113 ++++++++++++++++++ 3 files changed, 116 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/ghc-basement-0.0.15-i686-fix.patch diff --git a/gnu/local.mk b/gnu/local.mk index f0a228f19f..268ce7cc7f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1212,6 +1212,7 @@ dist_patch_DATA = \ %D%/packages/patches/ghc-bloomfilter-ghc9.2.patch \ %D%/packages/patches/ghc-bytestring-handle-ghc9.patch \ %D%/packages/patches/ghc-language-haskell-extract-ghc-8.10.patch \ + %D%/packages/patches/ghc-basement-0.0.15-i686-fix.patch \ %D%/packages/patches/ghostscript-no-header-id.patch \ %D%/packages/patches/ghostscript-no-header-uuid.patch \ %D%/packages/patches/ghostscript-no-header-creationdate.patch \ diff --git a/gnu/packages/haskell-xyz.scm b/gnu/packages/haskell-xyz.scm index f2cc60267b..1dfa627965 100644 --- a/gnu/packages/haskell-xyz.scm +++ b/gnu/packages/haskell-xyz.scm @@ -778,7 +778,8 @@ (define-public ghc-basement (uri (hackage-uri "basement" version)) (sha256 (base32 - "1d2xj5dmjps7nc7rwp5s0kyjcg9v8xfql6ik4yk1d3affnvazhjn")))) + "1d2xj5dmjps7nc7rwp5s0kyjcg9v8xfql6ik4yk1d3affnvazhjn")) + (patches (search-patches "ghc-basement-0.0.15-i686-fix.patch")))) (build-system haskell-build-system) (properties '((upstream-name . "basement"))) (home-page "https://github.com/haskell-foundation/foundation#readme") diff --git a/gnu/packages/patches/ghc-basement-0.0.15-i686-fix.patch b/gnu/packages/patches/ghc-basement-0.0.15-i686-fix.patch new file mode 100644 index 0000000000..129af90eac --- /dev/null +++ b/gnu/packages/patches/ghc-basement-0.0.15-i686-fix.patch @@ -0,0 +1,113 @@ +Description: Fix build on i686. + Note that this patch hasn't been applied upstream yet. + The patch author intends to add it to Fedora 38: + "I am going to try to apply this for Fedora 38.". +Origin: https://github.com/haskell-foundation/foundation/issues/565#issuecomment-1433140571 +Bug: https://github.com/haskell-foundation/foundation/issues/565 +Author: Jens Petersen (juhp) +--- +diff -up basement-0.0.15/Basement/Bits.hs~ basement-0.0.15/Basement/Bits.hs +--- basement-0.0.15/Basement/Bits.hs~ 2022-02-28 12:00:48.000000000 +0800 ++++ basement-0.0.15/Basement/Bits.hs 2023-02-16 18:50:32.947378064 +0800 +@@ -54,7 +54,7 @@ import GHC.Int + import Basement.Compat.Primitive + + #if WORD_SIZE_IN_BITS < 64 +-import GHC.IntWord64 ++import GHC.Exts + #endif + + -- | operation over finite bits +diff -up basement-0.0.15/Basement/Numerical/Additive.hs~ basement-0.0.15/Basement/Numerical/Additive.hs +--- basement-0.0.15/Basement/Numerical/Additive.hs~ 2022-02-28 12:00:48.000000000 +0800 ++++ basement-0.0.15/Basement/Numerical/Additive.hs 2023-02-16 18:52:14.547975419 +0800 +@@ -29,7 +29,7 @@ import qualified Basement.Types.Word128 + import qualified Basement.Types.Word256 as Word256 + + #if WORD_SIZE_IN_BITS < 64 +-import GHC.IntWord64 ++import GHC.Exts + #endif + + -- | Represent class of things that can be added together, +diff -up basement-0.0.15/Basement/Numerical/Conversion.hs~ basement-0.0.15/Basement/Numerical/Conversion.hs +--- basement-0.0.15/Basement/Numerical/Conversion.hs~ 2022-02-28 12:00:48.000000000 +0800 ++++ basement-0.0.15/Basement/Numerical/Conversion.hs 2023-02-16 18:28:38.844400110 +0800 +@@ -25,7 +25,7 @@ import GHC.Word + import Basement.Compat.Primitive + + #if WORD_SIZE_IN_BITS < 64 +-import GHC.IntWord64 ++import GHC.Exts + #endif + + intToInt64 :: Int -> Int64 +@@ -114,7 +114,7 @@ + #endif + #else + word64ToWord32s :: Word64 -> Word32x2 +-word64ToWord32s (W64# w64) = Word32x2 (W32# (word64ToWord# (uncheckedShiftRL64# w64 32#))) (W32# (word64ToWord# w64)) ++word64ToWord32s (W64# w64) = Word32x2 (W32# (wordToWord32# (word64ToWord# (uncheckedShiftRL64# w64 32#)))) (W32# (wordToWord32# (word64ToWord# w64))) + #endif + + wordToChar :: Word -> Char +diff -up basement-0.0.15/Basement/PrimType.hs~ basement-0.0.15/Basement/PrimType.hs +--- basement-0.0.15/Basement/PrimType.hs~ 2022-03-03 10:51:42.000000000 +0800 ++++ basement-0.0.15/Basement/PrimType.hs 2023-02-16 18:52:13.884971521 +0800 +@@ -54,7 +54,7 @@ import Basement.Nat + import qualified Prelude (quot) + + #if WORD_SIZE_IN_BITS < 64 +-import GHC.IntWord64 ++import GHC.Exts + #endif + + #ifdef FOUNDATION_BOUNDS_CHECK +diff -up basement-0.0.15/Basement/Types/OffsetSize.hs~ basement-0.0.15/Basement/Types/OffsetSize.hs +--- basement-0.0.15/Basement/Types/OffsetSize.hs~ 2019-09-02 11:58:08.000000000 +0800 ++++ basement-0.0.15/Basement/Types/OffsetSize.hs 2023-02-16 18:49:45.703100306 +0800 +@@ -69,7 +69,7 @@ import Data.List (foldl') + import qualified Prelude + + #if WORD_SIZE_IN_BITS < 64 +-import GHC.IntWord64 ++import GHC.Exts + #endif + + -- | File size in bytes +@@ -225,7 +225,7 @@ + + csizeOfSize :: CountOf Word8 -> CSize + #if WORD_SIZE_IN_BITS < 64 +-csizeOfSize (CountOf (I# sz)) = CSize (W32# (int2Word# sz)) ++csizeOfSize (CountOf (I# sz)) = CSize (W32# (wordToWord32# (int2Word# sz))) + #else + #if __GLASGOW_HASKELL__ >= 904 + csizeOfSize (CountOf (I# sz)) = CSize (W64# (wordToWord64# (int2Word# sz))) +@@ -238,7 +238,7 @@ + + csizeOfOffset :: Offset8 -> CSize + #if WORD_SIZE_IN_BITS < 64 +-csizeOfOffset (Offset (I# sz)) = CSize (W32# (int2Word# sz)) ++csizeOfOffset (Offset (I# sz)) = CSize (W32# (wordToWord32# (int2Word# sz))) + #else + #if __GLASGOW_HASKELL__ >= 904 + csizeOfOffset (Offset (I# sz)) = CSize (W64# (wordToWord64# (int2Word# sz))) +@@ -250,7 +250,7 @@ + sizeOfCSSize :: CSsize -> CountOf Word8 + sizeOfCSSize (CSsize (-1)) = error "invalid size: CSSize is -1" + #if WORD_SIZE_IN_BITS < 64 +-sizeOfCSSize (CSsize (I32# sz)) = CountOf (I# sz) ++sizeOfCSSize (CSsize (I32# sz)) = CountOf (I# (int32ToInt# sz)) + #else + #if __GLASGOW_HASKELL__ >= 904 + sizeOfCSSize (CSsize (I64# sz)) = CountOf (I# (int64ToInt# sz)) +@@ -261,7 +261,7 @@ + + sizeOfCSize :: CSize -> CountOf Word8 + #if WORD_SIZE_IN_BITS < 64 +-sizeOfCSize (CSize (W32# sz)) = CountOf (I# (word2Int# sz)) ++sizeOfCSize (CSize (W32# sz)) = CountOf (I# (word2Int# (word32ToWord# sz))) + #else + #if __GLASGOW_HASKELL__ >= 904 + sizeOfCSize (CSize (W64# sz)) = CountOf (I# (word2Int# (word64ToWord# sz))) base-commit: a4e9842a70775a54bbe1369881b739e7ea9a6432 -- 2.39.1