GNU bug report logs - #63206
[PATCH] gnu: gnushogi: Fix build.

Previous Next

Package: guix-patches;

Reported by: gemmaro <gemmaro.dev <at> gmail.com>

Date: Mon, 1 May 2023 14:49:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 63206 in the body.
You can then email your comments to 63206 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#63206; Package guix-patches. (Mon, 01 May 2023 14:49:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to gemmaro <gemmaro.dev <at> gmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 01 May 2023 14:49:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: gemmaro <gemmaro.dev <at> gmail.com>
To: guix-patches <at> gnu.org
Cc: gemmaro <gemmaro.dev <at> gmail.com>
Subject: [PATCH] gnu: gnushogi: Fix build.
Date: Mon,  1 May 2023 23:47:59 +0900
Hello,

This patch fixes GNU Shogi build.

Since the build is now successful, the actual gnushogi executable and
documents are installed in addition to the COPYING file.

Thanks,
gemmaro.

* gnu/packages/games.scm (gnushogi): Set linker flag to build program.
---
 gnu/packages/games.scm | 42 +++++++++++++++++++++++++-----------------
 1 file changed, 25 insertions(+), 17 deletions(-)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 3391c141e42..a36e2fe55bf 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -76,6 +76,7 @@
 ;;; Copyright © 2022 Hendursaga <hendursaga <at> aol.com>
 ;;; Copyright © 2022 Parnikkapore <poomklao <at> yahoo.com>
 ;;; Copyright © 2023 Zheng Junjie <873216071 <at> qq.com>
+;;; Copyright © 2023 gemmaro <gemmaro.dev <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2012,24 +2013,31 @@ (define-public gnubik
     (license license:gpl3+)))
 
 (define-public gnushogi
-  (package
-    (name "gnushogi")
-    (version "1.4.2")
-    (source
-     (origin
-      (method url-fetch)
-      (uri (string-append "mirror://gnu/gnushogi/gnushogi-"
-                          version ".tar.gz"))
-      (sha256
-       (base32
-        "0a9bsl2nbnb138lq0h14jfc5xvz7hpb2bcsj4mjn6g1hcsl4ik0y"))))
-    (arguments `(#:tests? #f)) ;; No check target.
-    (build-system gnu-build-system)
-    (home-page "https://www.gnu.org/software/gnushogi/")
-    (synopsis "The game of Shogi (Japanese chess)")
-    (description  "GNU Shogi is a program that plays the game Shogi (Japanese
+  (let ((ver "1.4.2")
+        (revision "2"))
+    (package
+      (name "gnushogi")
+      (version (string-append ver "-" revision))
+      (source (origin
+                (method url-fetch)
+                (uri (string-append "mirror://gnu/gnushogi/gnushogi-" ver
+                                    ".tar.gz"))
+                (sha256
+                 (base32
+                  "0a9bsl2nbnb138lq0h14jfc5xvz7hpb2bcsj4mjn6g1hcsl4ik0y"))))
+      (arguments
+       `(#:phases (modify-phases %standard-phases
+                    (add-before 'configure 'set-linker-flag
+                      (lambda _
+                        (setenv "LDFLAGS" "-z muldefs"))))
+         #:tests? #f)) ;No check target.
+      (build-system gnu-build-system)
+      (home-page "https://www.gnu.org/software/gnushogi/")
+      (synopsis "The game of Shogi (Japanese chess)")
+      (description
+       "GNU Shogi is a program that plays the game Shogi (Japanese
 Chess).  It is similar to standard chess but this variant is far more complicated.")
-    (license license:gpl3+)))
+      (license license:gpl3+))))
 
 (define-public ltris
   (package

base-commit: 0c6a7e1045cbd06336ef3699734a803a2e4038e5
-- 
2.39.2





Information forwarded to liliana.prikler <at> gmail.com, guix-patches <at> gnu.org:
bug#63206; Package guix-patches. (Wed, 03 May 2023 02:47:02 GMT) Full text and rfc822 format available.

Message #8 received at 63206 <at> debbugs.gnu.org (full text, mbox):

From: gemmaro <gemmaro.dev <at> gmail.com>
To: 63206 <at> debbugs.gnu.org
Subject: [bug#63206] [PATCH] gnu: gnushogi: Fix build.
Date: Wed, 03 May 2023 11:46:21 +0900
Hello Games and Toys team,

I'm sorry.  I should have added X-Debbugs-Cc to mention, since this
patch is about games.scm.

Regards,
gemmaro.




Information forwarded to guix-patches <at> gnu.org:
bug#63206; Package guix-patches. (Thu, 04 May 2023 04:30:03 GMT) Full text and rfc822 format available.

Message #11 received at 63206 <at> debbugs.gnu.org (full text, mbox):

From: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
To: gemmaro <gemmaro.dev <at> gmail.com>, 63206 <at> debbugs.gnu.org
Subject: Re: [PATCH] gnu: gnushogi: Fix build.
Date: Thu, 04 May 2023 06:28:55 +0200
Hi gemmaro,

Am Montag, dem 01.05.2023 um 23:47 +0900 schrieb gemmaro:
> Hello,
> 
> This patch fixes GNU Shogi build.
> 
> Since the build is now successful, the actual gnushogi executable and
> documents are installed in addition to the COPYING file.
> 
> Thanks,
> gemmaro.
When embedding letteresque communications in a commit, these should go
below the --- line before the diffstat, where git will happily ignore
them.

> * gnu/packages/games.scm (gnushogi): Set linker flag to build
> program.
> ---
>  gnu/packages/games.scm | 42 +++++++++++++++++++++++++---------------
> --
>  1 file changed, 25 insertions(+), 17 deletions(-)
> 
> diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
> index 3391c141e42..a36e2fe55bf 100644
> --- a/gnu/packages/games.scm
> +++ b/gnu/packages/games.scm
> @@ -76,6 +76,7 @@
>  ;;; Copyright © 2022 Hendursaga <hendursaga <at> aol.com>
>  ;;; Copyright © 2022 Parnikkapore <poomklao <at> yahoo.com>
>  ;;; Copyright © 2023 Zheng Junjie <873216071 <at> qq.com>
> +;;; Copyright © 2023 gemmaro <gemmaro.dev <at> gmail.com>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -2012,24 +2013,31 @@ (define-public gnubik
>      (license license:gpl3+)))
>  
>  (define-public gnushogi
> -  (package
> -    (name "gnushogi")
> -    (version "1.4.2")
> -    (source
> -     (origin
> -      (method url-fetch)
> -      (uri (string-append "mirror://gnu/gnushogi/gnushogi-"
> -                          version ".tar.gz"))
> -      (sha256
> -       (base32
> -        "0a9bsl2nbnb138lq0h14jfc5xvz7hpb2bcsj4mjn6g1hcsl4ik0y"))))
> -    (arguments `(#:tests? #f)) ;; No check target.
> -    (build-system gnu-build-system)
> -    (home-page "https://www.gnu.org/software/gnushogi/")
> -    (synopsis "The game of Shogi (Japanese chess)")
> -    (description  "GNU Shogi is a program that plays the game Shogi
> (Japanese
> +  (let ((ver "1.4.2")
> +        (revision "2"))
There is no need to bump the revision, since the source remains
unchanged.  We also prefer not to let-bind the base version.
> +    (package
> +      (name "gnushogi")
> +      (version (string-append ver "-" revision))
> +      (source (origin
> +                (method url-fetch)
> +                (uri (string-append "mirror://gnu/gnushogi/gnushogi-
> " ver
> +                                    ".tar.gz"))
> +                (sha256
> +                 (base32
> +                 
> "0a9bsl2nbnb138lq0h14jfc5xvz7hpb2bcsj4mjn6g1hcsl4ik0y"))))
> +      (arguments
> +       `(#:phases (modify-phases %standard-phases
> +                    (add-before 'configure 'set-linker-flag
> +                      (lambda _
> +                        (setenv "LDFLAGS" "-z muldefs"))))
Since we're using gnu-build-system, can this by chance be achieved via
#:configure-flags or #:make-flags?
> +         #:tests? #f)) ;No check target.
> +      (build-system gnu-build-system)
> +      (home-page "https://www.gnu.org/software/gnushogi/")
> +      (synopsis "The game of Shogi (Japanese chess)")
> +      (description
> +       "GNU Shogi is a program that plays the game Shogi (Japanese
>  Chess).  It is similar to standard chess but this variant is far
> more complicated.")
> -    (license license:gpl3+)))
> +      (license license:gpl3+))))
Cheers

Information forwarded to guix-patches <at> gnu.org:
bug#63206; Package guix-patches. (Thu, 04 May 2023 09:04:02 GMT) Full text and rfc822 format available.

Message #14 received at 63206 <at> debbugs.gnu.org (full text, mbox):

From: gemmaro <gemmaro.dev <at> gmail.com>
To: Liliana Marie Prikler <liliana.prikler <at> gmail.com>,
	63206 <at> debbugs.gnu.org
Cc: gemmaro <gemmaro.dev <at> gmail.com>
Subject: [PATCH v2] gnu: gnushogi: Fix build.
Date: Thu,  4 May 2023 18:01:23 +0900
* gnu/packages/games.scm (gnushogi): Set linker flag to build program.
---
 gnu/packages/games.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 4fb9775e8df..b53ebf3e773 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -76,6 +76,7 @@
 ;;; Copyright © 2022 Hendursaga <hendursaga <at> aol.com>
 ;;; Copyright © 2022 Parnikkapore <poomklao <at> yahoo.com>
 ;;; Copyright © 2023 Zheng Junjie <873216071 <at> qq.com>
+;;; Copyright © 2023 gemmaro <gemmaro.dev <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2023,7 +2024,8 @@ (define-public gnushogi
       (sha256
        (base32
         "0a9bsl2nbnb138lq0h14jfc5xvz7hpb2bcsj4mjn6g1hcsl4ik0y"))))
-    (arguments `(#:tests? #f)) ;; No check target.
+    (arguments `(#:make-flags '("LDFLAGS=-z muldefs")
+                 #:tests? #f)) ;; No check target.
     (build-system gnu-build-system)
     (home-page "https://www.gnu.org/software/gnushogi/")
     (synopsis "The game of Shogi (Japanese chess)")

base-commit: 7a0a186a32524d4156bf96786d708fab323cebff
-- 
2.39.2





Information forwarded to liliana.prikler <at> gmail.com, iyzsong <at> envs.net, guix-patches <at> gnu.org:
bug#63206; Package guix-patches. (Sun, 11 Jun 2023 11:17:02 GMT) Full text and rfc822 format available.

Message #17 received at 63206 <at> debbugs.gnu.org (full text, mbox):

From: gemmaro <gemmaro.dev <at> gmail.com>
To: 63206 <at> debbugs.gnu.org
Cc: gemmaro <gemmaro.dev <at> gmail.com>
Subject: [PATCH v3] gnu: gnushogi: Fix build.
Date: Sun, 11 Jun 2023 20:13:33 +0900
* gnu/packages/games.scm (gnushogi)
[source]: Fix warnings by prefixing "__FUNCTION__" with "__extension__".
[arguments]: Turn off some GCC warnings in C flags.
Set the linker flag to build the program.
Skip the "--enable-fast-install" flag in the configure phase.
Enable the "sizetest" test in the check phase.
[synopsis]: Remove "The" so that the sentence doesn't start with it.
---
Hello,

Thank you for the review.  I tried to use #:make-flags in the revision
2, and additionally dealt with warnings and enable check phase in this
revision.

Best,
gemmaro.

 gnu/packages/games.scm | 51 ++++++++++++++++++++++++++++++++----------
 1 file changed, 39 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 8c00c2e66ed..37c51873ab8 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -78,6 +78,7 @@
 ;;; Copyright © 2023 Zheng Junjie <873216071 <at> qq.com>
 ;;; Copyright © 2023 Florian Pelz <pelzflorian <at> pelzflorian.de>
 ;;; Copyright © 2023 Ivana Drazovic <iv.dra <at> hotmail.com>
+;;; Copyright © 2023 gemmaro <gemmaro.dev <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2043,20 +2044,46 @@ (define-public gnushogi
   (package
     (name "gnushogi")
     (version "1.4.2")
-    (source
-     (origin
-      (method url-fetch)
-      (uri (string-append "mirror://gnu/gnushogi/gnushogi-"
-                          version ".tar.gz"))
-      (sha256
-       (base32
-        "0a9bsl2nbnb138lq0h14jfc5xvz7hpb2bcsj4mjn6g1hcsl4ik0y"))))
-    (arguments `(#:tests? #f)) ;; No check target.
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://gnu/gnushogi/gnushogi-" version
+                                  ".tar.gz"))
+              (sha256
+               (base32
+                "0a9bsl2nbnb138lq0h14jfc5xvz7hpb2bcsj4mjn6g1hcsl4ik0y"))
+              (modules '((guix build utils)))
+              ;; Fix "warning: ISO C90 does not support ‘__func__’ predefined
+              ;; identifier [-Wpedantic]"
+              (snippet '(begin
+                          (substitute* "gnushogi/dspwrappers.c"
+                            (("__FUNCTION__")
+                             "__extension__ __FUNCTION__"))))))
+    (arguments
+     `(#:configure-flags (list (string-append
+                                "CFLAGS="
+                                (string-join '("-Wno-format"
+                                               "-Wno-unused-but-set-variable"
+                                               "-Wno-bool-compare")
+                                             " ")))
+       #:make-flags '("LDFLAGS=-z muldefs")
+       #:phases (modify-phases %standard-phases
+                  ;; Skip --enable-fast-install flag
+                  (replace 'configure
+                    (lambda* (#:key outputs configure-flags #:allow-other-keys)
+                      (let ((out (assoc-ref outputs "out")))
+                        (setenv "CONFIG_SHELL"
+                                (which "sh"))
+                        (setenv "SHELL"
+                                (which "sh"))
+                        (apply invoke "./configure"
+                               (string-append "--prefix=" out) configure-flags)))))
+       #:test-target "sizetest"))
     (build-system gnu-build-system)
     (home-page "https://www.gnu.org/software/gnushogi/")
-    (synopsis "The game of Shogi (Japanese chess)")
-    (description  "GNU Shogi is a program that plays the game Shogi (Japanese
-Chess).  It is similar to standard chess but this variant is far more complicated.")
+    (synopsis "Game of Shogi (Japanese chess)")
+    (description
+     "GNU Shogi is a program that plays the game Shogi (Japanese Chess).
+It is similar to standard chess but this variant is far more complicated.")
     (license license:gpl3+)))
 
 (define-public ltris

base-commit: 73fa2889895f35bcf0c41f1174413381fdd7ec2c
-- 
2.40.1





Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Wed, 14 Jun 2023 21:22:01 GMT) Full text and rfc822 format available.

Notification sent to gemmaro <gemmaro.dev <at> gmail.com>:
bug acknowledged by developer. (Wed, 14 Jun 2023 21:22:01 GMT) Full text and rfc822 format available.

Message #22 received at 63206-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: gemmaro <gemmaro.dev <at> gmail.com>
Cc: 63206-done <at> debbugs.gnu.org,
 Liliana Marie Prikler <liliana.prikler <at> gmail.com>,
 宋文武 <iyzsong <at> envs.net>
Subject: Re: bug#63206: [PATCH] gnu: gnushogi: Fix build.
Date: Wed, 14 Jun 2023 23:20:51 +0200
gemmaro <gemmaro.dev <at> gmail.com> skribis:

> * gnu/packages/games.scm (gnushogi)
> [source]: Fix warnings by prefixing "__FUNCTION__" with "__extension__".
> [arguments]: Turn off some GCC warnings in C flags.
> Set the linker flag to build the program.
> Skip the "--enable-fast-install" flag in the configure phase.
> Enable the "sizetest" test in the check phase.
> [synopsis]: Remove "The" so that the sentence doesn't start with it.

Applied, thanks!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 13 Jul 2023 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 288 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.