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

Previous Next

Package: guix;

Reported by: Ricardo Wurmus <rekado <at> elephly.net>

Date: Tue, 30 May 2017 15:02:02 UTC

Severity: normal

Merged with 31221

Done: Jan Nieuwenhuizen <janneke <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 27149 in the body.
You can then email your comments to 27149 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#27149; Package guix. (Tue, 30 May 2017 15:02:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ricardo Wurmus <rekado <at> elephly.net>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Tue, 30 May 2017 15:02:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: bug-guix <at> gnu.org
Subject: ‘perl-build-system’ does not support
 cross-compilation
Date: Tue, 30 May 2017 17:01:12 +0200
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





Merged 27149 31221. Request was from Ricardo Wurmus <rekado <at> elephly.net> to control <at> debbugs.gnu.org. (Mon, 23 Apr 2018 07:53:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-guix <at> gnu.org:
bug#27149; Package guix. (Sun, 20 Jan 2019 22:40:01 GMT) Full text and rfc822 format available.

Message #10 received at 27149 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Ricardo Wurmus <rekado <at> elephly.net>
Cc: guix-devel <at> gnu.org, 27149 <at> debbugs.gnu.org,
 Gérald Lelong <lelong.gerald <at> gmail.com>
Subject: Re: perl for arm-linux-gnueabihf
Date: Sun, 20 Jan 2019 23:39:23 +0100
[Message part 1 (text/plain, inline)]
Hello,

Ricardo Wurmus <rekado <at> elephly.net> skribis:

>> *guix build --target=arm-linux-gnueabihf* *perl* fails with the following
>> output: https://pastebin.com/QF0xKAmR
>
> Here’s the output copied from pastebin:
>
> starting phase `remove-extra-references'

[...]

>            1 (string-append "incpth='" #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 failed
>
> I have never tried to cross-compiled packages for “arm-linux-gnueabihf”.
> I don’t know if this is expected to work.

The “arm-linux-gnueabihf” is a cross-compilation triplet that we
generally support.  However, note, Gérard, that not all packages in Guix
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’re 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’s peculiar
build system.  If you know how to instruct it to cross-build, let’s
address this!  :-)

Thanks,
Ludo’.

PS: This issue was previously reported at
    <https://issues.guix.info/issue/27149> so I suggest we keep
    discussing it there.

[Message part 2 (text/x-patch, inline)]
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 © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2019 Ludovic Courtès <ludo <at> gnu.org>
 ;;; Copyright © 2013 Andreas Enge <andreas <at> enge.fr>
 ;;; Copyright © 2015, 2016, 2017, 2019 Ricardo Wurmus <rekado <at> elephly.net>
 ;;; Copyright © 2015, 2016, 2017 Eric Bavier <bavier <at> member.fsf.org>
@@ -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/perl5")
                                               "^Config_heavy\\.pl$")))
                     (config2 (find-files (string-append out "/lib/perl5")


Reply sent to Jan Nieuwenhuizen <janneke <at> gnu.org>:
You have taken responsibility. (Tue, 11 Aug 2020 09:02:02 GMT) Full text and rfc822 format available.

Notification sent to Ricardo Wurmus <rekado <at> elephly.net>:
bug acknowledged by developer. (Tue, 11 Aug 2020 09:02:02 GMT) Full text and rfc822 format available.

Message #15 received at 27149-done <at> debbugs.gnu.org (full text, mbox):

From: Jan Nieuwenhuizen <janneke <at> gnu.org>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: Ricardo Wurmus <rekado <at> elephly.net>, guix-devel <at> gnu.org,
 Gérald Lelong <lelong.gerald <at> gmail.com>,
 27149-done <at> debbugs.gnu.org
Subject: Re: bug#27149: perl for arm-linux-gnueabihf
Date: Tue, 11 Aug 2020 11:01:04 +0200
Ludovic Courtès writes:

>>> *guix build --target=arm-linux-gnueabihf* *perl* fails with the following
>>> output: https://pastebin.com/QF0xKAmR

This has been fixed by #40698.

Thanks,
Janneke

-- 
Jan Nieuwenhuizen <janneke <at> gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com




Reply sent to Jan Nieuwenhuizen <janneke <at> gnu.org>:
You have taken responsibility. (Tue, 11 Aug 2020 09:02:02 GMT) Full text and rfc822 format available.

Notification sent to Raphaël Mélotte <raphael.melotte <at> gmail.com>:
bug acknowledged by developer. (Tue, 11 Aug 2020 09:02:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 08 Sep 2020 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 290 days ago.

Previous Next


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