From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id GI9zCO8iBGaaegAA62LTzQ:P1 (envelope-from ) for ; Wed, 27 Mar 2024 14:45:19 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id GI9zCO8iBGaaegAA62LTzQ (envelope-from ) for ; Wed, 27 Mar 2024 14:45:19 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none; 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"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1711547118; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: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; bh=kNR/R7swRwD0t3+s2k7gqbkV38WCtg8A0LHqQyJ8Qb4=; b=I1yR2+ZwtH5/nd7CezSA4Wu8J+XSsqPmfI4JG5NcT/a+VfHVkONUsJV7P2s3kWoEffQ7iA ycx9aVKz5+047LMpKkH4U2VrtcjrBS1RrMZRmSHMMONvDw2NzJH1YZ7UYYDsJ5WbU+fEmM Ufuw2+8xo1axer2Lla+IqOknSj6imE5vf13sR8mByddKsoMqt2wAZEWkfpP+zx9/1xEIa7 mqEs8G1Wn7Ihvwqv7oYJ0OrwzdW3hn0ijjHwkeZwzy6w8JsvQJccJVEDo/G7bS82eoTH3t rYfkh6AICcOmGV0zG/yU5Ph/Y6GV9IGuNDNdTK36cHFyf1Dd2jm8hkCnoZ6s6A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; 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"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1711547118; a=rsa-sha256; cv=none; b=k/TxhvqJwBb2Lbo3S3DRu2oQlzJQi/THh5HAlJ4k33kZP7g58RdToE1u3ICTtTQaoAhr96 PayglziTtGqtwW3rPDTHQOuXLWuIKC62QAz7/TKDQFo1xnTUG8E8dzKXz8+DHC2AsU6oGO 1HWSOBmLdyCoUnUu9JWLO4R6XmnjxIxfEPQlVl5o+h7WY/Q5wpgKaE8gLA4h0/5ZyfIimn c2aBzlAPCJap/ZzCyWsUr+5PDP1gMYqu4tdtV2y/Q/h5dBGsteayQc3Nf2PbtMKxPVgrZR +e3HlR5FGDubcQX3xW6586w65a4uZ5DaWU2G1FyZBB79T5jmcGpJxsTKjKpaZQ== 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 BD5BA6A8A4 for ; Wed, 27 Mar 2024 14:45:18 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rpTaX-0001Su-KF; Wed, 27 Mar 2024 09:45:09 -0400 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 1rpTaS-0001SO-Kx for guix-patches@gnu.org; Wed, 27 Mar 2024 09:45:05 -0400 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 1rpTaR-0001aY-V6 for guix-patches@gnu.org; Wed, 27 Mar 2024 09:45:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rpTaR-0005Zt-Vb for guix-patches@gnu.org; Wed, 27 Mar 2024 09:45:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#69944] [PATCH] gnu: dmraid: Fix cross-compiling to riscv64-linux. Resent-From: Zheng Junjie Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 27 Mar 2024 13:45:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69944 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Christopher Baines Cc: 69944@debbugs.gnu.org Received: via spool by 69944-submit@debbugs.gnu.org id=B69944.171154705021222 (code B ref 69944); Wed, 27 Mar 2024 13:45:03 +0000 Received: (at 69944) by debbugs.gnu.org; 27 Mar 2024 13:44:10 +0000 Received: from localhost ([127.0.0.1]:36157 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rpTZZ-0005WD-MR for submit@debbugs.gnu.org; Wed, 27 Mar 2024 09:44:10 -0400 Received: from smtp21.cstnet.cn ([159.226.251.21]:41644 helo=cstnet.cn) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rpTZU-0005T2-6a for 69944@debbugs.gnu.org; Wed, 27 Mar 2024 09:44:08 -0400 Received: from m (unknown [107.174.64.25]) by APP-01 (Coremail) with SMTP id qwCowABHT5+SIgRmYLpWCQ--.48487S2; Wed, 27 Mar 2024 21:43:51 +0800 (CST) References: <875xx7hmhm.fsf@cbaines.net> User-agent: mu4e 1.10.8; emacs 30.0.50 From: Zheng Junjie Date: Wed, 27 Mar 2024 21:40:02 +0800 In-reply-to: <875xx7hmhm.fsf@cbaines.net> Message-ID: <87a5mjg57z.fsf@iscas.ac.cn> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-CM-TRANSID: qwCowABHT5+SIgRmYLpWCQ--.48487S2 X-Coremail-Antispam: 1UD129KBjvdXoW7Gr1ftF1xAw4kZF4kAryxXwb_yoWxArg_Ca 45ZasrGr1kXFZ3Ca4vqFWDCryUZayjqF4F93WIqrWrJrZIvr42q3ZYqrsxA3Z8KF45Ar1x Cr4kZry8Ar9FvjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbskYjsxI4VWkCwAYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I 6I8E6xAIw20EY4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l8cAvFVAK0II2c7xJM2 8CjxkF64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVWUJVWUCwA2z4x0Y4vE2Ix0 cI8IcVCY1x0267AKxVWUJVW8JwA2z4x0Y4vEx4A2jsIE14v26F4UJVW0owA2z4x0Y4vEx4 A2jsIEc7CjxVAFwI0_GcCE3s1lnx0Ee4C267I2x7xF54xIwI0E7I0Y6sxI4wAS0I0E0xvY zxvE52x082IY62kv0487M2AExVA0xI801c8C04v7Mc02F40EFcxC0VAKzVAqx4xG6I80ew Av7VC0I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY 6r1j6r4UM4x0Y48IcVAKI48JMxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r 4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF 67AKxVWUXVWUAwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r1j6r1xMIIF0xvE2I x0cI8IcVCY1x0267AKxVWUJVW8JwCI42IY6xAIw20EY4v20xvaj40_Jr0_JF4lIxAIcVC2 z280aVAFwI0_Jr0_Gr1lIxAIcVC2z280aVCY1x0267AKxVWUJVW8JbIYCTnIWIevJa73Uj IFyTuYvjxUY-B_UUUUU X-Originating-IP: [107.174.64.25] X-CM-SenderInfo: x2kh0wxmxqyx3h6l2u1dvotugofq/ 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: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: BD5BA6A8A4 X-Spam-Score: -8.65 X-Migadu-Spam-Score: -8.65 X-Migadu-Scanner: mx11.migadu.com X-TUID: ijH5i5fxGcxV --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Christopher Baines writes: > [[PGP Signed Part:Undecided]] > > Zheng Junjie writes: > >> * gnu/packages/disk.scm (dmraid) >> [native-inputs]: When cross compiling to riscv64-linux-gnu, add config. >> [arguments]: When target riscv64-linux-gnu, add update-config phase. >> >> Change-Id: I491c43a6ce2c3fc3aed43ecab9d4a2ab251038bb >> --- >> gnu/packages/disk.scm | 22 +++++++++++++++++++--- >> 1 file changed, 19 insertions(+), 3 deletions(-) > > Hi! > > Thanks for the patch, this doesn't build for me though: Sorry, this patch should build, and also build to aarch64-linux-gnu. --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-gnu-dmraid-Fix-cross-compiling.patch Content-Transfer-Encoding: quoted-printable From=2061f56da975095071649e48a6e975ffcdd4dd8063 Mon Sep 17 00:00:00 2001 Message-ID: <61f56da975095071649e48a6e975ffcdd4dd8063.1711546964.git.zhengj= unjie@iscas.ac.cn> From: Zheng Junjie Date: Sat, 23 Mar 2024 00:17:47 +0800 Subject: [PATCH] gnu: dmraid: Fix cross-compiling * gnu/packages/disk.scm (dmraid) [native-inputs]: When cross compiling, add config, autoconf, automake. [arguments]: When cross compiling, add update-config and fix-rpl_malloc pha= se. Change-Id: I491c43a6ce2c3fc3aed43ecab9d4a2ab251038bb =2D-- gnu/packages/disk.scm | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/gnu/packages/disk.scm b/gnu/packages/disk.scm index b0117d77ce..35e75d89fe 100644 =2D-- a/gnu/packages/disk.scm +++ b/gnu/packages/disk.scm @@ -27,7 +27,7 @@ ;;; Copyright =C2=A9 2022 Disseminate Dissent ;;; Copyright =C2=A9 2023 Timotej Lazar ;;; Copyright =C2=A9 2023 Morgan Smith =2D;;; Copyright =C2=A9 2023 Zheng Junjie <873216071@qq.com> +;;; Copyright =C2=A9 2023, 2024 Zheng Junjie <873216071@qq.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -1145,7 +1145,13 @@ (define-public dmraid "1n7vsqvh7y6yvil682q129d21yhb0cmvd5fvsbkza7ypd78inhlk")))) (build-system gnu-build-system) (inputs (list lvm2)) =2D (native-inputs (list which)) + (native-inputs + (append (if (%current-target-system) + (list config + autoconf + automake) + '()) + (list which))) (arguments `(#:tests? #f ; No tests. ;; Prevent a race condition where some target would attempt to link @@ -1158,7 +1164,34 @@ (define-public dmraid (chdir (string-append ,version "/dmraid")) (substitute* "make.tmpl.in" (("/bin/sh") (which "sh"))) =2D #t))) + #t)) + ,@(if (%current-target-system) + `((add-after 'unpack 'update-config + (lambda* (#:key native-inputs inputs + #:allow-other-keys) + (with-directory-excursion + (string-append ,version "/dmraid/autocon= f") + (for-each (lambda (file) + (install-file + (search-input-file + (or native-inputs inputs) + (string-append "/bin/" file)) + ".")) + '("config.guess" "config.sub")))= )) + (add-after 'unpack 'fix-rpl_malloc + (lambda _ + ;; AC_FUNC_MALLOC and AC_FUNC_REALLOC usually + ;; unneeded, see + ;; https://lists.gnu.org/archive/html/autoco= nf/2003-02/msg00017.html + (with-directory-excursion + (string-append ,version "/dmraid") + (substitute* "configure.in" + (("AC_FUNC_MALLOC") "") + (("AC_FUNC_REALLOC") "")) + (delete-file "./configure") + (copy-file "configure.in" "configure.ac") + (invoke "autoreconf" "-fiv"))))) + '())) #:configure-flags (list ;; Make sure programs such as 'dmevent_tool= ' can ;; find libdmraid.so. (string-append "LDFLAGS=3D-Wl,-rpath=3D" base-commit: 656baadf83f2812c0ff79f4f2f0b5f1e927ed8a5 =2D-=20 2.41.0 --=-=-= Content-Type: text/plain > > checking build system type... x86_64-unknown-linux-gnu > checking host system type... Invalid configuration > `riscv64-linux-gnu': machine `riscv64' not recognized > configure: error: > /gnu/store/rib9g2ig1xf3kclyl076w28parmncg4k-bash-minimal-5.1.16/bin/bash > autoconf/config.sub riscv64-linux-gnu failed > error: in phase 'configure': uncaught exception: > %exception #<&invoke-error program: > "/gnu/store/rib9g2ig1xf3kclyl076w28parmncg4k-bash-minimal-5.1.16/bin/bash" > arguments: ("./configure" "CC_FOR_BUILD=gcc" > "CONFIG_SHELL=/gnu/store/rib9g2ig1xf3kclyl076w28parmncg4k-bash-minimal-5.1.16/bin/bash" > "SHELL=/gnu/store/rib9g2ig1xf3kclyl076w28parmncg4k-bash-minimal-5.1.16/bin/bash" > "--prefix=/gnu/store/gb6ij94hk33ivx193zq87m2vhlhzsm8j-dmraid-1.0.0.rc16-3" > "--enable-fast-install" "--build=x86_64-unknown-linux-gnu" > "--host=riscv64-linux-gnu" > "LDFLAGS=-Wl,-rpath=/gnu/store/gb6ij94hk33ivx193zq87m2vhlhzsm8j-dmraid-1.0.0.rc16-3/lib") > exit-status: 1 term-signal: #f stop-signal: #f> > > > https://bordeaux.guix.gnu.org/build/47b7e0bf-b082-4d62-ac4c-8de5c28f5faf/log > > [[End of PGP Signed Part]] --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEfr6klGDOXiwIdX/bO1qpk+Gi3/AFAmYEIpAACgkQO1qpk+Gi 3/DK2hAApHj53TD81WpDK/Otbkx9lUSoOf1rKh2B4bv1Ji0xNpz5qnVaihb8Nj3s T9M74dxjAFA0WA/9+p6N/JaxykhNaVwNBLZeX18GbVJtG0huaGlIBZf3RDkNhCLf 1xf3YBdYaBr8jVpeWfk9KD7I0h3nO6IgGfj6mvde497q1d/qYzkx9+nGXu5kdlux liwSk4CpYNbJQhBVuv5cJBCrd9uBtSbSV0ZIK8sOyrShdD/BtpGltTH4ItpQmXoE E5nsW9ucECFdeLirAW4CXSmEPafxaPBRszq5FD9vvPqNielp5uTcC4nHCorTtIr3 rASgsCYIg5GN+WUKx3pcP80yXq+NON+zQnF7OcZNPyXCMWHXbhlouzlzl0LSrcMB rnSig/YlKiQ6zt6FfduLO/JNWnLqiDQiurRCWKCo1zoS693WlqrHT9xP6msg344F DqENkDsVrNvkqBaTI9+Rd8OVwd3rWGl9k6AzJApZ9CCAvqNAzRJ3Mca/Z2ISM94r DLVKvsFaHYUjv47nVHQKpAqeg8NKwtG/qGTCEcfN1J9e3YSMGfQgLhRkw1I39hWQ L94imUHVb23kdjXPpTGtyvLOWGJMBqw91mGJF4g5Y9aVI1wfTZ7r+SeAPNA/SqTT X7/t2bl1+oGiWFWn1KFk9jAjxy3IHED7Wvaf9HzOYhvUvKDQCBI= =TZUc -----END PGP SIGNATURE----- --==-=-=--