guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

glibc 2.29 needs Python


From: Ludovic Courtès
Subject: glibc 2.29 needs Python
Date: Thu, 30 May 2019 12:39:28 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)

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

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 
<address@hidden>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès 
<address@hidden>
 ;;; Copyright © 2014, 2019 Andreas Enge <address@hidden>
 ;;; Copyright © 2012 Nikita Karetnikov <address@hidden>
 ;;; Copyright © 2014, 2015, 2016, 2018 Mark H Weaver <address@hidden>
@@ -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 
<address@hidden>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès 
<address@hidden>
 ;;; Copyright © 2014 Andreas Enge <address@hidden>
 ;;; Copyright © 2012 Nikita Karetnikov <address@hidden>
 ;;; Copyright © 2014, 2015, 2017 Mark H Weaver <address@hidden>
@@ -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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]