unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Ricardo Wurmus <rekado@elephly.net>
Cc: guix-devel@gnu.org
Subject: Re: [core-updates] aarch64: Cannot build glibc-2.39
Date: Tue, 13 Aug 2024 18:52:01 +0200	[thread overview]
Message-ID: <87zfpg8ixa.fsf@gnu.org> (raw)
In-Reply-To: <87ed76289b.fsf@elephly.net> (Ricardo Wurmus's message of "Fri, 02 Aug 2024 18:34:56 +0200")

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

Ricardo Wurmus <rekado@elephly.net> skribis:

> Ricardo Wurmus <rekado@elephly.net> writes:
>
>> Ricardo Wurmus <rekado@elephly.net> writes:
>>
>>> I tried to deploy to my aarch64 system with Guix on core-updates.  This
>>> fails with a configure failure in the build of glibc 2.39.
>>
>> You can reproduce this like so:
>>
>>   ./pre-inst-env guix build -K --system=aarch64-linux -e \
>>       '((@@ (gnu packages make-bootstrap) glibc-for-bootstrap) (@ (gnu packages base) glibc))'
>
> I was able to build that glibc with this diff:

I’m testing this other patch below.  I can build ‘bootstrap-tarballs’
and ‘guile-initrd’ on x86_64-linux with it; the aarch64-linux build is
still ongoing and will take a while.

That would be a welcome simplification of all this.

Ludo’.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 3409 bytes --]

diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
index 63c84e93ef..13cf40d37b 100644
--- a/gnu/packages/make-bootstrap.scm
+++ b/gnu/packages/make-bootstrap.scm
@@ -87,12 +87,6 @@ (define glibc-for-bootstrap
                   "--enable-static-nss"
                   ,flags))))
 
-      ;; Make sure to build glibc with the same compiler version as the rest
-      ;; of the bootstrap.  Otherwise it fails to statically link on aarch64.
-      (native-inputs
-       `(("gcc" ,gcc-7)
-         ,@(package-native-inputs base)))
-
       ;; Remove the 'debug' output to allow bit-reproducible builds (when the
       ;; 'debug' output is used, ELF files end up with a .gnu_debuglink, which
       ;; includes a CRC of the corresponding debugging symbols; those symbols
@@ -103,13 +97,13 @@ (define gcc-for-bootstrap
   (mlambdaq (glibc)
     "Return a variant of GCC that uses the bootstrap variant of GLIBC."
     (package
-      (inherit gcc-7)
+      (inherit gcc)
       (outputs '("out")) ;all in one so libgcc_s is easily found
       (inputs
        `( ;; Distinguish the name so we can refer to it below.
          ("bootstrap-libc" ,(glibc-for-bootstrap glibc))
          ("libc:static" ,(glibc-for-bootstrap glibc) "static")
-         ,@(package-inputs gcc-7))))))
+         ,@(package-inputs gcc))))))
 
 (define (package-with-relocatable-glibc p)
   "Return a variant of P that uses the libc as defined by
@@ -148,7 +142,7 @@ (define (package-with-relocatable-glibc p)
                              (cons (search-path-specification
                                     (variable "CROSS_CPLUS_INCLUDE_PATH")
                                     (files '("include")))
-                                   (package-search-paths gcc-7)))))
+                                   (package-search-paths gcc)))))
             ("cross-binutils" ,(cross-binutils target))
             ,@(%final-inputs)))
         `(("libc" ,(glibc-for-bootstrap glibc))
@@ -472,11 +466,11 @@ (define (%glibc-stripped)
 (define %gcc-static
   ;; A statically-linked GCC, with stripped-down functionality.
   (package-with-relocatable-glibc
-   (package (inherit gcc-7)
+   (package (inherit gcc)
      (name "gcc-static")
      (outputs '("out"))                           ; all in one
      (arguments
-      (substitute-keyword-arguments (package-arguments gcc-7)
+      (substitute-keyword-arguments (package-arguments gcc)
         ((#:modules modules %default-gnu-modules)
          `((srfi srfi-1)
            (srfi srfi-26)
@@ -527,7 +521,7 @@ (define %gcc-static
      (inputs
       `(("zlib:static" ,zlib "static")
         ("isl:static" ,isl "static")
-        ,@(package-inputs gcc-7)))
+        ,@(package-inputs gcc)))
      (native-inputs
       (if (%current-target-system)
           `(;; When doing a Canadian cross, we need GMP/MPFR/MPC both
@@ -540,13 +534,13 @@ (define %gcc-static
             ("gmp-native" ,gmp)
             ("mpfr-native" ,mpfr)
             ("mpc-native" ,mpc)
-            ,@(package-native-inputs gcc-7))
-          (package-native-inputs gcc-7))))))
+            ,@(package-native-inputs gcc))
+          (package-native-inputs gcc))))))
 
 (define %gcc-stripped
   ;; The subset of GCC files needed for bootstrap.
   (package
-    (inherit gcc-7)
+    (inherit gcc)
     (name "gcc-stripped")
     (build-system trivial-build-system)
     (source #f)

  parent reply	other threads:[~2024-08-13 16:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-23 19:51 [core-updates] aarch64: Cannot build glibc-2.39 Ricardo Wurmus
2024-07-31 21:50 ` Ricardo Wurmus
2024-08-02 16:34   ` Ricardo Wurmus
2024-08-12 14:01     ` Ludovic Courtès
2024-08-13 16:52     ` Ludovic Courtès [this message]
2024-08-14 13:31       ` Ludovic Courtès
2024-08-19 13:02         ` Ricardo Wurmus
2024-08-19 20:42           ` Ricardo Wurmus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zfpg8ixa.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=rekado@elephly.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).