From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id aEuCM5PqX2e2PQAA62LTzQ:P1 (envelope-from ) for ; Mon, 16 Dec 2024 08:53:40 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id aEuCM5PqX2e2PQAA62LTzQ (envelope-from ) for ; Mon, 16 Dec 2024 09:53:39 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=RqJ57BUI; dkim=fail ("headers rsa verify failed") header.d=disroot.org header.s=mail header.b=bojD0e08; dmarc=pass (policy=none) header.from=gnu.org; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1734339219; a=rsa-sha256; cv=none; b=je3VIKe5Wxl9AK4JsZ2K1aGJ4nG7GgR+SR7Tip/eXjFd0HVEBRr5Cr/UZy4FmlJDHR6eZR eqGa4lc9N6I/Q7E0Du1MxrdsbpCUAqNdaUDDtHtC4W69UNsMqZZvxBc8Upw6gXpkARBkjQ bdJpVzc35DYM5bXUfIdffAzse98X35egr/VppMmbdkdjLEoUvG1WZn6vxZb+ox7k8mIdMZ XeorNgFvHw9oinuFoVlp3Icmg4cMbqE0l9TVYdJJa11ymmNQEEeSVStJjgVqBlZWkDtIzE 0o+MB8cHiO1kbdmXN/eVdg1qU4N7m1MbuRPw5ZCuus/1zTuqsaHI5zBND+CIxQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=RqJ57BUI; dkim=fail ("headers rsa verify failed") header.d=disroot.org header.s=mail header.b=bojD0e08; dmarc=pass (policy=none) header.from=gnu.org; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1734339219; h=from:from:sender:sender:reply-to: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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=kjC9rUeHmizU8HRCB+eZkuL3rAPm6ZGQGqwP6SrVaJk=; b=AZ8PXitbBUW3awQgnL1XFIRgK9D1j3Y7GPijjl6z1PG3knFVSibL4NvVyIkl+PLuc7iriS vX01H8Gr+LJJTD7AX+38dheLY5fF2TyuC6eEwoDP70SEGhc++ZjCktKOquVdUeVYRyWXKf /DAzBmlPjwYamFoMngcw5mcJOcOSlBKGIZYFegfL4amEc2eN3V5Bj6AtfthbXPxrxv8G4S YkMtjtoE7TfHcAYD8aoo/no+VUie/oX9/+wQ40cWin8a2l/cDHtRCGv01y4fsyjkMnKw7w SuxrQvzWPTTkhQhV662OfSCRjn3KCo2dnAx5vISVgsQ4g6hWNR+iX7ASS81EOw== 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 E5BC493A54 for ; Mon, 16 Dec 2024 09:53:38 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tN6qn-00086j-8a; Mon, 16 Dec 2024 03:53:13 -0500 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 1tN6qd-00085S-06 for guix-patches@gnu.org; Mon, 16 Dec 2024 03:53:03 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tN6qc-0006dT-LJ for guix-patches@gnu.org; Mon, 16 Dec 2024 03:53:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:In-Reply-To:References:Subject; bh=kjC9rUeHmizU8HRCB+eZkuL3rAPm6ZGQGqwP6SrVaJk=; b=RqJ57BUIFeNveyuCYMTirFrCF2Mi/C8Wj3Ry0n1MYLamZSTOSCAPNxBUwWFpoEGe7ABeA1FFyR+m4zDwSY9zjAh0w1rvbOpfHytlr6LCfqJhuJRVaUIjDbk9HMBHgfCrsBmxubJtgodDTlAacLp13pzX2owX5tdIm90oEPhB72yfHdz6k2LaNo8aKtrDEgRB7zojHd3XQB2mdW0v2szmri7SwtuG0nzfyP3R7/p9OTwdJHVhWZ1oSDw3u2KjT8YY+nndh17DZGC6L2czasdMio2tP2C3VBRuKpySBCwqVB3ru/1W82muPGRbUa86I8pxK7ow/kdaevc6CY+Xd9KD1A==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tN6qc-0003r2-G0 for guix-patches@gnu.org; Mon, 16 Dec 2024 03:53:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74784] [PATCH v2] gnu: hugs: Fix build with GCC. References: <20241211102636.20121-1-gay@disroot.org> In-Reply-To: <20241211102636.20121-1-gay@disroot.org> Resent-From: Homo Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 16 Dec 2024 08:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74784 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74784@debbugs.gnu.org Cc: Homo Received: via spool by 74784-submit@debbugs.gnu.org id=B74784.173433917514802 (code B ref 74784); Mon, 16 Dec 2024 08:53:02 +0000 Received: (at 74784) by debbugs.gnu.org; 16 Dec 2024 08:52:55 +0000 Received: from localhost ([127.0.0.1]:53432 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tN6qV-0003qe-39 for submit@debbugs.gnu.org; Mon, 16 Dec 2024 03:52:55 -0500 Received: from layka.disroot.org ([178.21.23.139]:57050) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tN6qS-0003qQ-7n for 74784@debbugs.gnu.org; Mon, 16 Dec 2024 03:52:53 -0500 Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 12BE024EE5; Mon, 16 Dec 2024 09:52:51 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id DXDTH30YBOpE; Mon, 16 Dec 2024 09:52:46 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1734339166; bh=RsiZeQ52fsRXQtBnT6ptVfaJiQDRKhvX/M001JsxDIw=; h=From:To:Cc:Subject:Date; b=bojD0e087tEk+hDQDLX6binFE9vn234z50mpgb0H4+U9uIxTmD9FazzLIybuH/MNN A3OenZSC7jE3iSdqscfLTj+JD0gU1RpgqPhkgbR7Vs11LtoQcvWSdJPOGbftgu/MRz TPaPXtQac9WXtSJMXtN6RU2uf1+motKyhva13C7XAwyI51uQzu15DWlxQzjyNnqWST vXzjViGiO+hsuGmqSi+SUs4CrlagIyukaJHyQ6deXSw0UWg9wrCnG1rOw62cRdCAwu 8Ar7afkQVvtqkXq8XMWRucewP2i/SxUOjVVjny/QMKM+ew2Q5nxJmK9CVuqm5XjQC3 xCwFimtm538JQ== Date: Mon, 16 Dec 2024 10:47:32 +0200 Message-ID: <20241216085227.18555-1-gay@disroot.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: , Reply-to: Homo X-ACL-Warn: , Homo via Guix-patches From: Homo via Guix-patches via 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 X-Migadu-Spam-Score: -5.99 X-Spam-Score: -5.99 X-Migadu-Queue-Id: E5BC493A54 X-Migadu-Scanner: mx10.migadu.com X-TUID: XciRsSnFnibm * 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