From unknown Mon Jun 23 02:25:29 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#67859] [PATCH] gnu: libsigsegv: Fix x86_64 cross-compilation. Resent-From: Leo =?UTF-8?Q?Nikkil=C3=A4?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 16 Dec 2023 22:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 67859 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 67859@debbugs.gnu.org Cc: Leo =?UTF-8?Q?Nikkil=C3=A4?= X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.17027675348945 (code B ref -1); Sat, 16 Dec 2023 22:59:01 +0000 Received: (at submit) by debbugs.gnu.org; 16 Dec 2023 22:58:54 +0000 Received: from localhost ([127.0.0.1]:56301 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rEdcU-0002KC-4l for submit@debbugs.gnu.org; Sat, 16 Dec 2023 17:58:54 -0500 Received: from lists.gnu.org ([2001:470:142::17]:48874) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rEdcO-0002Jw-Vt for submit@debbugs.gnu.org; Sat, 16 Dec 2023 17:58:52 -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 1rEdcG-0002kV-9S for guix-patches@gnu.org; Sat, 16 Dec 2023 17:58:40 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rEdcE-0000aC-HU for guix-patches@gnu.org; Sat, 16 Dec 2023 17:58:40 -0500 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 77EC55C00C8; Sat, 16 Dec 2023 17:58:36 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Sat, 16 Dec 2023 17:58:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lnikki.la; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:message-id:mime-version:reply-to :subject:subject:to:to; s=fm3; t=1702767516; x=1702853916; bh=XB onQKdunab5TBG+8ZYOpsPIrIK6TJvs7oRh/3+bi1Y=; b=h1xbG/pGb60UqKvjpU c6agpWCjkraGXDvSZzGTOUywZaIAt1lEfn+FbWjdzoEmC/8GzN6YcOqhT4poeCLo 1NqM8FGgdx8K/9V/mIgxzDDoTgdAPUJ9O3LHtNl9I+P3uWK+Inqwwt4kWqg90meO eSJ/sxanIHztqCoAucQwnEMoc/H852X3wj9kJYUufku9Hf4uccvMtwX/FGhgbUM5 uUth+JYYpzQU/dO3Nga5pXmFEpxZdUD40iToqCKiKYTLkJCES2k9BOCk1aK//fNS JQ4aDxo9n9dwWli0rAiYLgt4WC4hcOvvxW/O42Ql+PjuHRevt0T1dg0AATs7O2dO gpgA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:message-id:mime-version:reply-to:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1702767516; x=1702853916; bh=XBonQKdunab5T BG+8ZYOpsPIrIK6TJvs7oRh/3+bi1Y=; b=MQ9Syeks/Ie3CzNpG/dy0xN0+G/Jv hyPH0FEvj+H5fSLFB16j8BTiwCb+SFaX8/wSQZtZgHPmAycXiPvNxFU4ko9OmauD Bf/Y+YDkSrRW6iU1TxOzZ64wBkRmphlM08+CL87AlUwWbQZ/4lWCcAOnW6RnA2m9 C1CZvb3krO2i9o2GNEEeB5w4ZBC2buIY5DQ1V7ERSSOQ3ciFvMvV2qVvhJPKyZpS kzKdWr4BzXe+0WvDtyAdN/1H9kdJnDC0L0kpiuYgQG2YVEDuCwz12Bq59impABEv 3yPO+698xzla3dkYdmuKhRktO5+PBqJifJwqP9qHS3aDejtN+3fYr02pw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvddthedgtdeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffogggtgfesthekre dtredtjeenucfhrhhomhepnfgvohcupfhikhhkihhlmocuoehhvghllhhosehlnhhikhhk ihdrlhgrqeenucggtffrrghtthgvrhhnpedtffduheelveejtdevgffhieehhfeuudegie ehjeeghefgvdffgeejfedvtedvgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgr mhepmhgrihhlfhhrohhmpehhvghllhhosehlnhhikhhkihdrlhgr X-ME-Proxy: Feedback-ID: i41f146a7:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 16 Dec 2023 17:58:35 -0500 (EST) From: Leo =?UTF-8?Q?Nikkil=C3=A4?= Date: Sun, 17 Dec 2023 00:57:28 +0200 Message-ID: <20231216225802.17298-1-hello@lnikki.la> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=66.111.4.25; envelope-from=hello@lnikki.la; helo=out1-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) * gnu/packages/libsigsegv.scm (libsigsegv): Set `#:phases' for x86_64. --- gnu/packages/libsigsegv.scm | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/gnu/packages/libsigsegv.scm b/gnu/packages/libsigsegv.scm index ebbdd2ad90..39c76cd462 100644 --- a/gnu/packages/libsigsegv.scm +++ b/gnu/packages/libsigsegv.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2012, 2013, 2018 Ludovic Courtès ;;; Copyright © 2017 Efraim Flashner +;;; Copyright © 2023 Leo Nikkilä ;;; ;;; This file is part of GNU Guix. ;;; @@ -41,6 +42,21 @@ (define-public libsigsegv `(;; The shared library isn't built by default but some packages need it. #:configure-flags '("--enable-shared") + ;; When cross-compiling for x86_64, work around this error: + ;; + ;; In file included from fault-linux-x86_64-old.h:17, + ;; [...] + ;; linux-libre-headers-cross-x86_64-linux-gnu-5.15.49/include/asm/sigcontext.h:317:8: error: redefinition of ‘struct sigcontext’ + ,@(if (string-contains (or (%current-target-system) + (%current-system)) + "x86_64") + `(#:phases (modify-phases %standard-phases + (add-before 'configure 'patch-x86_64-old-h + (lambda _ + (substitute* "src/fault-linux-x86_64-old.h" + (("#include ") "")))))) + '()) + ;; On MIPS, work around this error: ;; ;; In file included from fault-linux-mips-old.h:18:0, @@ -52,8 +68,7 @@ (define-public libsigsegv (add-before 'configure 'patch-mips-old-h (lambda _ (substitute* "src/fault-linux-mips-old.h" - (("#include ") "")) - #t)))) + (("#include ") "")))))) '()))) (description "GNU libsigsegv is a library to handle page faults, which occur when a -- 2.41.0 From unknown Mon Jun 23 02:25:29 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#67859] [PATCH] gnu: libsigsegv: Fix x86_64 cross-compilation. Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 23 Dec 2023 09:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67859 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Leo =?UTF-8?Q?Nikkil=C3=A4?= Cc: 67859@debbugs.gnu.org Received: via spool by 67859-submit@debbugs.gnu.org id=B67859.170332423111222 (code B ref 67859); Sat, 23 Dec 2023 09:38:01 +0000 Received: (at 67859) by debbugs.gnu.org; 23 Dec 2023 09:37:11 +0000 Received: from localhost ([127.0.0.1]:48583 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rGyRS-0002uw-IJ for submit@debbugs.gnu.org; Sat, 23 Dec 2023 04:37:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33238) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rGyRR-0002uk-21 for 67859@debbugs.gnu.org; Sat, 23 Dec 2023 04:37:09 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rGyRG-0004W2-Ke; Sat, 23 Dec 2023 04:36:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=ve7DERMNs3ScZRyTOe23e+gR6kHZgpXpxJDzUimUBm0=; b=WOw+aiY3phGsnq5yPecD reKvejyIPSwLRtHDTUABKoLHDq9zZ0Qgh/1r4QjrI2AmGoyRiESdswinkHkHqIwSjHcBObniH3Id9 DxQ07PahNq5qH2YlliPw85z5BIVzwmsWVOQJUagqVznJhyFY3bOsEIBWDvbYy05FSgQvTnHYDOKFt 8tzpivGocbMEIF3S72cBkFlJGALnDUjynntTBHrvBJZ2XtHphPcbLPIhhnaUXaHrwmSXs9f4bsnQl s1DATFMkIiCf2RWrW+4efB4oalNy0jQQKx93KI6XktgzNzzGLFe4Bnj9NYuQCKW1oWeIIsafeLoDU S+txcc4cvgTC5g==; From: Mathieu Othacehe In-Reply-To: <20231216225802.17298-1-hello@lnikki.la> ("Leo =?UTF-8?Q?Nikkil=C3=A4?="'s message of "Sun, 17 Dec 2023 00:57:28 +0200") References: <20231216225802.17298-1-hello@lnikki.la> Date: Sat, 23 Dec 2023 10:36:56 +0100 Message-ID: <87cyuxtg3r.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hello, > + (add-before 'configure 'patch-x86_64-old-h > + (lambda _ > + (substitute* "src/fault-linux-x86_64-old.h" > + (("#include ") "")))))) That is almost the same fix as for MIPS so it could be factorized. Couldn't we do that for all architectures in src/fault-linux-xxx-old.h? Is that issue reported upstream? Thanks, Mathieu From unknown Mon Jun 23 02:25:29 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Leo =?UTF-8?Q?Nikkil=C3=A4?= Subject: bug#67859: closed (Re: [bug#67859] [PATCH] gnu: libsigsegv: Fix x86_64 cross-compilation.) Message-ID: References: <87plydroz1.fsf@gnu.org> <20231216225802.17298-1-hello@lnikki.la> X-Gnu-PR-Message: they-closed 67859 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 67859@debbugs.gnu.org Date: Sun, 07 Jan 2024 18:14:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1704651242-29476-1" This is a multi-part message in MIME format... ------------=_1704651242-29476-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #67859: [PATCH] gnu: libsigsegv: Fix x86_64 cross-compilation. which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 67859@debbugs.gnu.org. --=20 67859: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D67859 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1704651242-29476-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 67859-done) by debbugs.gnu.org; 7 Jan 2024 18:13:53 +0000 Received: from localhost ([127.0.0.1]:33781 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rMXej-0007ey-6O for submit@debbugs.gnu.org; Sun, 07 Jan 2024 13:13:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52106) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rMXeh-0007ei-RV for 67859-done@debbugs.gnu.org; Sun, 07 Jan 2024 13:13:52 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rMXeW-0001Ll-BT; Sun, 07 Jan 2024 13:13:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=PR0CaoBnRltRS9QVIP5I2zmv2UAd//f6m6UAF6+BKQU=; b=iP8ZsmjwSEuZNysZ3vbT PV+vRrSL03iHSofWr2n6eNuxySxjFE4A3QTwGg9z9tnmlTlvYBbLzioX0LKDzV9wMQTIS0LDHNN95 TRkhwfJh9iRFT87x87f/qqb/bhmHFVSv3dVNzH2iBisme0pksVXqap3C+arQ4j5ksTz5HE/wTbzKm PaJIKzRXLPtj0ARoIfcdosMuEOtwO4KchH8u1C+ynyXWHw1lwgq+dIi/GFdeC+cmyy23p+hoiPAcb M260Q+kvJ7429/MyY21wRkkjFuTVd02bLI8DfrsfB2R6MwfPcrHmOkzGa7aKpBtbN9tznzvI0zGU3 HfQbst+PcUFG/w==; From: Mathieu Othacehe To: Leo =?utf-8?Q?Nikkil=C3=A4?= Subject: Re: [bug#67859] [PATCH] gnu: libsigsegv: Fix x86_64 cross-compilation. In-Reply-To: <87cyuxtg3r.fsf@gnu.org> (Mathieu Othacehe's message of "Sat, 23 Dec 2023 10:36:56 +0100") References: <20231216225802.17298-1-hello@lnikki.la> <87cyuxtg3r.fsf@gnu.org> Date: Sun, 07 Jan 2024 19:13:38 +0100 Message-ID: <87plydroz1.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67859-done Cc: 67859-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hello, > That is almost the same fix as for MIPS so it could be > factorized. Couldn't we do that for all architectures in > src/fault-linux-xxx-old.h? Efraim tooks care of it with 9816a5371663396bc092eb359222635e5675b174. Closing, thanks, Mathieu ------------=_1704651242-29476-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 16 Dec 2023 22:58:54 +0000 Received: from localhost ([127.0.0.1]:56301 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rEdcU-0002KC-4l for submit@debbugs.gnu.org; Sat, 16 Dec 2023 17:58:54 -0500 Received: from lists.gnu.org ([2001:470:142::17]:48874) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rEdcO-0002Jw-Vt for submit@debbugs.gnu.org; Sat, 16 Dec 2023 17:58:52 -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 1rEdcG-0002kV-9S for guix-patches@gnu.org; Sat, 16 Dec 2023 17:58:40 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rEdcE-0000aC-HU for guix-patches@gnu.org; Sat, 16 Dec 2023 17:58:40 -0500 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 77EC55C00C8; Sat, 16 Dec 2023 17:58:36 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Sat, 16 Dec 2023 17:58:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lnikki.la; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:message-id:mime-version:reply-to :subject:subject:to:to; s=fm3; t=1702767516; x=1702853916; bh=XB onQKdunab5TBG+8ZYOpsPIrIK6TJvs7oRh/3+bi1Y=; b=h1xbG/pGb60UqKvjpU c6agpWCjkraGXDvSZzGTOUywZaIAt1lEfn+FbWjdzoEmC/8GzN6YcOqhT4poeCLo 1NqM8FGgdx8K/9V/mIgxzDDoTgdAPUJ9O3LHtNl9I+P3uWK+Inqwwt4kWqg90meO eSJ/sxanIHztqCoAucQwnEMoc/H852X3wj9kJYUufku9Hf4uccvMtwX/FGhgbUM5 uUth+JYYpzQU/dO3Nga5pXmFEpxZdUD40iToqCKiKYTLkJCES2k9BOCk1aK//fNS JQ4aDxo9n9dwWli0rAiYLgt4WC4hcOvvxW/O42Ql+PjuHRevt0T1dg0AATs7O2dO gpgA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:message-id:mime-version:reply-to:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1702767516; x=1702853916; bh=XBonQKdunab5T BG+8ZYOpsPIrIK6TJvs7oRh/3+bi1Y=; b=MQ9Syeks/Ie3CzNpG/dy0xN0+G/Jv hyPH0FEvj+H5fSLFB16j8BTiwCb+SFaX8/wSQZtZgHPmAycXiPvNxFU4ko9OmauD Bf/Y+YDkSrRW6iU1TxOzZ64wBkRmphlM08+CL87AlUwWbQZ/4lWCcAOnW6RnA2m9 C1CZvb3krO2i9o2GNEEeB5w4ZBC2buIY5DQ1V7ERSSOQ3ciFvMvV2qVvhJPKyZpS kzKdWr4BzXe+0WvDtyAdN/1H9kdJnDC0L0kpiuYgQG2YVEDuCwz12Bq59impABEv 3yPO+698xzla3dkYdmuKhRktO5+PBqJifJwqP9qHS3aDejtN+3fYr02pw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvddthedgtdeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffogggtgfesthekre dtredtjeenucfhrhhomhepnfgvohcupfhikhhkihhlmocuoehhvghllhhosehlnhhikhhk ihdrlhgrqeenucggtffrrghtthgvrhhnpedtffduheelveejtdevgffhieehhfeuudegie ehjeeghefgvdffgeejfedvtedvgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgr mhepmhgrihhlfhhrohhmpehhvghllhhosehlnhhikhhkihdrlhgr X-ME-Proxy: Feedback-ID: i41f146a7:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 16 Dec 2023 17:58:35 -0500 (EST) From: =?utf-8?Q?Leo=20Nikkil=C3=A4?= To: guix-patches@gnu.org Subject: [PATCH] gnu: libsigsegv: Fix x86_64 cross-compilation. Date: Sun, 17 Dec 2023 00:57:28 +0200 Message-ID: <20231216225802.17298-1-hello@lnikki.la> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=66.111.4.25; envelope-from=hello@lnikki.la; helo=out1-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit Cc: =?UTF-8?q?Leo=20Nikkil=C3=A4?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) * gnu/packages/libsigsegv.scm (libsigsegv): Set `#:phases' for x86_64. --- gnu/packages/libsigsegv.scm | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/gnu/packages/libsigsegv.scm b/gnu/packages/libsigsegv.scm index ebbdd2ad90..39c76cd462 100644 --- a/gnu/packages/libsigsegv.scm +++ b/gnu/packages/libsigsegv.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2012, 2013, 2018 Ludovic Courtès ;;; Copyright © 2017 Efraim Flashner +;;; Copyright © 2023 Leo Nikkilä ;;; ;;; This file is part of GNU Guix. ;;; @@ -41,6 +42,21 @@ (define-public libsigsegv `(;; The shared library isn't built by default but some packages need it. #:configure-flags '("--enable-shared") + ;; When cross-compiling for x86_64, work around this error: + ;; + ;; In file included from fault-linux-x86_64-old.h:17, + ;; [...] + ;; linux-libre-headers-cross-x86_64-linux-gnu-5.15.49/include/asm/sigcontext.h:317:8: error: redefinition of ‘struct sigcontext’ + ,@(if (string-contains (or (%current-target-system) + (%current-system)) + "x86_64") + `(#:phases (modify-phases %standard-phases + (add-before 'configure 'patch-x86_64-old-h + (lambda _ + (substitute* "src/fault-linux-x86_64-old.h" + (("#include ") "")))))) + '()) + ;; On MIPS, work around this error: ;; ;; In file included from fault-linux-mips-old.h:18:0, @@ -52,8 +68,7 @@ (define-public libsigsegv (add-before 'configure 'patch-mips-old-h (lambda _ (substitute* "src/fault-linux-mips-old.h" - (("#include ") "")) - #t)))) + (("#include ") "")))))) '()))) (description "GNU libsigsegv is a library to handle page faults, which occur when a -- 2.41.0 ------------=_1704651242-29476-1--