From unknown Sat Aug 09 13:21:09 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#67021] [PATCH] gnu: ruby: Fix cross-compilation. Resent-From: Zheng Junjie Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, guix-patches@gnu.org Resent-Date: Thu, 09 Nov 2023 17:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 67021 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 67021@debbugs.gnu.org Cc: Christopher Baines X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Christopher Baines Received: via spool by submit@debbugs.gnu.org id=B.16995515622682 (code B ref -1); Thu, 09 Nov 2023 17:40:01 +0000 Received: (at submit) by debbugs.gnu.org; 9 Nov 2023 17:39:22 +0000 Received: from localhost ([127.0.0.1]:48670 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r18zx-0000hC-Hr for submit@debbugs.gnu.org; Thu, 09 Nov 2023 12:39:21 -0500 Received: from lists.gnu.org ([2001:470:142::17]:43174) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r18zv-0000gx-Lu for submit@debbugs.gnu.org; Thu, 09 Nov 2023 12:39:20 -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 1r18zC-0001Js-Qs for guix-patches@gnu.org; Thu, 09 Nov 2023 12:38:34 -0500 Received: from smtp81.cstnet.cn ([159.226.251.81] helo=cstnet.cn) by eggs.gnu.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1r18zA-0003SN-3R for guix-patches@gnu.org; Thu, 09 Nov 2023 12:38:34 -0500 Received: from localhost.localdomain (unknown [183.247.5.45]) by APP-03 (Coremail) with SMTP id rQCowAD3_z8IGU1lBJTYAw--.23010S2; Fri, 10 Nov 2023 01:38:18 +0800 (CST) From: Zheng Junjie Date: Fri, 10 Nov 2023 01:37:10 +0800 Message-ID: <49737492e6f2c7ba3cf00ddb45fe5fb53476cf94.1699551430.git.zhengjunjie@iscas.ac.cn> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Type: text/plain; charset=y Content-Transfer-Encoding: 8bit X-CM-TRANSID: rQCowAD3_z8IGU1lBJTYAw--.23010S2 X-Coremail-Antispam: 1UD129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UjIYCTnIWjp_UUUYS7k0a2IF6F4UM7kC6x804xWl14x267AK xVWUJVW8JwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0rVWrJVCq3wAFIxvE14AKwVWUJVWUGw A2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK021l84ACjcxK6xIIjxv20xvE14v26w1j 6s0DM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26r4UJVWxJr1l84ACjcxK6I8E87Iv67AKxV WxJr0_GcWl84ACjcxK6I8E87Iv6xkF7I0E14v26rxl6s0DM2AIxVAIcxkEcVAq07x20xvE ncxIr21le4C262xC7I0v67AEwI8IwI1l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjx v20xvE14v26r1j6r18McIj6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr1l F7xvr2IYc2Ij64vIr41lw4CEx2IqxVAFz4v204v26I0v724l42xK82IYc2Ij64vIr41l4I 8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AK xVWUJVWUGwC2zVAF1VAY17CE14v26r1j6r15MIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcV AFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE42xK8VAvwI8I cIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r 1j6r4UYxBIdaVFxhVjvjDU0xZFpf9x07jeXdbUUUUU= X-Originating-IP: [183.247.5.45] X-CM-SenderInfo: x2kh0wxmxqyx3h6l2u1dvotugofq/ Received-SPF: pass client-ip=159.226.251.81; envelope-from=zhengjunjie@iscas.ac.cn; helo=cstnet.cn X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, 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: 2.9 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: * gnu/packages/ruby.scm (ruby-2.6, ruby-2.7): Fix cross-compilation. [native-inputs]: when cross-compilation, add this-package. [arguments]<#:configure-flags>: when cross-compilation, add LDFLAGS. Change-Id: Iba6665ba3b1b3d5b3a9b6830a01f0f3284e35efb --- gnu/packages/ruby.scm | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) Content analysis details: (2.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.9 SPF_FAIL SPF: sender does not match SPF record (fail) [SPF failed: Please see http://www.openspf.org/Why?s=mfrom; id=zhengjunjie%40iscas.ac.cn; ip=2001%3A470%3A142%3A%3A17; r=debbugs.gnu.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: gorski.stream (stream)] 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: 1.9 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: * gnu/packages/ruby.scm (ruby-2.6,ruby-2.7): Fix cross-compilation. [native-inputs]: when cross-compilation, add this-package. [arguments]<#:configure-flags>: when cross-compilation, add LDFLAGS. Change-Id: Iba6665ba3b1b3d5b3a9b6830a01f0f3284e35efb --- gnu/packages/ruby.scm | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) Content analysis details: (1.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.9 SPF_FAIL SPF: sender does not match SPF record (fail) [SPF failed: Please see http://www.openspf.org/Why?s=mfrom;id=zhengjunjie%40iscas.ac.cn;ip=2001%3A470%3A142%3A%3A17;r=debbugs.gnu.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: gorski.stream (stream)] -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager * gnu/packages/ruby.scm (ruby-2.6,ruby-2.7): Fix cross-compilation. [native-inputs]: when cross-compilation, add this-package. [arguments]<#:configure-flags>: when cross-compilation, add LDFLAGS. Change-Id: Iba6665ba3b1b3d5b3a9b6830a01f0f3284e35efb --- gnu/packages/ruby.scm | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index ff6829082c..1490c783fa 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -34,6 +34,7 @@ ;;; Copyright © 2023 Yovan Naumovski ;;; Copyright © 2023 gemmaro ;;; Copyright © 2023 Janneke Nieuwenhuizen +;;; Copyright © 2023 Zheng Junjie <873216071@qq.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -129,7 +130,13 @@ (define-public ruby-2.6 (build-system gnu-build-system) (arguments `(#:test-target "test" - #:configure-flags '("--enable-shared") ; dynamic linking + #:configure-flags + ,(if (%current-target-system) + '(list (string-append + "LDFLAGS=-Wl,-rpath=" + (assoc-ref %outputs "out") "/lib") + "--enable-shared") + ''("--enable-shared")) ; dynamic linking #:phases (modify-phases %standard-phases (add-before 'configure 'replace-bin-sh-and-remove-libffi @@ -147,6 +154,9 @@ (define-public ruby-2.6 "tool/rbinstall.rb") (("/bin/sh") (which "sh"))) #t))))) + (native-inputs (if (%current-target-system) + (list this-package) + '())) (inputs (list readline openssl-1.1 libffi gdbm)) (propagated-inputs @@ -177,7 +187,13 @@ (define-public ruby-2.7 "042xrdk7hsv4072bayz3f8ffqh61i8zlhvck10nfshllq063n877")))) (arguments `(#:test-target "test" - #:configure-flags '("--enable-shared") ; dynamic linking + #:configure-flags + ,(if (%current-target-system) + '(list (string-append + "LDFLAGS=-Wl,-rpath=" + (assoc-ref %outputs "out") "/lib") + "--enable-shared") + ''("--enable-shared")) ; dynamic linking #:phases (modify-phases %standard-phases (add-before 'configure 'replace-bin-sh-and-remove-libffi @@ -204,7 +220,10 @@ (define-public ruby-2.7 (delete-file "test/ruby/test_io.rb")))) '())))) (native-inputs - (list autoconf)))) + (append (if (%current-target-system) + (list this-package) + '()) + (list autoconf))))) (define ruby-2.7-fixed (package base-commit: 42bec70a91d2205371c96287bcf565dcc5f5dd74 -- 2.41.0 From unknown Sat Aug 09 13:21:09 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: Zheng Junjie Subject: bug#67021: closed (Re: [bug#67021] [PATCH] gnu: ruby: Fix cross-compilation.) Message-ID: References: <877cmnghrc.fsf@cbaines.net> <49737492e6f2c7ba3cf00ddb45fe5fb53476cf94.1699551430.git.zhengjunjie@iscas.ac.cn> X-Gnu-PR-Message: they-closed 67021 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 67021@debbugs.gnu.org Date: Sun, 12 Nov 2023 14:38:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1699799882-28199-1" This is a multi-part message in MIME format... ------------=_1699799882-28199-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #67021: [PATCH] gnu: ruby: Fix 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 67021@debbugs.gnu.org. --=20 67021: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D67021 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1699799882-28199-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 67021-done) by debbugs.gnu.org; 12 Nov 2023 14:37:56 +0000 Received: from localhost ([127.0.0.1]:55279 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r2Bb2-0007KW-1A for submit@debbugs.gnu.org; Sun, 12 Nov 2023 09:37:56 -0500 Received: from mira.cbaines.net ([2a01:7e00:e000:2f8:fd4d:b5c7:13fb:3d27]:44701) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r2Baz-0007KN-OW for 67021-done@debbugs.gnu.org; Sun, 12 Nov 2023 09:37:54 -0500 Received: from localhost (unknown [217.155.61.229]) by mira.cbaines.net (Postfix) with ESMTPSA id 506EA27BBE2; Sun, 12 Nov 2023 14:37:12 +0000 (GMT) Received: from felis (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 17f94f29; Sun, 12 Nov 2023 14:37:11 +0000 (UTC) References: <49737492e6f2c7ba3cf00ddb45fe5fb53476cf94.1699551430.git.zhengjunjie@iscas.ac.cn> User-agent: mu4e 1.10.7; emacs 29.1 From: Christopher Baines To: Zheng Junjie Subject: Re: [bug#67021] [PATCH] gnu: ruby: Fix cross-compilation. Date: Sun, 12 Nov 2023 14:34:29 +0000 In-reply-to: <49737492e6f2c7ba3cf00ddb45fe5fb53476cf94.1699551430.git.zhengjunjie@iscas.ac.cn> Message-ID: <877cmnghrc.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 67021-done Cc: 67021-done@debbugs.gnu.org, guix-patches@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: -1.0 (-) --=-=-= Content-Type: text/plain Zheng Junjie writes: > * gnu/packages/ruby.scm (ruby-2.6,ruby-2.7): Fix cross-compilation. > [native-inputs]: when cross-compilation, add this-package. > [arguments]<#:configure-flags>: when cross-compilation, add LDFLAGS. > > Change-Id: Iba6665ba3b1b3d5b3a9b6830a01f0f3284e35efb > --- > gnu/packages/ruby.scm | 25 ++++++++++++++++++++++--- > 1 file changed, 22 insertions(+), 3 deletions(-) Thanks for the patch, I tried building ruby for aarch64 with this change and it seems to work for me. I've pushed it to master as e35b7c5386c1bfacf47ed31bac9b503373dd26fc. Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmVQ4xdfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh aW5lcy5uZXQACgkQXiijOwuE9XdAwRAAmjJxPbUqKQpgxY6ZK14jEWHCj44GXd0C m6SnJuMcun48BqZA7abiLvJGjFyOOrPJ49AVY09AOn/3KlnpMeioQV8lBQF95WiQ svwoiMyTgvQp3dyCQiaVCkDTGS8TaJRiRJYTQxPDkczmVxdQ5rzwnlI0LJZoCdl4 ien2qKtjnKjAn7crzLbROMs0S4tzIo/oN5yWNShHsPuEGbIAWj+Qe5YBQNY0lCWQ nxjPSzJai7/aTS2seEzQEdUh7StQU6/AzPgZo1T1QtrOq7ecMP/YelzDcRyZ48JL EePQwJzUxQ8h4OBfDk+gCbsOo8KX0J/cqTeS4cjsna2ENaxAl++vWlCn8yMWUIRW hlIpWnAVrlIjWaOnyKZ63YQIP1BvlrBnOE1sf7mVU2N0DJ6GG4ylo/km99Dt/dIG VSXJbidXBv+yV24dyYfZcUveBxzlWCHnEaUZ+zENG/dPFIdX1bS53BPm2TyMJbGh sWWZ44GDsoL7nfvPSAFN5vHS7rneW46bS/oM1Q5p16cHcKlJh0w9OxLkXsSgfGyU g+nCf4WJWrbVlMqADtdZ9sHr7Inq7IT9A5ODQya0vwdI4IlUTNc9SPFi94oNki44 pKh3yvtwfHYHFly6WILr002RGT3sKvW2IZpaGh3gIcNZtLImDretzIXBRiwtT5cM i8JvU9Iyfx4= =9+df -----END PGP SIGNATURE----- --=-=-=-- ------------=_1699799882-28199-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 9 Nov 2023 17:39:22 +0000 Received: from localhost ([127.0.0.1]:48670 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r18zx-0000hC-Hr for submit@debbugs.gnu.org; Thu, 09 Nov 2023 12:39:21 -0500 Received: from lists.gnu.org ([2001:470:142::17]:43174) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r18zv-0000gx-Lu for submit@debbugs.gnu.org; Thu, 09 Nov 2023 12:39:20 -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 1r18zC-0001Js-Qs for guix-patches@gnu.org; Thu, 09 Nov 2023 12:38:34 -0500 Received: from smtp81.cstnet.cn ([159.226.251.81] helo=cstnet.cn) by eggs.gnu.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1r18zA-0003SN-3R for guix-patches@gnu.org; Thu, 09 Nov 2023 12:38:34 -0500 Received: from localhost.localdomain (unknown [183.247.5.45]) by APP-03 (Coremail) with SMTP id rQCowAD3_z8IGU1lBJTYAw--.23010S2; Fri, 10 Nov 2023 01:38:18 +0800 (CST) From: Zheng Junjie To: guix-patches@gnu.org Subject: [PATCH] gnu: ruby: Fix cross-compilation. Date: Fri, 10 Nov 2023 01:37:10 +0800 Message-ID: <49737492e6f2c7ba3cf00ddb45fe5fb53476cf94.1699551430.git.zhengjunjie@iscas.ac.cn> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-Debbugs-Cc: Christopher Baines Content-Type: text/plain; charset=y Content-Transfer-Encoding: 8bit X-CM-TRANSID: rQCowAD3_z8IGU1lBJTYAw--.23010S2 X-Coremail-Antispam: 1UD129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UjIYCTnIWjp_UUUYS7k0a2IF6F4UM7kC6x804xWl14x267AK xVWUJVW8JwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0rVWrJVCq3wAFIxvE14AKwVWUJVWUGw A2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK021l84ACjcxK6xIIjxv20xvE14v26w1j 6s0DM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26r4UJVWxJr1l84ACjcxK6I8E87Iv67AKxV WxJr0_GcWl84ACjcxK6I8E87Iv6xkF7I0E14v26rxl6s0DM2AIxVAIcxkEcVAq07x20xvE ncxIr21le4C262xC7I0v67AEwI8IwI1l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjx v20xvE14v26r1j6r18McIj6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr1l F7xvr2IYc2Ij64vIr41lw4CEx2IqxVAFz4v204v26I0v724l42xK82IYc2Ij64vIr41l4I 8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AK xVWUJVWUGwC2zVAF1VAY17CE14v26r1j6r15MIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcV AFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE42xK8VAvwI8I cIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r 1j6r4UYxBIdaVFxhVjvjDU0xZFpf9x07jeXdbUUUUU= X-Originating-IP: [183.247.5.45] X-CM-SenderInfo: x2kh0wxmxqyx3h6l2u1dvotugofq/ Received-SPF: pass client-ip=159.226.251.81; envelope-from=zhengjunjie@iscas.ac.cn; helo=cstnet.cn X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, 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: 2.9 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: * gnu/packages/ruby.scm (ruby-2.6, ruby-2.7): Fix cross-compilation. [native-inputs]: when cross-compilation, add this-package. [arguments]<#:configure-flags>: when cross-compilation, add LDFLAGS. Change-Id: Iba6665ba3b1b3d5b3a9b6830a01f0f3284e35efb --- gnu/packages/ruby.scm | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) Content analysis details: (2.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.9 SPF_FAIL SPF: sender does not match SPF record (fail) [SPF failed: Please see http://www.openspf.org/Why?s=mfrom; id=zhengjunjie%40iscas.ac.cn; ip=2001%3A470%3A142%3A%3A17; r=debbugs.gnu.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: gorski.stream (stream)] X-Debbugs-Envelope-To: submit 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: 1.9 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: * gnu/packages/ruby.scm (ruby-2.6,ruby-2.7): Fix cross-compilation. [native-inputs]: when cross-compilation, add this-package. [arguments]<#:configure-flags>: when cross-compilation, add LDFLAGS. Change-Id: Iba6665ba3b1b3d5b3a9b6830a01f0f3284e35efb --- gnu/packages/ruby.scm | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) Content analysis details: (1.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.9 SPF_FAIL SPF: sender does not match SPF record (fail) [SPF failed: Please see http://www.openspf.org/Why?s=mfrom;id=zhengjunjie%40iscas.ac.cn;ip=2001%3A470%3A142%3A%3A17;r=debbugs.gnu.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: gorski.stream (stream)] -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager * gnu/packages/ruby.scm (ruby-2.6,ruby-2.7): Fix cross-compilation. [native-inputs]: when cross-compilation, add this-package. [arguments]<#:configure-flags>: when cross-compilation, add LDFLAGS. Change-Id: Iba6665ba3b1b3d5b3a9b6830a01f0f3284e35efb --- gnu/packages/ruby.scm | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index ff6829082c..1490c783fa 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -34,6 +34,7 @@ ;;; Copyright © 2023 Yovan Naumovski ;;; Copyright © 2023 gemmaro ;;; Copyright © 2023 Janneke Nieuwenhuizen +;;; Copyright © 2023 Zheng Junjie <873216071@qq.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -129,7 +130,13 @@ (define-public ruby-2.6 (build-system gnu-build-system) (arguments `(#:test-target "test" - #:configure-flags '("--enable-shared") ; dynamic linking + #:configure-flags + ,(if (%current-target-system) + '(list (string-append + "LDFLAGS=-Wl,-rpath=" + (assoc-ref %outputs "out") "/lib") + "--enable-shared") + ''("--enable-shared")) ; dynamic linking #:phases (modify-phases %standard-phases (add-before 'configure 'replace-bin-sh-and-remove-libffi @@ -147,6 +154,9 @@ (define-public ruby-2.6 "tool/rbinstall.rb") (("/bin/sh") (which "sh"))) #t))))) + (native-inputs (if (%current-target-system) + (list this-package) + '())) (inputs (list readline openssl-1.1 libffi gdbm)) (propagated-inputs @@ -177,7 +187,13 @@ (define-public ruby-2.7 "042xrdk7hsv4072bayz3f8ffqh61i8zlhvck10nfshllq063n877")))) (arguments `(#:test-target "test" - #:configure-flags '("--enable-shared") ; dynamic linking + #:configure-flags + ,(if (%current-target-system) + '(list (string-append + "LDFLAGS=-Wl,-rpath=" + (assoc-ref %outputs "out") "/lib") + "--enable-shared") + ''("--enable-shared")) ; dynamic linking #:phases (modify-phases %standard-phases (add-before 'configure 'replace-bin-sh-and-remove-libffi @@ -204,7 +220,10 @@ (define-public ruby-2.7 (delete-file "test/ruby/test_io.rb")))) '())))) (native-inputs - (list autoconf)))) + (append (if (%current-target-system) + (list this-package) + '()) + (list autoconf))))) (define ruby-2.7-fixed (package base-commit: 42bec70a91d2205371c96287bcf565dcc5f5dd74 -- 2.41.0 ------------=_1699799882-28199-1-- From unknown Sat Aug 09 13:21:09 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#67021] [PATCH] gnu: ruby: Fix cross-compilation. Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 12 Nov 2023 14:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67021 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Zheng Junjie Cc: 67021-done@debbugs.gnu.org, 67021@debbugs.gnu.org X-Debbugs-Original-Cc: 67021-done@debbugs.gnu.org, guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.169979988628252 (code B ref -1); Sun, 12 Nov 2023 14:39:02 +0000 Received: (at submit) by debbugs.gnu.org; 12 Nov 2023 14:38:06 +0000 Received: from localhost ([127.0.0.1]:55286 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r2BbC-0007Lc-Af for submit@debbugs.gnu.org; Sun, 12 Nov 2023 09:38:06 -0500 Received: from lists.gnu.org ([2001:470:142::17]:55482) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r2BbA-0007Kd-H3 for submit@debbugs.gnu.org; Sun, 12 Nov 2023 09:38:04 -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 1r2BaN-0004mH-JA for guix-patches@gnu.org; Sun, 12 Nov 2023 09:37:15 -0500 Received: from mira.cbaines.net ([2a01:7e00:e000:2f8:fd4d:b5c7:13fb:3d27]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r2BaL-0007Kn-10 for guix-patches@gnu.org; Sun, 12 Nov 2023 09:37:14 -0500 Received: from localhost (unknown [217.155.61.229]) by mira.cbaines.net (Postfix) with ESMTPSA id 506EA27BBE2; Sun, 12 Nov 2023 14:37:12 +0000 (GMT) Received: from felis (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 17f94f29; Sun, 12 Nov 2023 14:37:11 +0000 (UTC) References: <49737492e6f2c7ba3cf00ddb45fe5fb53476cf94.1699551430.git.zhengjunjie@iscas.ac.cn> User-agent: mu4e 1.10.7; emacs 29.1 From: Christopher Baines Date: Sun, 12 Nov 2023 14:34:29 +0000 In-reply-to: <49737492e6f2c7ba3cf00ddb45fe5fb53476cf94.1699551430.git.zhengjunjie@iscas.ac.cn> Message-ID: <877cmnghrc.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: pass client-ip=2a01:7e00:e000:2f8:fd4d:b5c7:13fb:3d27; envelope-from=mail@cbaines.net; helo=mira.cbaines.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, 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: 0.9 (/) 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.1 (/) --=-=-= Content-Type: text/plain Zheng Junjie writes: > * gnu/packages/ruby.scm (ruby-2.6,ruby-2.7): Fix cross-compilation. > [native-inputs]: when cross-compilation, add this-package. > [arguments]<#:configure-flags>: when cross-compilation, add LDFLAGS. > > Change-Id: Iba6665ba3b1b3d5b3a9b6830a01f0f3284e35efb > --- > gnu/packages/ruby.scm | 25 ++++++++++++++++++++++--- > 1 file changed, 22 insertions(+), 3 deletions(-) Thanks for the patch, I tried building ruby for aarch64 with this change and it seems to work for me. I've pushed it to master as e35b7c5386c1bfacf47ed31bac9b503373dd26fc. Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmVQ4xdfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh aW5lcy5uZXQACgkQXiijOwuE9XdAwRAAmjJxPbUqKQpgxY6ZK14jEWHCj44GXd0C m6SnJuMcun48BqZA7abiLvJGjFyOOrPJ49AVY09AOn/3KlnpMeioQV8lBQF95WiQ svwoiMyTgvQp3dyCQiaVCkDTGS8TaJRiRJYTQxPDkczmVxdQ5rzwnlI0LJZoCdl4 ien2qKtjnKjAn7crzLbROMs0S4tzIo/oN5yWNShHsPuEGbIAWj+Qe5YBQNY0lCWQ nxjPSzJai7/aTS2seEzQEdUh7StQU6/AzPgZo1T1QtrOq7ecMP/YelzDcRyZ48JL EePQwJzUxQ8h4OBfDk+gCbsOo8KX0J/cqTeS4cjsna2ENaxAl++vWlCn8yMWUIRW hlIpWnAVrlIjWaOnyKZ63YQIP1BvlrBnOE1sf7mVU2N0DJ6GG4ylo/km99Dt/dIG VSXJbidXBv+yV24dyYfZcUveBxzlWCHnEaUZ+zENG/dPFIdX1bS53BPm2TyMJbGh sWWZ44GDsoL7nfvPSAFN5vHS7rneW46bS/oM1Q5p16cHcKlJh0w9OxLkXsSgfGyU g+nCf4WJWrbVlMqADtdZ9sHr7Inq7IT9A5ODQya0vwdI4IlUTNc9SPFi94oNki44 pKh3yvtwfHYHFly6WILr002RGT3sKvW2IZpaGh3gIcNZtLImDretzIXBRiwtT5cM i8JvU9Iyfx4= =9+df -----END PGP SIGNATURE----- --=-=-=--