GNU bug report logs - #27149
‘perl-build-system’ does not support cross-compilation

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix; Reported by: Ricardo Wurmus <rekado@HIDDEN>; merged with #31221; dated Tue, 30 May 2017 15:02:02 UTC; Maintainer for guix is bug-guix@HIDDEN.

Message received at 27149 <at> debbugs.gnu.org:


Received: (at 27149) by debbugs.gnu.org; 20 Jan 2019 22:39:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 20 17:39:42 2019
Received: from localhost ([127.0.0.1]:39258 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1glLkf-0006qt-EN
	for submit <at> debbugs.gnu.org; Sun, 20 Jan 2019 17:39:42 -0500
Received: from hera.aquilenet.fr ([185.233.100.1]:44914)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1glLkY-0006qg-Vv
 for 27149 <at> debbugs.gnu.org; Sun, 20 Jan 2019 17:39:35 -0500
Received: from localhost (localhost [127.0.0.1])
 by hera.aquilenet.fr (Postfix) with ESMTP id 0197C3B87;
 Sun, 20 Jan 2019 23:39:30 +0100 (CET)
X-Virus-Scanned: Debian amavisd-new at aquilenet.fr
Received: from hera.aquilenet.fr ([127.0.0.1])
 by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id hAToDy8N6jMN; Sun, 20 Jan 2019 23:39:25 +0100 (CET)
Received: from ribbon (unknown [IPv6:2a01:e0a:1d:7270:af76:b9b:ca24:c465])
 by hera.aquilenet.fr (Postfix) with ESMTPSA id 9D36A3B61;
 Sun, 20 Jan 2019 23:39:24 +0100 (CET)
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Ricardo Wurmus <rekado@HIDDEN>
Subject: Re: perl for arm-linux-gnueabihf
References: <CAHySp3Qip=XVVvYU=heehoaM+RD1U3AE8MBUh0iya=j0QXnzxQ@HIDDEN>
 <87a7jxf0b9.fsf@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 1 =?utf-8?Q?Pluvi=C3=B4se?= an 227 de la =?utf-8?Q?R?=
 =?utf-8?Q?=C3=A9volution?=
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Sun, 20 Jan 2019 23:39:23 +0100
In-Reply-To: <87a7jxf0b9.fsf@HIDDEN> (Ricardo Wurmus's message of "Sat,
 19 Jan 2019 10:45:14 +0100")
Message-ID: <8736pnneck.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 27149
Cc: guix-devel@HIDDEN, 27149 <at> debbugs.gnu.org,
 =?utf-8?Q?G=C3=A9rald?= Lelong <lelong.gerald@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Hello,

Ricardo Wurmus <rekado@HIDDEN> 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
    <https://issues.guix.info/issue/27149> 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 <ludo@HIDDEN>
+;;; Copyright =C2=A9 2012, 2013, 2014, 2015, 2016, 2017, 2019 Ludovic Cour=
t=C3=A8s <ludo@HIDDEN>
 ;;; Copyright =C2=A9 2013 Andreas Enge <andreas@HIDDEN>
 ;;; Copyright =C2=A9 2015, 2016, 2017, 2019 Ricardo Wurmus <rekado@elephly=
.net>
 ;;; Copyright =C2=A9 2015, 2016, 2017 Eric Bavier <bavier@HIDDEN>
@@ -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")


--=-=-=--




Information forwarded to bug-guix@HIDDEN:
bug#27149; Package guix. Full text available.
Merged 27149 31221. Request was from Ricardo Wurmus <rekado@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 30 May 2017 15:01:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 30 11:01:45 2017
Received: from localhost ([127.0.0.1]:45414 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dFieW-0006lM-Sg
	for submit <at> debbugs.gnu.org; Tue, 30 May 2017 11:01:45 -0400
Received: from eggs.gnu.org ([208.118.235.92]:43562)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rekado@HIDDEN>) id 1dFieU-0006lA-UW
 for submit <at> debbugs.gnu.org; Tue, 30 May 2017 11:01:43 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <rekado@HIDDEN>) id 1dFieM-0002ud-Lm
 for submit <at> debbugs.gnu.org; Tue, 30 May 2017 11:01:37 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:56164)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <rekado@HIDDEN>) id 1dFieM-0002uT-Il
 for submit <at> debbugs.gnu.org; Tue, 30 May 2017 11:01:34 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:34516)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <rekado@HIDDEN>) id 1dFieG-0002O3-QB
 for bug-guix@HIDDEN; Tue, 30 May 2017 11:01:34 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <rekado@HIDDEN>) id 1dFieD-0002tB-PZ
 for bug-guix@HIDDEN; Tue, 30 May 2017 11:01:28 -0400
Received: from sender-of-o51.zoho.com ([135.84.80.216]:21092)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <rekado@HIDDEN>) id 1dFieD-0002sz-9p
 for bug-guix@HIDDEN; Tue, 30 May 2017 11:01:25 -0400
Received: from localhost (141.80.148.190 [141.80.148.190]) by mx.zohomail.com
 with SMTPS id 1496156476231855.2707715608595;
 Tue, 30 May 2017 08:01:16 -0700 (PDT)
User-agent: mu4e 0.9.18; emacs 25.2.1
From: Ricardo Wurmus <rekado@HIDDEN>
To: bug-guix@HIDDEN
Subject: =?utf-8?Q?=E2=80=98perl-build-system=E2=80=99?= does not support
 cross-compilation
X-URL: https://elephly.net
X-PGP-Key: https://elephly.net/rekado.pubkey
X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
Date: Tue, 30 May 2017 17:01:12 +0200
Message-ID: <878tle4cef.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-ZohoMailClient: External
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

When trying to cross-build GCompris for armhf the build fails because
Perl dependencies cannot be cross-built.

The “perl-build-system” needs to be augmented to do the right thing when
cross-compilation is requested.  But what is the right thing to do?

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net





Acknowledgement sent to Ricardo Wurmus <rekado@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guix@HIDDEN. Full text available.
Report forwarded to bug-guix@HIDDEN:
bug#27149; Package guix. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.