From patchwork Thu Sep 5 15:52:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Z572 X-Patchwork-Id: 67640 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id ABD0227BBE9; Thu, 5 Sep 2024 17:01:29 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_VALIDITY_CERTIFIED, RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 1DC6827BBE2 for ; Thu, 5 Sep 2024 17:01:26 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1smEtv-0000u1-8p; Thu, 05 Sep 2024 12:00:03 -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 1smEtq-0000sx-Cq for guix-patches@gnu.org; Thu, 05 Sep 2024 11:59:58 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1smEtq-00046S-3d for guix-patches@gnu.org; Thu, 05 Sep 2024 11:59:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=KJ1ME7ubb2TFga8pdlTz4UUWnDacKYZpmvH68bsq5EI=; b=OEOOWAaFrxaOELcU6Jw0DTdzAQ/iDKey1QCPr2v6I274aML7NtrzJ18y/h0PEghfroNdm3XTsTF0BbDZMZPUt8l0CaV39xe/0C0eS6IA0Fkm1/1TJQ29t3cWUW0b5cwiS/aKDzFcJf/nzKwWb3opOLl6Ijnf6dyPqkZF43mhaZW7DSXlewAKW3Rc902skVbkoCkQzb5VypUJ697eBla5+VZiWxEoUUAV33TqSK4HV3UScpvEW5UEXYWlAM1r7yf3s1B7h9UM6bUh8ddNyA9xaODplcxIqvlaQgFIHCTLAPxK3UbKCm0VgW6GuYWwcpcOj3H+LfyXvenHusvT/LeaIQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1smEus-0004NP-8V for guix-patches@gnu.org; Thu, 05 Sep 2024 12:01:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73006] [PATCH 0/2] gnu: glibc: Fix cross-compiling. Resent-From: Zheng Junjie Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 05 Sep 2024 16:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73006 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?utf-8?q?Court=C3=A8s?= Cc: 73006@debbugs.gnu.org Received: via spool by 73006-submit@debbugs.gnu.org id=B73006.172555201816660 (code B ref 73006); Thu, 05 Sep 2024 16:01:02 +0000 Received: (at 73006) by debbugs.gnu.org; 5 Sep 2024 16:00:18 +0000 Received: from localhost ([127.0.0.1]:37936 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1smEu9-0004Kc-MK for submit@debbugs.gnu.org; Thu, 05 Sep 2024 12:00:18 -0400 Received: from smtp84.cstnet.cn ([159.226.251.84]:43806 helo=cstnet.cn) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1smEu6-0004JA-P6 for 73006@debbugs.gnu.org; Thu, 05 Sep 2024 12:00:16 -0400 Received: from m (unknown [117.147.109.233]) by APP-05 (Coremail) with SMTP id zQCowACHqOi409lmnKl7AQ--.21235S2; Thu, 05 Sep 2024 23:52:25 +0800 (CST) From: Zheng Junjie In-Reply-To: <87o753baq9.fsf@gnu.org> ("Ludovic =?utf-8?q?Court=C3=A8s?= "'s message of "Wed, 04 Sep 2024 19:16:30 +0200") References: <87o753baq9.fsf@gnu.org> Date: Thu, 05 Sep 2024 23:52:24 +0800 Message-ID: <87a5gm2j47.fsf@iscas.ac.cn> MIME-Version: 1.0 X-CM-TRANSID: zQCowACHqOi409lmnKl7AQ--.21235S2 X-Coremail-Antispam: 1UD129KBjvdXoWrZFWDKFW5Cw1UWFyUur18AFb_yoWkXrg_GF ykKw18GF4Ygrs7Gw1S9FWFkFs7tr4Iqr4rAryq9rZrWasxZrnrWa97tFyS9F1xJFW0yrn5 JF4xZa18CF9FvjkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUb78YjsxI4VWkKwAYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I 6I8E6xAIw20EY4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l8cAvFVAK0II2c7xJM2 8CjxkF64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVWUJVWUCwA2z4x0Y4vE2Ix0 cI8IcVCY1x0267AKxVWUJVW8JwA2z4x0Y4vEx4A2jsIE14v26F4UJVW0owA2z4x0Y4vEx4 A2jsIEc7CjxVAFwI0_GcCE3s1le2I262IYc4CY6c8Ij28IcVAaY2xG8wASzI0EjI02j7Aq F2xKxwAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_Jr0_Jr4lYx0Ex4 A2jsIE14v26r1j6r4UMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvEwIxGrwCF04k20xvY 0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I 0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_Jrv_JF1lIxkGc2Ij64vIr41lIxAI cVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr1lIxAIcV CF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIE c7CjxVAFwI0_Jr0_GrUvcSsGvfC2KfnxnUUI43ZEXa7IU5PpnJUUUUU== X-Originating-IP: [117.147.109.233] X-CM-SenderInfo: x2kh0wxmxqyx3h6l2u1dvotugofq/ 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches Ludovic Courtès writes: > Hi, > > Zheng Junjie skribis: > >> utils: Add 'objcopy-for-target' and 'objdump-for-target'. >> gnu: glibc: Fix cross-compiling. > > Could you explain what this is addressing? all cross-compiling image build fail, because glibc 2.39 cross-compiling fail. > > The ‘add-cross-binutils-to-PATH’ phase is supposed to do the right this is in cross-libc*, but glibc not have this phase. > thing, as suggested in the discussion at > , > and that means ‘objdump-for-target’ & co. shouldn’t be necessary. > > Ludo’. glibc 2.35 have "glibc-cross-objdump.patch" and "glibc-cross-objcopy.patch" patch, but glibc 2.39 not have them, so 2.39 cross compiling try use objdump and build fail, and 2.35 success. I checked again today. because (gnu services base)'s nscd-configuration default use glibc, not '(cross-libc target)', This is why glibc was introduced. Maybe the following patch can also be useful. From f23d1e48bd0fd9d3b66cbc831cc40f475faff7a4 Mon Sep 17 00:00:00 2001 Message-ID: From: Zheng Junjie Date: Thu, 5 Sep 2024 23:48:34 +0800 Subject: [PATCH] services: nscd: When cross-compiling, Use (cross-libc target). * gnu/services/base.scm (nscd-configuration)[glibc]: When cross-compiling, Use (cross-libc target). Change-Id: Ib219459b1ec28f7edfac075e70be3d61edf72d27 --- gnu/services/base.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 4b5b103cc3..4eda5382f5 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -21,6 +21,7 @@ ;;; Copyright © 2022 Justin Veilleux ;;; Copyright © 2022 ( ;;; Copyright © 2023 Bruno Victal +;;; Copyright © 2024 Zheng Junjie <873216071@qq.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -67,6 +68,8 @@ (define-module (gnu services base) libc-utf8-locales-for-target make-glibc-utf8-locales tar canonical-package)) + #:use-module ((gnu packages cross-base) + #:select (cross-libc)) #:use-module ((gnu packages compression) #:select (gzip)) #:use-module (gnu packages fonts) #:autoload (gnu packages guile-xyz) (guile-netlink) @@ -1313,7 +1316,7 @@ (define-record-type* nscd-configuration ;; from 'glibc-final' instead of pulling in a second ;; glibc copy. (if target - glibc + (cross-libc target) (canonical-package glibc)))))) (define-record-type* nscd-cache make-nscd-cache base-commit: 993d6d2e7be4dac738629c76a51058f4dc5bc449 prerequisite-patch-id: dd51603b3f57923df8ac28ca5f41557be07ee742 prerequisite-patch-id: f86942972fa6ddef6e83b54c6120e9d5dfb63098 prerequisite-patch-id: c3394b41809ae9e5a91a51d7c77401cb58192c51 prerequisite-patch-id: 68f03643905981a0a79b4ae13971a58a808877f5 -- 2.45.2