GNU bug report logs - #36518
[core-updates] python-boot0 fails to build on armhf and aarch64

Previous Next

Package: guix;

Reported by: Marius Bakke <mbakke <at> fastmail.com>

Date: Fri, 5 Jul 2019 23:46:02 UTC

Severity: normal

Done: Marius Bakke <mbakke <at> fastmail.com>

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 36518 in the body.
You can then email your comments to 36518 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#36518; Package guix. (Fri, 05 Jul 2019 23:46:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Marius Bakke <mbakke <at> fastmail.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Fri, 05 Jul 2019 23:46:02 GMT) Full text and rfc822 format available.

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

From: Marius Bakke <mbakke <at> fastmail.com>
To: bug-guix <at> gnu.org
Subject: [core-updates] python-boot0 fails to build on armhf and aarch64
Date: Sat, 06 Jul 2019 01:44:50 +0200
[Message part 1 (text/plain, inline)]
On the core-updates branch, since commit
5f3f70391809f8791c55c05bd1646bc58508fa2c, bootstrapping fails early for
armhf-linux and aarch64 when trying to build pkg-config (for
python-boot0).  That can be easily worked around with this patch:

[Message part 2 (text/x-patch, inline)]
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index d28296449d..183536d0b4 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -1866,6 +1866,7 @@ the bootstrap environment."
                   (inherit python-minimal)
                   (inputs
                    `(("expat" ,expat-sans-tests))) ;remove OpenSSL, zlib, etc.
+                  (native-inputs '())              ;and pkg-config
                   (arguments
                    (substitute-keyword-arguments (package-arguments
                                                   python-minimal)
[Message part 3 (text/plain, inline)]
But then Python fails at the configure stage because pthreads is not
working with the bootstrap compiler on those platforms.

I'm not sure what to do about it.  I tried using 'python-on-guile' with
this patch:

[Message part 4 (text/x-patch, inline)]
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index f26145cb0b..747ec7c594 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -816,6 +816,33 @@ with the Linux kernel.")
    (license lgpl2.0+)
    (home-page "https://www.gnu.org/software/libc/")))
 
+(define-public glibc-sans-python
+  (package
+    (inherit glibc)
+    (name "glibc-with-guile-python")
+    (arguments
+     (substitute-keyword-arguments (package-arguments glibc)
+       ((#:phases phases)
+        `(modify-phases ,phases
+           (add-after 'unpack 'patch-configure
+             (lambda _
+               ;; Relax Python version check.
+               (substitute* "configure"
+                 (("\\$critic_missing python") "")
+                 (("\\$PYTHON_PROG -B") "$PYTHON_PROG"))
+               #t))))))
+    (native-inputs `(("texinfo" ,texinfo)
+                     ("perl" ,perl)
+                     ("bison" ,bison)
+                     ("gettext" ,gettext-minimal)
+                     ("python" ,(@ (gnu packages guile-xyz) python-on-guile))
+                     ,@(if (hurd-target?)
+                           `(("mig" ,mig)
+                             ("perl" ,perl))
+                           '())))))
+
+
+
 ;; Below are old libc versions, which we use mostly to build locale data in
 ;; the old format (which the new libc cannot cope with.)
 
[Message part 5 (text/plain, inline)]
But the interpreter fails with 'unbound variable: this' upon running
glibcs Python scripts.

Until python-on-guile is complete enough to run the glibc scripts, I
think we'll have to insert an older version of glibc into the
bootstrap graph, so that Python can be built with pthreads on all
platforms.  WDYT?
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#36518; Package guix. (Sat, 06 Jul 2019 09:52:02 GMT) Full text and rfc822 format available.

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

From: Ricardo Wurmus <rekado <at> elephly.net>
To: mbakke <at> fastmail.com
Cc: 36518 <at> debbugs.gnu.org
Subject: Re: bug#36518: [core-updates] python-boot0 fails to build on armhf
 and aarch64
Date: Sat, 06 Jul 2019 11:35:57 +0200
Hi Marius,

> But the interpreter fails with 'unbound variable: this' upon running
> glibcs Python scripts.

This means it fell through to the case where “python” is called with
more than one argument:

--8<---------------cut here---------------start------------->8---
(define* (main #:optional (args (command-line)))
  (match args
    ((_ file)
     (let ((compiled (string-append file ".go")))
       (compile-file file
                     #:from python
                     #:output-file compiled)
       (load-compiled compiled)))
    ((_)
     (repl-default-option-set! 'prompt ">>> ")
     (set! (@@ (system repl common) repl-welcome)
           (const (display "\
Python on Guile, version 0.1.0
(Hit Ctrl-D to exit.)
")))
     (start-repl python)
     #t)
    (_ (format (current-error-port)
               "usage: ~a file.py~%" this))))
--8<---------------cut here---------------end--------------->8---

“this” was supposed to be the first match, i.e. the “python” executable
itself.  Anyway, the problem is that “python” doesn’t handle any flags
at all.  I’ll implement option “handling” soon (maybe we can ignore most
options to “python”).

--
Ricardo





Reply sent to Marius Bakke <mbakke <at> fastmail.com>:
You have taken responsibility. (Sun, 07 Jul 2019 14:43:03 GMT) Full text and rfc822 format available.

Notification sent to Marius Bakke <mbakke <at> fastmail.com>:
bug acknowledged by developer. (Sun, 07 Jul 2019 14:43:03 GMT) Full text and rfc822 format available.

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

From: Marius Bakke <mbakke <at> fastmail.com>
To: Ricardo Wurmus <rekado <at> elephly.net>
Cc: 36518-done <at> debbugs.gnu.org
Subject: Re: bug#36518: [core-updates] python-boot0 fails to build on armhf
 and aarch64
Date: Sun, 07 Jul 2019 16:42:35 +0200
[Message part 1 (text/plain, inline)]
Ricardo Wurmus <rekado <at> elephly.net> writes:

> Hi Marius,
>
>> But the interpreter fails with 'unbound variable: this' upon running
>> glibcs Python scripts.
>
> This means it fell through to the case where “python” is called with
> more than one argument:
>
> --8<---------------cut here---------------start------------->8---
> (define* (main #:optional (args (command-line)))
>   (match args
>     ((_ file)
>      (let ((compiled (string-append file ".go")))
>        (compile-file file
>                      #:from python
>                      #:output-file compiled)
>        (load-compiled compiled)))
>     ((_)
>      (repl-default-option-set! 'prompt ">>> ")
>      (set! (@@ (system repl common) repl-welcome)
>            (const (display "\
> Python on Guile, version 0.1.0
> (Hit Ctrl-D to exit.)
> ")))
>      (start-repl python)
>      #t)
>     (_ (format (current-error-port)
>                "usage: ~a file.py~%" this))))
> --8<---------------cut here---------------end--------------->8---
>
> “this” was supposed to be the first match, i.e. the “python” executable
> itself.  Anyway, the problem is that “python” doesn’t handle any flags
> at all.  I’ll implement option “handling” soon (maybe we can ignore most
> options to “python”).

I pushed a workaround in 4f5fe46388eb70055b6935df053f74b7ccdaf55f, which
uses an older version of Python that can be built without threads.
[signature.asc (application/pgp-signature, inline)]

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

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

Previous Next


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