all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#62861] [PATCH v1] gnu: ghc-basement: fix build for i686
@ 2023-04-15 13:59 Denis 'GNUtoo' Carikli
  2023-05-10 17:34 ` [bug#62861] [PATCH v1] gnu: fakeroot: Update to 1.31 Denis 'GNUtoo' Carikli
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Denis 'GNUtoo' Carikli @ 2023-04-15 13:59 UTC (permalink / raw)
  To: 62861; +Cc: Denis 'GNUtoo' Carikli

* 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





^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [bug#62861] [PATCH v1] gnu: fakeroot: Update to 1.31.
  2023-04-15 13:59 [bug#62861] [PATCH v1] gnu: ghc-basement: fix build for i686 Denis 'GNUtoo' Carikli
@ 2023-05-10 17:34 ` Denis 'GNUtoo' Carikli
  2023-05-16 14:13 ` [bug#62861] [PATCH v1] gnu: ghc-basement: fix build for i686 zimoun
  2024-08-18 20:44 ` bug#62861: " Ludovic Courtès
  2 siblings, 0 replies; 5+ messages in thread
From: Denis 'GNUtoo' Carikli @ 2023-05-10 17:34 UTC (permalink / raw)
  To: Lars-Dominik Braun, 62861; +Cc: Denis 'GNUtoo' Carikli

* gnu/packages/linux.scm (fakeroot): Update to 1.31.
---
 gnu/packages/linux.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index ea64e9d241..aa3705c643 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -8986,7 +8986,7 @@ (define-public genext2fs
 (define-public fakeroot
   (package
     (name "fakeroot")
-    (version "1.30.1")
+    (version "1.31")
     (source
      (origin
        ;; There are no tags in the repository, so take this snapshot.
@@ -8995,7 +8995,7 @@ (define-public fakeroot
                            "fakeroot/fakeroot_" version ".orig.tar.gz"))
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
-        (base32 "0xba5gfh7ygv6na8n1ckqd2jnpdr9q88qan385qxp85c47sb3srj"))
+        (base32 "0br0gvvribfs2kpkhwr51lsinhl6l36334wx1cbwfmhww50nv233"))
        (modules '((guix build utils)
                   (ice-9 ftw)))
        (snippet

base-commit: e0c35d1578c10a8fe27c8372f3a8bb5dd88b01b8
-- 
2.39.2





^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [bug#62861] [PATCH v1] gnu: ghc-basement: fix build for i686
  2023-04-15 13:59 [bug#62861] [PATCH v1] gnu: ghc-basement: fix build for i686 Denis 'GNUtoo' Carikli
  2023-05-10 17:34 ` [bug#62861] [PATCH v1] gnu: fakeroot: Update to 1.31 Denis 'GNUtoo' Carikli
@ 2023-05-16 14:13 ` zimoun
  2023-05-17 23:14   ` Denis 'GNUtoo' Carikli
  2024-08-18 20:44 ` bug#62861: " Ludovic Courtès
  2 siblings, 1 reply; 5+ messages in thread
From: zimoun @ 2023-05-16 14:13 UTC (permalink / raw)
  To: Denis 'GNUtoo' Carikli; +Cc: 62861

Hi Denis,

This submission #62861 [1] contains two patches.  Are they part of the
same series?

1: http://issues.guix.gnu.org/issue/62861


On Sat, 15 Apr 2023 at 15:59, Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> wrote:
> * 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

Well, is this already part of some Haskell updates?


On Wed, 10 May 2023 at 19:34, Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> wrote:
> * gnu/packages/linux.scm (fakeroot): Update to 1.31.
> ---
>  gnu/packages/linux.scm | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

I have not tried it yet but LGTM at first.


Cheers,
simon




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [bug#62861] [PATCH v1] gnu: ghc-basement: fix build for i686
  2023-05-16 14:13 ` [bug#62861] [PATCH v1] gnu: ghc-basement: fix build for i686 zimoun
@ 2023-05-17 23:14   ` Denis 'GNUtoo' Carikli
  0 siblings, 0 replies; 5+ messages in thread
From: Denis 'GNUtoo' Carikli @ 2023-05-17 23:14 UTC (permalink / raw)
  To: zimoun; +Cc: 62861

[-- Attachment #1: Type: text/plain, Size: 1742 bytes --]

On Tue, 16 May 2023 16:13:02 +0200
zimoun <zimon.toutoune@gmail.com> wrote:

> Hi Denis,
Hi,

> This submission #62861 [1] contains two patches.  Are they part of the
> same series?
Ah my bad. Sorry about that.

I don't remember why they were together in the same serie. Maybe it's a
mistake as I probably intended to add 2 Haskell related patches in
the same serie instead.

> 1: http://issues.guix.gnu.org/issue/62861
> 
> 
> On Sat, 15 Apr 2023 at 15:59, Denis 'GNUtoo' Carikli
> <GNUtoo@cyberdimension.org> wrote:
> > * 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
> 
> Well, is this already part of some Haskell updates?
I didn't see that patch or something similar somewhere else but I could
also have missed it. I only looked in the bugreport system. I also
based my patches on top of master.

Does the Haskell team has special rules? Like do I need to rebase my
patches on specific branches in the future? 

If the development is done there, it could be a good idea to formalize
that (if it's not already formalized) as it would help making sure not
to duplicate work, or at least lower the burden on the reviewers as
duplicated work would not be sent for review. Linux does that for
some subsystems.

Denis.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#62861: [PATCH v1] gnu: ghc-basement: fix build for i686
  2023-04-15 13:59 [bug#62861] [PATCH v1] gnu: ghc-basement: fix build for i686 Denis 'GNUtoo' Carikli
  2023-05-10 17:34 ` [bug#62861] [PATCH v1] gnu: fakeroot: Update to 1.31 Denis 'GNUtoo' Carikli
  2023-05-16 14:13 ` [bug#62861] [PATCH v1] gnu: ghc-basement: fix build for i686 zimoun
@ 2024-08-18 20:44 ` Ludovic Courtès
  2 siblings, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2024-08-18 20:44 UTC (permalink / raw)
  To: Denis 'GNUtoo' Carikli; +Cc: 62861-done

Hi GNUtoo,

Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> skribis:

> * 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):

It’s been a long while…  I was looking into it on ‘core-updates’ and
stumbled upon your patch.  I pushed something similar, change in a way
that avoids a rebuild on 64-bit platforms (commit
1a30e510464f5d3232f80007328b9af4dd90c6d4).

Thanks,
Ludo’.




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-08-18 20:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-15 13:59 [bug#62861] [PATCH v1] gnu: ghc-basement: fix build for i686 Denis 'GNUtoo' Carikli
2023-05-10 17:34 ` [bug#62861] [PATCH v1] gnu: fakeroot: Update to 1.31 Denis 'GNUtoo' Carikli
2023-05-16 14:13 ` [bug#62861] [PATCH v1] gnu: ghc-basement: fix build for i686 zimoun
2023-05-17 23:14   ` Denis 'GNUtoo' Carikli
2024-08-18 20:44 ` bug#62861: " Ludovic Courtès

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.