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

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).