From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id ACgtKO6KiWQ1BAAASxT56A (envelope-from ) for ; Wed, 14 Jun 2023 11:39:58 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id aFX4J+6KiWS6RwEA9RJhRA (envelope-from ) for ; Wed, 14 Jun 2023 11:39:58 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id EC9FA3F741 for ; Wed, 14 Jun 2023 11:39:57 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q9MpK-0001sR-1Y; Wed, 14 Jun 2023 05:30:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q9MpH-0001ry-5j for guix-patches@gnu.org; Wed, 14 Jun 2023 05:30:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q9MpG-0005uk-Rx for guix-patches@gnu.org; Wed, 14 Jun 2023 05:30:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q9MpG-0003SZ-LI for guix-patches@gnu.org; Wed, 14 Jun 2023 05:30:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63641] [PATCH 0/8] Add libc specific to Hurd and update components Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 14 Jun 2023 09:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63641 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch moreinfo To: Janneke Nieuwenhuizen Cc: Josselin Poiret , 63641@debbugs.gnu.org Received: via spool by 63641-submit@debbugs.gnu.org id=B63641.168673497313231 (code B ref 63641); Wed, 14 Jun 2023 09:30:02 +0000 Received: (at 63641) by debbugs.gnu.org; 14 Jun 2023 09:29:33 +0000 Received: from localhost ([127.0.0.1]:43728 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q9Mom-0003RK-ML for submit@debbugs.gnu.org; Wed, 14 Jun 2023 05:29:33 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45078) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q9Mok-0003R7-4C for 63641@debbugs.gnu.org; Wed, 14 Jun 2023 05:29:31 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q9Moe-0005pv-Oh; Wed, 14 Jun 2023 05:29:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=J8gkumbQxsFh+K+yXBSH+1bwJkgxuBZU7omFFxfV6n4=; b=fpclrkQF2zBLxLnaNFfP O92ETXoK55mwfg7OY7bsGhOuy9A2NJJWvt3/ZTnF7tgL8y7zOOu8IAoxz0AM+0BTmI1q+kKJ7ShLN TQD6yjjwWQvVAL11K0n6bQ88GEQ5uMbBVkD/sAVRscmCvSr/QMHIxMMmJUktiWxz6E29InQWCnKRj VyrLKghpDxFPjV1NZg3uiNXhU3cBf11AD+ujb02EYjqbzKmwthXw4Rdw/HFUGBUfSzhe3b9YuDw9A xIJV9C5IGje09juQ7XqCwzq2Gp25UU1xCEjvI/cJW0GfJU2cf4SmSAiHU+pYSPrz/0rWGLv1b/YNx xpOpwHVDPyE+cg==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q9Moe-00050w-Bw; Wed, 14 Jun 2023 05:29:24 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87jzx07lmr.fsf@jpoiret.xyz> <37e9697f42aecfb83757989f8172beba8faf32ab.1684748476.git.dev@jpoiret.xyz> <87y1l2moh1.fsf@gnu.org> <87a5xa1i7a.fsf@gnu.org> Date: Wed, 14 Jun 2023 11:29:21 +0200 In-Reply-To: <87a5xa1i7a.fsf@gnu.org> (Janneke Nieuwenhuizen's message of "Thu, 08 Jun 2023 10:17:29 +0200") Message-ID: <87zg52s87i.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1686735598; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=VRMTm+GW5B8U71uuuuVLTGyhRsaKpluFXxNbJjFCTN8=; b=bl/sRuZobf6Eak3t6UUUtsx28fo9BVpVMAqkt5/MmCd5CRuuSz/IyG+zQM+1dX4jCvvb9I GBdAy2Er8tdT+yU37IIs1WLkGM3QFEwPVUPAshjaJi91hIKlihFTWnLkPZz3CS/i/5UKmG jVD1Te0dH4Y7KHwk72+5UZqIPimslDh0Ez3Y0COQEg14DmGDP4g89u01FD1wrSftJlHMyl aB+Cht9Ao7waM4AOCnLvCbn1D4zZiIqMuyItn6/n4FnWcWynhJ01vkhxHJBbz898VdZCAV +SJVSx0sRlwHdE5l58lhvociEZClaTWWhfXJxH2yHaDaBNimrkhj7X7Q0RZCoQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gnu.org header.s=fencepost-gnu-org header.b=fpclrkQF; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1686735598; a=rsa-sha256; cv=none; b=YbqTlnZzwZFcyIQ553HcqCelq/8iJKa55LA3WXH8ZBuwrVBdLhxknGxjj7vMUDilfVnJf6 HbQa4LSRqK1tusonyyYYWPM/iBjILu1uCXaYyk9hsNkhpLmAmReExdE3MQ1BJB8pCG6L3H QgMqcvreYxhh/10YEGp/SmVcrAGbZVi0hYrGOW0xpJACa5hp1jSydcQN3zDFw3MHngQVLZ IDk9CXSMw1nSybih4yCjfQJwkP5pLqrfUC3cHd1DbRPXoJBroefjMaRaagnu3MhXlCReca Zlken75lesqnjfZfsUUrKGPehDtWI4BysDg60w2g72qw7WGIZkMxcgLkaZ0Vxw== X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -1.63 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gnu.org header.s=fencepost-gnu-org header.b=fpclrkQF; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: EC9FA3F741 X-Spam-Score: -1.63 X-TUID: 85rTcn99Loff --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello Janneke & Josselin, Janneke Nieuwenhuizen skribis: > Janneke Nieuwenhuizen writes: [...] >> As discussed on IRC, I found that we're still building glibc-2.35 during >> commencement. I overlooked that this recent patch of yours made these >> changes in commencement, so I already made patches for this (attached). > > Even with these patches (on wip-hurd now), gcc-toolchain still depends > on glibc-2.35 for offload builds, as you can see when doing > > ./pre-inst-env guix build --system=3Di568-gnu -d gcc-toolchain > > from GNU/Linux. When running this same build in a childhurd, the > glibc-2.35 dependency is gone. Note that gcc-final, i.e. > > ./pre-inst-env guix build --system=3Di568-gnu -d \ > -e '(@@ (gnu packages commencement) gcc-final)' > > does not depend ond glibc-2.35, but both glibc-final and > glibc-final-with-bootstrap-bash build 2.35 when using --system. Turns out that this was because =E2=80=98%final-inputs=E2=80=99 now also ne= eds to be parameterized by system type so it returns the right =E2=80=98glibc-final= =E2=80=99 package. Patch below. Josselin, Janneke: could you squash this with the original =E2=80=98libc-for-target=E2=80=99 patch? (Eventually we should update callers of =E2=80=98standard-packages=E2=80=99= so they pass the =E2=80=98system=E2=80=99 argument.) Thanks, Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 9435161969..7fb02cb3e8 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -1677,6 +1677,6 @@ (define-public (%final-inputs) "Return the list of \"final inputs\"." ;; Avoid circular dependency by lazily resolving 'commencement'. (let ((iface (resolve-interface '(gnu packages commencement)))) - (module-ref iface '%final-inputs))) + ((module-ref iface '%final-inputs) (%current-system)))) ;;; base.scm ends here diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 055e14ba68..fb67b272a1 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -3406,45 +3406,49 @@ (define sed-final (package/inherit sed (native-inputs `(("perl" ,perl-boot0)))))) (define-public %final-inputs - ;; Final derivations used as implicit inputs by 'gnu-build-system'. We - ;; still use 'package-with-bootstrap-guile' so that the bootstrap tools are - ;; used for origins that have patches, thereby avoiding circular - ;; dependencies. - (let ((finalize (compose with-boot6 - package-with-bootstrap-guile))) - `(,@(map (match-lambda - ((name package) - (list name (finalize package)))) - `(("tar" ,tar) - ("gzip" ,gzip) - ("bzip2" ,bzip2) - ("file" ,file) - ("diffutils" ,diffutils) - ("patch" ,patch) - ("findutils" ,findutils) - ("gawk" ,gawk))) - ("sed" ,sed-final) - ("grep" ,grep-final) - ("xz" ,xz-final) - ("coreutils" ,coreutils-final) - ("make" ,gnu-make-final) - ("bash" ,bash-final) - ("ld-wrapper" ,ld-wrapper) - ("binutils" ,binutils-final) - ("gcc" ,gcc-final) - ("libc" ,glibc-final) - ("libc:static" ,glibc-final "static") - ("locales" ,glibc-utf8-locales-final)))) + ;; The 'glibc-final' package is not the same depending on what system is + ;; targeted, so this whole list must be parameterized. + (mlambda (system) + ;; Final derivations used as implicit inputs by 'gnu-build-system'. We + ;; still use 'package-with-bootstrap-guile' so that the bootstrap tools are + ;; used for origins that have patches, thereby avoiding circular + ;; dependencies. + (let ((finalize (compose with-boot6 + package-with-bootstrap-guile))) + `(,@(map (match-lambda + ((name package) + (list name (finalize package)))) + `(("tar" ,tar) + ("gzip" ,gzip) + ("bzip2" ,bzip2) + ("file" ,file) + ("diffutils" ,diffutils) + ("patch" ,patch) + ("findutils" ,findutils) + ("gawk" ,gawk))) + ("sed" ,sed-final) + ("grep" ,grep-final) + ("xz" ,xz-final) + ("coreutils" ,coreutils-final) + ("make" ,gnu-make-final) + ("bash" ,bash-final) + ("ld-wrapper" ,ld-wrapper) + ("binutils" ,binutils-final) + ("gcc" ,gcc-final) + ("libc" ,glibc-final) + ("libc:static" ,glibc-final "static") + ("locales" ,glibc-utf8-locales-final))))) (define-public canonical-package - (let ((name->package (fold (lambda (input result) - (match input - ((_ package . outputs) - (vhash-cons (package-full-name package) - package result)))) - vlist-null - `(("guile" ,guile-final) - ,@%final-inputs)))) + (let ((name->package (mlambda (system) + (fold (lambda (input result) + (match input + ((_ package . outputs) + (vhash-cons (package-full-name package) + package result)))) + vlist-null + `(("guile" ,guile-final) + ,@(%final-inputs system)))))) (lambda (package) "Return the 'canonical' variant of PACKAGE---i.e., if PACKAGE is one of the implicit inputs of 'gnu-build-system', return that one, otherwise return @@ -3454,7 +3458,8 @@ (define-public canonical-package COREUTILS-FINAL vs. COREUTILS, etc." ;; XXX: This doesn't handle dependencies of the final inputs, such as ;; libunistring, GMP, etc. - (match (vhash-assoc (package-full-name package) name->package) + (match (vhash-assoc (package-full-name package) + (name->package (%current-system))) ((_ . canon) ;; In general we want CANON, except if we're cross-compiling: CANON ;; uses explicit inputs, so it is "anchored" in the bootstrapped @@ -3536,7 +3541,8 @@ (define* (make-gcc-toolchain gcc ;; install everything that we need, and (2) to make sure ld-wrapper comes ;; before Binutils' ld in the user's profile. (inputs `(("gcc" ,gcc) - ("ld-wrapper" ,(car (assoc-ref %final-inputs "ld-wrapper"))) + ("ld-wrapper" ,(car (assoc-ref (%final-inputs (%current-system)) + "ld-wrapper"))) ("binutils" ,binutils-final) ("libc" ,libc) ("libc-debug" ,libc "debug") diff --git a/guix/build-system/gnu.scm b/guix/build-system/gnu.scm index 3308302472..c1aa187c42 100644 --- a/guix/build-system/gnu.scm +++ b/guix/build-system/gnu.scm @@ -266,13 +266,13 @@ (define (package-with-restricted-references p refs) p)) -(define (standard-packages) +(define* (standard-packages #:optional (system (%current-system))) "Return the list of (NAME PACKAGE OUTPUT) or (NAME PACKAGE) tuples of standard packages used as implicit inputs of the GNU build system." ;; Resolve (gnu packages commencement) lazily to hide circular dependency. (let ((distro (resolve-module '(gnu packages commencement)))) - (module-ref distro '%final-inputs))) + ((module-ref distro '%final-inputs) system))) (define* (lower name #:key source inputs native-inputs outputs target @@ -303,7 +303,7 @@ (define* (lower name (standard-cross-packages target 'host) '()) ,@(if implicit-inputs? - (standard-packages) + (standard-packages system) '()))) (host-inputs (if target inputs '())) diff --git a/guix/scripts/refresh.scm b/guix/scripts/refresh.scm index 9676271542..02716abc12 100644 --- a/guix/scripts/refresh.scm +++ b/guix/scripts/refresh.scm @@ -228,7 +228,8 @@ (define (options->update-specs opts) (let* ((input->package (match-lambda ((name (? package? package) _ ...) package) (_ #f))) - (final-inputs (map input->package %final-inputs)) + (final-inputs (map input->package + (%final-inputs (%current-system)))) (core (append final-inputs (append-map (compose (cut filter-map input->package <>) package-transitive-inputs) --=-=-=--