GNU bug report logs -
#74784
[PATCH] gnu: hugs: Fix build with GCC.
Previous Next
Reported by: Homo <gay <at> disroot.org>
Date: Wed, 11 Dec 2024 10:28:01 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 74784 in the body.
You can then email your comments to 74784 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#74784
; Package
guix-patches
.
(Wed, 11 Dec 2024 10:28:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Homo <gay <at> disroot.org>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Wed, 11 Dec 2024 10:28:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Change-Id: I6bbfb65e62d9a2b1a3c8b29eb386a24d6974eb45
---
gnu/packages/hugs.scm | 7 +++----
gnu/packages/patches/hugs-fix-build.patch | 21 +++++++++++++++++++++
2 files changed, 24 insertions(+), 4 deletions(-)
create mode 100644 gnu/packages/patches/hugs-fix-build.patch
diff --git a/gnu/packages/hugs.scm b/gnu/packages/hugs.scm
index c9915e4cd6..b6a97ea78c 100644
--- a/gnu/packages/hugs.scm
+++ b/gnu/packages/hugs.scm
@@ -23,7 +23,7 @@ (define-module (gnu packages hugs)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system gnu)
- #:use-module (gnu packages gcc))
+ #:use-module (gnu packages))
(define-public hugs
(package
@@ -36,7 +36,8 @@ (define-public hugs
name "98-plus-" version ".tar.gz"))
(sha256
(base32
- "1mdy4aq4campgmnpc2qwq7bsbfhaxfsqdghbyyz2wms4lnfcmyma"))))
+ "1mdy4aq4campgmnpc2qwq7bsbfhaxfsqdghbyyz2wms4lnfcmyma"))
+ (patches (search-patches "hugs-fix-build.patch"))))
(build-system gnu-build-system)
(arguments
`(#:phases
@@ -71,8 +72,6 @@ (define-public hugs
(("/bin/cp") (which "cp")))
#t)))
#:tests? #f)) ; no test target
- ;; FIXME: Fails to build with GCC 5.
- (native-inputs (list gcc-4.9))
(home-page "https://www.haskell.org/hugs/")
(synopsis "Functional programming system based on Haskell 98")
(description
diff --git a/gnu/packages/patches/hugs-fix-build.patch b/gnu/packages/patches/hugs-fix-build.patch
new file mode 100644
index 0000000000..d41bec4d8b
--- /dev/null
+++ b/gnu/packages/patches/hugs-fix-build.patch
@@ -0,0 +1,21 @@
+diff --git a/packages/base/include/HsBase.h b/packages/base/include/HsBase.h
+index aa1a7fb..78d5b46 100644
+--- a/packages/base/include/HsBase.h
++++ b/packages/base/include/HsBase.h
+@@ -217,15 +217,7 @@ StgWord64 stg_integerToWord64 (StgInt sa, StgByteArray /* Really: mp_limb_t* */
+ when compiling to native code.
+ -------------------------------------------------------------------------- */
+
+-#ifndef INLINE
+-# if defined(_MSC_VER)
+-# define INLINE extern __inline
+-# elif defined(__GNUC__)
+-# define INLINE extern inline
+-# else
+-# define INLINE inline
+-# endif
+-#endif
++#define INLINE inline
+
+ INLINE int __hscore_get_errno(void) { return errno; }
+ INLINE void __hscore_set_errno(int e) { errno = e; }
--
2.46.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#74784
; Package
guix-patches
.
(Sun, 15 Dec 2024 23:20:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 74784 <at> debbugs.gnu.org (full text, mbox):
Hi,
Homo <gay <at> disroot.org> skribis:
> Change-Id: I6bbfb65e62d9a2b1a3c8b29eb386a24d6974eb45
> ---
> gnu/packages/hugs.scm | 7 +++----
> gnu/packages/patches/hugs-fix-build.patch | 21 +++++++++++++++++++++
> 2 files changed, 24 insertions(+), 4 deletions(-)
> create mode 100644 gnu/packages/patches/hugs-fix-build.patch
A couple of minor nits but I think it’ll be useful if you plan to
contribute more:
> --- /dev/null
> +++ b/gnu/packages/patches/hugs-fix-build.patch
> @@ -0,0 +1,21 @@
> +diff --git a/packages/base/include/HsBase.h b/packages/base/include/HsBase.h
> +index aa1a7fb..78d5b46 100644
Could you add a sentence at the top explaining what the patch does?
(This will placate ‘guix lint’ in addition to myself. :-))
Could you also register the file in ‘gnu/local.mk’?
Last, you can use ‘etc/committer.scm’ to generate a commit log or
template thereof that follow the project’s conventions.
Thanks,
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#74784
; Package
guix-patches
.
(Mon, 16 Dec 2024 08:53:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 74784 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/patches/hugs-fix-build.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/hugs.scm (hugs)[source]: Use it.
[native-inputs]: Remove.
Change-Id: I8b17f6c8a89fbc25ac9fe40b58962c83b08cbc21
---
Hi,
The patch itself is taken from https://aur.archlinux.org/cgit/aur.git/tree/hsbase_inline.patch?h=hugs
so for a while I was puzzled what to write when I don't understand C code.
etc/committer.scm doesn't work with these changes, either it backtraces or says "Nothing to do."
so instead I had to write manually, hopefully I didn't misunderstand what to write.
gnu/local.mk | 1 +
gnu/packages/hugs.scm | 7 +++----
gnu/packages/patches/hugs-fix-build.patch | 23 +++++++++++++++++++++++
3 files changed, 27 insertions(+), 4 deletions(-)
create mode 100644 gnu/packages/patches/hugs-fix-build.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index 39b142af5a..c3ec582a0e 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1556,6 +1556,7 @@ dist_patch_DATA = \
%D%/packages/patches/htslib-for-stringtie.patch \
%D%/packages/patches/hubbub-sort-entities.patch \
%D%/packages/patches/hueplusplus-mbedtls.patch \
+ %D%/packages/patches/hugs-fix-build.patch \
%D%/packages/patches/hurd-64bit.patch \
%D%/packages/patches/hurd-refcounts-assert.patch \
%D%/packages/patches/hurd-rumpdisk-no-hd.patch \
diff --git a/gnu/packages/hugs.scm b/gnu/packages/hugs.scm
index c9915e4cd6..b6a97ea78c 100644
--- a/gnu/packages/hugs.scm
+++ b/gnu/packages/hugs.scm
@@ -23,7 +23,7 @@ (define-module (gnu packages hugs)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system gnu)
- #:use-module (gnu packages gcc))
+ #:use-module (gnu packages))
(define-public hugs
(package
@@ -36,7 +36,8 @@ (define-public hugs
name "98-plus-" version ".tar.gz"))
(sha256
(base32
- "1mdy4aq4campgmnpc2qwq7bsbfhaxfsqdghbyyz2wms4lnfcmyma"))))
+ "1mdy4aq4campgmnpc2qwq7bsbfhaxfsqdghbyyz2wms4lnfcmyma"))
+ (patches (search-patches "hugs-fix-build.patch"))))
(build-system gnu-build-system)
(arguments
`(#:phases
@@ -71,8 +72,6 @@ (define-public hugs
(("/bin/cp") (which "cp")))
#t)))
#:tests? #f)) ; no test target
- ;; FIXME: Fails to build with GCC 5.
- (native-inputs (list gcc-4.9))
(home-page "https://www.haskell.org/hugs/")
(synopsis "Functional programming system based on Haskell 98")
(description
diff --git a/gnu/packages/patches/hugs-fix-build.patch b/gnu/packages/patches/hugs-fix-build.patch
new file mode 100644
index 0000000000..997baacc86
--- /dev/null
+++ b/gnu/packages/patches/hugs-fix-build.patch
@@ -0,0 +1,23 @@
+Fixes build with GCC 5 and later.
+
+diff --git a/packages/base/include/HsBase.h b/packages/base/include/HsBase.h
+index aa1a7fb..78d5b46 100644
+--- a/packages/base/include/HsBase.h
++++ b/packages/base/include/HsBase.h
+@@ -217,15 +217,7 @@ StgWord64 stg_integerToWord64 (StgInt sa, StgByteArray /* Really: mp_limb_t* */
+ when compiling to native code.
+ -------------------------------------------------------------------------- */
+
+-#ifndef INLINE
+-# if defined(_MSC_VER)
+-# define INLINE extern __inline
+-# elif defined(__GNUC__)
+-# define INLINE extern inline
+-# else
+-# define INLINE inline
+-# endif
+-#endif
++#define INLINE inline
+
+ INLINE int __hscore_get_errno(void) { return errno; }
+ INLINE void __hscore_set_errno(int e) { errno = e; }
--
2.46.0
Reply sent
to
Ludovic Courtès <ludo <at> gnu.org>
:
You have taken responsibility.
(Mon, 23 Dec 2024 19:41:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Homo <gay <at> disroot.org>
:
bug acknowledged by developer.
(Mon, 23 Dec 2024 19:41:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 74784-done <at> debbugs.gnu.org (full text, mbox):
Homo <gay <at> disroot.org> skribis:
> * gnu/packages/patches/hugs-fix-build.patch: New file.
> * gnu/local.mk (dist_patch_DATA): Register it.
> * gnu/packages/hugs.scm (hugs)[source]: Use it.
> [native-inputs]: Remove.
>
> Change-Id: I8b17f6c8a89fbc25ac9fe40b58962c83b08cbc21
> ---
> Hi,
>
> The patch itself is taken from https://aur.archlinux.org/cgit/aur.git/tree/hsbase_inline.patch?h=hugs
> so for a while I was puzzled what to write when I don't understand C code.
I added this link to the top of the patch.
> etc/committer.scm doesn't work with these changes, either it backtraces or says "Nothing to do."
> so instead I had to write manually, hopefully I didn't misunderstand what to write.
Oh, too bad. It’s perfect anyway!
Applied, thanks!
Ludo’.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 21 Jan 2025 12:24:23 GMT)
Full text and
rfc822 format available.
This bug report was last modified 149 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.