From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: Re: perl for arm-linux-gnueabihf Date: Sun, 20 Jan 2019 23:39:23 +0100 Message-ID: <8736pnneck.fsf@gnu.org> References: <87a7jxf0b9.fsf@elephly.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:56644) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1glLkl-0006tf-Fw for guix-devel@gnu.org; Sun, 20 Jan 2019 17:39:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1glLkg-0002YV-CO for guix-devel@gnu.org; Sun, 20 Jan 2019 17:39:43 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:51268) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1glLkd-0002WB-C1 for guix-devel@gnu.org; Sun, 20 Jan 2019 17:39:36 -0500 In-Reply-To: <87a7jxf0b9.fsf@elephly.net> (Ricardo Wurmus's message of "Sat, 19 Jan 2019 10:45:14 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ricardo Wurmus Cc: guix-devel@gnu.org, 27149@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello, Ricardo Wurmus skribis: >> *guix build --target=3Darm-linux-gnueabihf* *perl* fails with the follow= ing >> output: https://pastebin.com/QF0xKAmR > > Here=E2=80=99s the output copied from pastebin: > > starting phase `remove-extra-references' [...] > 1 (string-append "incpth=3D'" #f "/include'\n") > In ice-9/boot-9.scm: > 752:25 0 (dispatch-exception _ _ _) > > ice-9/boot-9.scm:752:25: In procedure dispatch-exception: > In procedure string-append: Wrong type (expecting string): #f > builder for `/gnu/store/zj5xld149ibdyc4nlm2dj41jnjm9bqyn-perl-5.28.0.drv'= failed with exit code 1 > build of /gnu/store/zj5xld149ibdyc4nlm2dj41jnjm9bqyn-perl-5.28.0.drv fail= ed > > I have never tried to cross-compiled packages for =E2=80=9Carm-linux-gnue= abihf=E2=80=9D. > I don=E2=80=99t know if this is expected to work. The =E2=80=9Carm-linux-gnueabihf=E2=80=9D is a cross-compilation triplet th= at we generally support. However, note, G=C3=A9rard, that not all packages in Gu= ix can be successfully cross-compiled, and Perl is one that fails to cross build. We are not committed to supporting cross-compilation of every package, but we=E2=80=99re of course happy to make the feature more useful. The patch below is the beginning of a fix, but as it is, it builds a native Perl. To address that, we need to fiddle with Perl=E2=80=99s peculi= ar build system. If you know how to instruct it to cross-build, let=E2=80=99s address this! :-) Thanks, Ludo=E2=80=99. PS: This issue was previously reported at so I suggest we keep discussing it there. --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm index c4d9d64de3..109a4c1154 100644 --- a/gnu/packages/perl.scm +++ b/gnu/packages/perl.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright =C2=A9 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Court=C3= =A8s +;;; Copyright =C2=A9 2012, 2013, 2014, 2015, 2016, 2017, 2019 Ludovic Cour= t=C3=A8s ;;; Copyright =C2=A9 2013 Andreas Enge ;;; Copyright =C2=A9 2015, 2016, 2017, 2019 Ricardo Wurmus ;;; Copyright =C2=A9 2015, 2016, 2017 Eric Bavier @@ -78,7 +78,7 @@ "perl-reproducible-build-date.patch")))) (build-system gnu-build-system) (arguments - '(#:tests? #f + `(#:tests? #f #:configure-flags (let ((out (assoc-ref %outputs "out")) (libc (assoc-ref %build-inputs "libc"))) @@ -127,7 +127,10 @@ (add-after 'install 'remove-extra-references (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) - (libc (assoc-ref inputs "libc")) + (libc (assoc-ref inputs + ,(if (%current-target-system) + "cross-libc" + "libc"))) (config1 (car (find-files (string-append out "/lib/per= l5") "^Config_heavy\\.pl$"))) (config2 (find-files (string-append out "/lib/perl5") --=-=-=--