* bug#36518: [core-updates] python-boot0 fails to build on armhf and aarch64
@ 2019-07-05 23:44 Marius Bakke
2019-07-06 9:35 ` Ricardo Wurmus
0 siblings, 1 reply; 3+ messages in thread
From: Marius Bakke @ 2019-07-05 23:44 UTC (permalink / raw)
To: 36518
[-- Attachment #1.1: Type: text/plain, Size: 241 bytes --]
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:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: Type: text/x-patch, Size: 618 bytes --]
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)
[-- Attachment #1.3: Type: text/plain, Size: 212 bytes --]
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:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.4: Type: text/x-patch, Size: 1376 bytes --]
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.)
[-- Attachment #1.5: Type: text/plain, Size: 309 bytes --]
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?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply related [flat|nested] 3+ messages in thread
* bug#36518: [core-updates] python-boot0 fails to build on armhf and aarch64
2019-07-05 23:44 bug#36518: [core-updates] python-boot0 fails to build on armhf and aarch64 Marius Bakke
@ 2019-07-06 9:35 ` Ricardo Wurmus
2019-07-07 14:42 ` Marius Bakke
0 siblings, 1 reply; 3+ messages in thread
From: Ricardo Wurmus @ 2019-07-06 9:35 UTC (permalink / raw)
To: mbakke; +Cc: 36518
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#36518: [core-updates] python-boot0 fails to build on armhf and aarch64
2019-07-06 9:35 ` Ricardo Wurmus
@ 2019-07-07 14:42 ` Marius Bakke
0 siblings, 0 replies; 3+ messages in thread
From: Marius Bakke @ 2019-07-07 14:42 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: 36518-done
[-- Attachment #1: Type: text/plain, Size: 1466 bytes --]
Ricardo Wurmus <rekado@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.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-07-07 14:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-05 23:44 bug#36518: [core-updates] python-boot0 fails to build on armhf and aarch64 Marius Bakke
2019-07-06 9:35 ` Ricardo Wurmus
2019-07-07 14:42 ` Marius Bakke
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.