unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* glibc 2.29 needs Python
@ 2019-05-30 10:39 Ludovic Courtès
  2019-05-30 11:29 ` Ricardo Wurmus
  0 siblings, 1 reply; 10+ messages in thread
From: Ludovic Courtès @ 2019-05-30 10:39 UTC (permalink / raw)
  To: Guix-devel

[-- Attachment #1: Type: text/plain, Size: 1029 bytes --]

Hello!

I started looking at what it would take to upgrade glibc to 2.29 on
‘core-updates’.  Bad news: it depends on Python.

I came up with the WIP patch below, but Python eventually fails to build
with:

--8<---------------cut here---------------start------------->8---
In file included from /tmp/guix-build-python-minimal-3.7.3.drv-0/Python-3.7.3/Modules/ossaudiodev.c:37:0:
/gnu/store/q4i9kq2py260y9ysq1qkjjhpgsmbdcbh-glibc-mesboot-2.16.0/include/sys/soundcard.h:1:29: fatal error: linux/soundcard.h: No such file or directory
 #include <linux/soundcard.h>
                             ^
compilation terminated.
--8<---------------cut here---------------end--------------->8---

Maybe we shouldn’t upgrade glibc in this ‘core-updates’ cycle.  We need
this reduced bootstrap merged!

Thoughts?

Also, it would be nice to use ‘python-on-guile’ here, but it doesn’t
provide a ‘python’ executable and I don’t know if it implements enough
to run these scripts.

Thanks,
Ludo’.


[-- Attachment #2: Type: text/x-patch, Size: 6179 bytes --]

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 9df0dc98d6..ab5bde793b 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014, 2019 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
 ;;; Copyright © 2014, 2015, 2016, 2018 Mark H Weaver <mhw@netris.org>
@@ -49,6 +49,7 @@
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages hurd)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages python)
   #:use-module (gnu packages gettext)
   #:use-module (guix utils)
   #:use-module (guix packages)
@@ -566,15 +567,13 @@ the store.")
   ;; version 2.28, GNU/Hurd used a different glibc branch.
   (package
    (name "glibc")
-   ;; Note: Always use a dot after the minor version since various places rely
-   ;; on "version-major+minor" to determine where locales are found.
-   (version "2.28")
+   (version "2.29")
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://gnu/glibc/glibc-" version ".tar.xz"))
             (sha256
              (base32
-              "10iha5ynvdj5m62vgpgqbq4cwvc2yhyl2w9yyyjgfxmdmx8h145i"))
+              "0jzh58728flfh939a8k9pi1zdyalfzlxmwra7k0rzji5gvavivpk"))
             (snippet
              ;; Disable 'ldconfig' and /etc/ld.so.cache.  The latter is
              ;; required on LFS distros to avoid loading the distro's libc.so
@@ -586,13 +585,13 @@ the store.")
                 #t))
             (modules '((guix build utils)))
             (patches (search-patches "glibc-ldd-x86_64.patch"
-                                     "glibc-2.28-git-fixes.patch"
                                      "glibc-hidden-visibility-ldconfig.patch"
                                      "glibc-versioned-locpath.patch"
                                      "glibc-allow-kernel-2.6.32.patch"
                                      "glibc-reinstate-prlimit64-fallback.patch"
-                                     "glibc-hurd-magic-pid.patch"
-                                     "glibc-supported-locales.patch"))))
+                                     ;; "glibc-hurd-magic-pid.patch"
+                                     ;; "glibc-supported-locales.patch"
+                                     ))))
    (build-system gnu-build-system)
 
    ;; Glibc's <limits.h> refers to <linux/limit.h>, for instance, so glibc
@@ -789,6 +788,7 @@ the store.")
                     ("perl" ,perl)
                     ("bison" ,bison)
                     ("gettext" ,gettext-minimal)
+                    ("python" ,python-minimal)
 
                     ,@(if (hurd-target?)
                           `(("mig" ,mig)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 8f59087ff4..4395e3dc5f 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
 ;;; Copyright © 2014, 2015, 2017 Mark H Weaver <mhw@netris.org>
@@ -44,10 +44,12 @@
   #:use-module (gnu packages compression)
   #:use-module (gnu packages mes)
   #:use-module (gnu packages perl)
+  #:use-module (gnu packages python)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages hurd)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages xml)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
@@ -1841,6 +1843,36 @@ the bootstrap environment."
                                    (current-source-location)
                                    #:guile %bootstrap-guile))))
 
+(define expat-sans-tests
+  (package
+    (inherit expat)
+    (arguments
+     ;; XXX: Linking 'runtestscpp' fails with things like:
+     ;;
+     ;;   ld: Dwarf Error: found dwarf version '3789', this reader only handles version 2 and 3 information.
+     ;;
+     ;; Skip tests altogether.
+     (substitute-keyword-arguments (package-arguments expat)
+       ((#:configure-flags flags ''())
+        ;; Since we're not passing the right -Wl,-rpath flags, build the
+        ;; static library to avoid RUNPATH validation failure.
+        `(cons "--disable-shared" ,flags))
+       ((#:tests? _ #f) #f)))))
+
+(define python-boot0
+  (let ((python (package
+                  (inherit python-minimal)
+                  (inputs
+                   `(("expat" ,expat-sans-tests)))     ;remove OpenSSL, zlib, etc.
+                  (arguments
+                   (substitute-keyword-arguments (package-arguments
+                                                  python-minimal)
+                     ((#:tests? _ #f) #f))))))
+    (package-with-bootstrap-guile
+     (package-with-explicit-inputs python %boot0-inputs
+                                   (current-source-location)
+                                   #:guile %bootstrap-guile))))
+
 (define (ld-wrapper-boot0)
   ;; We need this so binaries on Hurd will have libmachuser and libhurduser
   ;; in their RUNPATH, otherwise validate-runpath will fail.
@@ -1904,7 +1936,8 @@ the bootstrap environment."
      (native-inputs
       `(("bison" ,bison-boot0)
         ("texinfo" ,texinfo-boot0)
-        ("perl" ,perl-boot0)))
+        ("perl" ,perl-boot0)
+        ("python" ,python-boot0)))
      (inputs
       `(;; The boot inputs.  That includes the bootstrap libc.  We don't want
         ;; it in $CPATH, hence the 'pre-configure' phase above.

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: glibc 2.29 needs Python
  2019-05-30 10:39 glibc 2.29 needs Python Ludovic Courtès
@ 2019-05-30 11:29 ` Ricardo Wurmus
  2019-05-30 12:46   ` Giovanni Biscuolo
  2019-05-31 22:13   ` Ludovic Courtès
  0 siblings, 2 replies; 10+ messages in thread
From: Ricardo Wurmus @ 2019-05-30 11:29 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel


> I started looking at what it would take to upgrade glibc to 2.29 on
> ‘core-updates’.  Bad news: it depends on Python.

I had to check the date.  This is for real?

> Also, it would be nice to use ‘python-on-guile’ here, but it doesn’t
> provide a ‘python’ executable and I don’t know if it implements enough
> to run these scripts.

I’ll take a look at python-on-guile and see if we can run the scripts
with it.

-- 
Ricardo

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: glibc 2.29 needs Python
  2019-05-30 11:29 ` Ricardo Wurmus
@ 2019-05-30 12:46   ` Giovanni Biscuolo
  2019-05-31 22:13   ` Ludovic Courtès
  1 sibling, 0 replies; 10+ messages in thread
From: Giovanni Biscuolo @ 2019-05-30 12:46 UTC (permalink / raw)
  To: Ricardo Wurmus, Ludovic Courtès; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 952 bytes --]

Ricardo Wurmus <rekado@elephly.net> writes:

>> I started looking at what it would take to upgrade glibc to 2.29 on
>> ‘core-updates’.  Bad news: it depends on Python.
>
> I had to check the date.  This is for real?

It's for real:

--8<---------------cut here---------------start------------->8---
Changes to build and runtime requirements:

* Python 3.4 or later is required to build the GNU C Library.
--8<---------------cut here---------------end--------------->8---

https://sourceware.org/ml/libc-announce/2019/msg00000.html

AFAIU the relevant patch is
https://sourceware.org/git/?p=glibc.git;a=commit;h=c6982f7efc1c70fe2d6160a87ee44d871ac85ab0

Before that commit «Python is (was) required to build the GNU C Library
manual and to run some tests.» (and AFAIU tests was skipped if Python
was not available in the build environment)

[...]

Viva Guix! Gio'.

-- 
Giovanni Biscuolo

Xelera IT Infrastructures

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: glibc 2.29 needs Python
  2019-05-30 11:29 ` Ricardo Wurmus
  2019-05-30 12:46   ` Giovanni Biscuolo
@ 2019-05-31 22:13   ` Ludovic Courtès
  2019-06-01  8:48     ` Jan Nieuwenhuizen
  2019-06-20 14:09     ` Ricardo Wurmus
  1 sibling, 2 replies; 10+ messages in thread
From: Ludovic Courtès @ 2019-05-31 22:13 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

Howdy!

Ricardo Wurmus <rekado@elephly.net> skribis:

>> I started looking at what it would take to upgrade glibc to 2.29 on
>> ‘core-updates’.  Bad news: it depends on Python.
>
> I had to check the date.  This is for real?

It’s not a June 1st prank, I swear!

Also note that I did try to pass “ac_cv_path_PYTHON_PROG=true” and
variants thereof, but it really really needs Python to generate a few
things.

>> Also, it would be nice to use ‘python-on-guile’ here, but it doesn’t
>> provide a ‘python’ executable and I don’t know if it implements enough
>> to run these scripts.
>
> I’ll take a look at python-on-guile and see if we can run the scripts
> with it.

That’d be sweet!

Ludo’.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: glibc 2.29 needs Python
  2019-05-31 22:13   ` Ludovic Courtès
@ 2019-06-01  8:48     ` Jan Nieuwenhuizen
  2019-06-01 12:04       ` ng0
  2019-06-20 14:09     ` Ricardo Wurmus
  1 sibling, 1 reply; 10+ messages in thread
From: Jan Nieuwenhuizen @ 2019-06-01  8:48 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

Ludovic Courtès writes:

Hi!

>>> I started looking at what it would take to upgrade glibc to 2.29 on
>>> ‘core-updates’.  Bad news: it depends on Python.
>>
>> I had to check the date.  This is for real?
>
> It’s not a June 1st prank, I swear!

Oh, great... not.

>> I’ll take a look at python-on-guile and see if we can run the scripts
>> with it.
>
> That’d be sweet!

Yes! ... Although...how are we -- in the far future -- going to replace
Guile with Mes for the Guix bootstrap?  Could it be that the glibc
developers haven't seen my talk? :-/

janneke

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: glibc 2.29 needs Python
  2019-06-01  8:48     ` Jan Nieuwenhuizen
@ 2019-06-01 12:04       ` ng0
  2019-06-01 16:48         ` Ricardo Wurmus
  0 siblings, 1 reply; 10+ messages in thread
From: ng0 @ 2019-06-01 12:04 UTC (permalink / raw)
  To: Jan Nieuwenhuizen; +Cc: guix-devel

Jan Nieuwenhuizen transcribed 759 bytes:
> Ludovic Courtès writes:
> 
> Hi!
> 
> >>> I started looking at what it would take to upgrade glibc to 2.29 on
> >>> ‘core-updates’.  Bad news: it depends on Python.
> >>
> >> I had to check the date.  This is for real?
> >
> > It’s not a June 1st prank, I swear!
> 
> Oh, great... not.
> 
> >> I’ll take a look at python-on-guile and see if we can run the scripts
> >> with it.
> >
> > That’d be sweet!
> 
> Yes! ... Although...how are we -- in the far future -- going to replace
> Guile with Mes for the Guix bootstrap?  Could it be that the glibc
> developers haven't seen my talk? :-/

Maintain a variant of glibc or your own libc?
It's not that far off for an Operating System, and nothing which is impossible.
 
> janneke
> 
> -- 
> Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
> Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: glibc 2.29 needs Python
  2019-06-01 12:04       ` ng0
@ 2019-06-01 16:48         ` Ricardo Wurmus
  0 siblings, 0 replies; 10+ messages in thread
From: Ricardo Wurmus @ 2019-06-01 16:48 UTC (permalink / raw)
  To: ng0; +Cc: guix-devel


ng0@n0.is writes:

>> Yes! ... Although...how are we -- in the far future -- going to replace
>> Guile with Mes for the Guix bootstrap?  Could it be that the glibc
>> developers haven't seen my talk? :-/
>
> Maintain a variant of glibc or your own libc?
> It's not that far off for an Operating System, and nothing which is impossible.

Since we’re all part of the GNU project our aim should be to make this
work without having to fork the C library.

Maintaining a variant of the C library is not a realistic option,
because it’s enough work to maintain each of the other GNU packages that
are involved in this endeavor.

-- 
Ricardo

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: glibc 2.29 needs Python
  2019-05-31 22:13   ` Ludovic Courtès
  2019-06-01  8:48     ` Jan Nieuwenhuizen
@ 2019-06-20 14:09     ` Ricardo Wurmus
  2019-06-20 15:06       ` Danny Milosavljevic
  1 sibling, 1 reply; 10+ messages in thread
From: Ricardo Wurmus @ 2019-06-20 14:09 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel


Ludovic Courtès <ludo@gnu.org> writes:

>> I’ll take a look at python-on-guile and see if we can run the scripts
>> with it.
>
> That’d be sweet!

The python-on-guile package in Guix now provides a “python” executable
that can run simple Python scripts.  I haven’t tested this on the glibc
2.29 scripts yet.

-- 
Ricardo

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: glibc 2.29 needs Python
  2019-06-20 14:09     ` Ricardo Wurmus
@ 2019-06-20 15:06       ` Danny Milosavljevic
  2019-06-20 15:25         ` Ricardo Wurmus
  0 siblings, 1 reply; 10+ messages in thread
From: Danny Milosavljevic @ 2019-06-20 15:06 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 287 bytes --]

$ guix environment --pure --ad-hoc python-on-guile
[env]$ python
no code for module (parser stis-parser lang python3-parser)
[env]$ exit
$ guix environment --ad-hoc --pure python-on-guile guile-stis-parser
[env]$ python
no code for module (parser stis-parser lang python3-parser)

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: glibc 2.29 needs Python
  2019-06-20 15:06       ` Danny Milosavljevic
@ 2019-06-20 15:25         ` Ricardo Wurmus
  0 siblings, 0 replies; 10+ messages in thread
From: Ricardo Wurmus @ 2019-06-20 15:25 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: guix-devel


Danny Milosavljevic <dannym@scratchpost.org> writes:

> $ guix environment --pure --ad-hoc python-on-guile
> [env]$ python
> no code for module (parser stis-parser lang python3-parser)
> [env]$ exit
> $ guix environment --ad-hoc --pure python-on-guile guile-stis-parser
> [env]$ python
> no code for module (parser stis-parser lang python3-parser)

The package propagates these Guile packages, but you’ll need to have
“guile” in your environment.

(It’s on my TODO list to change the wrapper so that the
GUILE_LOAD_{COMPILED_,}PATH is set properly in any case.)

--
Ricardo

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-06-20 15:26 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-30 10:39 glibc 2.29 needs Python Ludovic Courtès
2019-05-30 11:29 ` Ricardo Wurmus
2019-05-30 12:46   ` Giovanni Biscuolo
2019-05-31 22:13   ` Ludovic Courtès
2019-06-01  8:48     ` Jan Nieuwenhuizen
2019-06-01 12:04       ` ng0
2019-06-01 16:48         ` Ricardo Wurmus
2019-06-20 14:09     ` Ricardo Wurmus
2019-06-20 15:06       ` Danny Milosavljevic
2019-06-20 15:25         ` Ricardo Wurmus

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).