From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id YAqmMMuF72BjeAEAgWs5BA (envelope-from ) for ; Thu, 15 Jul 2021 02:48:11 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id UI5vKsuF72DJYAAAbx9fmQ (envelope-from ) for ; Thu, 15 Jul 2021 00:48:11 +0000 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 DFDDD27C2A for ; Thu, 15 Jul 2021 02:48:10 +0200 (CEST) Received: from localhost ([::1]:57918 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3pXu-0000yG-2O for larch@yhetil.org; Wed, 14 Jul 2021 20:48:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40034) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3pXn-0000y8-7a for guix-patches@gnu.org; Wed, 14 Jul 2021 20:48:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:34572) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m3pXm-0002zU-Pe for guix-patches@gnu.org; Wed, 14 Jul 2021 20:48:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m3pXm-0002PR-ND for guix-patches@gnu.org; Wed, 14 Jul 2021 20:48:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49565] [PATCH] gnu: glibc-headers-mesboot: Use %build-inputs in setenv phase Resent-From: Thiago Jung Bauermann Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 15 Jul 2021 00:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 49565 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49565@debbugs.gnu.org Cc: Thiago Jung Bauermann X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16263100489212 (code B ref -1); Thu, 15 Jul 2021 00:48:02 +0000 Received: (at submit) by debbugs.gnu.org; 15 Jul 2021 00:47:28 +0000 Received: from localhost ([127.0.0.1]:46118 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3pXD-0002OV-QE for submit@debbugs.gnu.org; Wed, 14 Jul 2021 20:47:28 -0400 Received: from lists.gnu.org ([209.51.188.17]:45420) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3pXB-0002ON-R2 for submit@debbugs.gnu.org; Wed, 14 Jul 2021 20:47:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40018) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3pXB-0000wa-BH for guix-patches@gnu.org; Wed, 14 Jul 2021 20:47:25 -0400 Received: from mx.kolabnow.com ([95.128.36.42]:43382) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3pX8-0002Xt-Ci for guix-patches@gnu.org; Wed, 14 Jul 2021 20:47:24 -0400 Received: from localhost (unknown [127.0.0.1]) by ext-mx-out001.mykolab.com (Postfix) with ESMTP id 5873D13AE for ; Thu, 15 Jul 2021 02:47:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h= content-transfer-encoding:content-type:content-type:mime-version :message-id:date:date:subject:subject:from:from:received :received:received; s=dkim20160331; t=1626310037; x=1628124438; bh=9S9zfKyj3yq/oqDnPuMOAyNA7nNUAMHUile0vGSAuTo=; b=OgIVuBT+hDV2 I7a/3DAAXrJRWq1xJ6n3TrflD3Pf0BCC9S0+RY6BHTHXhGrMuIpLeImk+nqBUtXz UEz7aqGV7ioILiLgUkFvySksb2mC13ttg6l0WYSuoH6F2b7o/Zv9lw/dWyWN1sh0 mZcVUAU4QxLjEwgSlerbwJLq+3DaREe0SpOri2hBFezEv2hBqj6CxSLPxZSdaj20 mVb666Zz2N6703yzL+F/umQcQMcq8aGsQ4XA709qSbBCTN9kxh1e8x3cHOLgDDeA KkbtAMxzvok/qocY2KRX0c96K0sDlEsDf6HyygAB2C/kb1+PLE6n3ULqvsqhG9jW lrvyPdGrZMg5T0oPcraVz5jemms0ozIWJFifq8AZd9FJoSqB1oT1I5egIDh4CvAT t2arq9b9uodp8ea1o6VoiqXi3wCvuot2GTGnkeUAXAsVFC1qGMV492SFtXdbly75 OY3iPOfB6MiVAHs4e2t30Y+UWN0PCxhgSmtdZwj/6+r3BYTwYaG++wB4k9c/eyrv 47aIDArkQyCi7hLOlknj5DYvZ2sGj8nwb9q0CycKY41KuadrIDiYZzELsZGFuux1 6fGShrTyFpRQldLVqTsyG3n7SK5lLl5Q3IHk5Ye42wX0PFjHCyTiczOedl4ShTn/ sKMyCRSHxAzJI0wsoW90LOMpfNXyfFU= X-Virus-Scanned: amavisd-new at mykolab.com Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out001.mykolab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id y_Yr_bmPkKW6 for ; Thu, 15 Jul 2021 02:47:17 +0200 (CEST) Received: from int-mx001.mykolab.com (unknown [10.9.13.1]) by ext-mx-out001.mykolab.com (Postfix) with ESMTPS id 6BC2D504 for ; Thu, 15 Jul 2021 02:47:17 +0200 (CEST) Received: from ext-subm002.mykolab.com (unknown [10.9.6.2]) by int-mx001.mykolab.com (Postfix) with ESMTPS id B94AD19FC; Thu, 15 Jul 2021 02:47:16 +0200 (CEST) Date: Wed, 14 Jul 2021 21:46:13 -0300 Message-Id: <20210715004613.763843-1-bauermann@kolabnow.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=95.128.36.42; envelope-from=bauermann@kolabnow.com; helo=mx.kolabnow.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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" Reply-to: Thiago Jung Bauermann X-ACL-Warn: , Thiago Jung Bauermann via Guix-patches From: Thiago Jung Bauermann via Guix-patches via X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1626310091; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=9S9zfKyj3yq/oqDnPuMOAyNA7nNUAMHUile0vGSAuTo=; b=tFoTR5KXRVjhumrRf+xELgfperjJoUoRDbXDKktJU+JhbBsLhQ6qG3Fw/HNdAUQC+fyerh NYxX767ijwmEEtwkyB3lrZwfSg6rwAfEQ/QHAB/Q82t+8J3tXhRgGELOLcNLvKqaEhaPNe C8Q97topD/pkihdOsFM+iYcWJNsIk18qAyEDNV65IBGc6hmmdTfTEFp70vSrvgsbvxVoAe R+riofreixJAY8AgcOZzb/hxFcbhVTg4qSfRUkhK9PyDhXoSxukBwAsNoe0bvY//IJtZJB a3X/FJcNOf4fqItEazcZlfXLV0WoJAg4wsFZeUafjtzTYbc72hMVTNR+FSrIug== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1626310091; a=rsa-sha256; cv=none; b=npO1YuUtyeeDZBpcivVSZx7yL5RUgk7SsW+PY4SxOcL03mKITZlVloruYthIgvs9NUUXyW j2/xEJQitZIWdpNGiMD7MgJyftZGKiZox1LwCiKXo5fYC0/2gCuIh/RhqZys02yPuySOVg XpzegYrq6ud5e4HI5X/Dvz8UW0CUQiz7U+tjSB7HOsl2BNF/18NF/mTOoofSlErRYMV4Q3 DUl+TKIvy62RcbPXNVBBHr/lz9Y+VGOybMNOzruVLRBFsN7MtlCEHO2ZEyYU3ZW/xN4Bxs Qm5dZktQWDK7xdpys5ta9iHTFdUUNJW4tlc533zx2YtUmNnV6DcXupx0JNXhhg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=kolabnow.com header.s=dkim20160331 header.b=OgIVuBT+; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -2.90 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=kolabnow.com header.s=dkim20160331 header.b=OgIVuBT+; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: DFDDD27C2A X-Spam-Score: -2.90 X-Migadu-Scanner: scn0.migadu.com X-TUID: Pth46OrOWnq7 When cross-building from x86-64-linux to powerpc64le-linux, (assoc-ref inputs "libc") returns #f so get it from %build-inputs instead. For consistency, do the same for the other inputs as well. * gnu/packages/commencement.scm (glibc-headers-mesboot)[arguments]: Get packages from ‘%build-inputs’ rather than ‘inputs’. --- gnu/packages/commencement.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) When running ``` $ ./pre-inst-env guix build \ --target=powerpc64le-linux-gnu.gcc \ gcc-toolchain@11 ``` on current core-updates branch (commit 8456581375cf), I get the following error during the build of glibc-mesboot-2.16: --8<---------------cut here---------------start------------->8--- phase `setenv' failed after 0.0 seconds Backtrace: In ice-9/boot-9.scm: 157: 15 [catch #t # ...] In unknown file: ?: 14 [apply-smob/1 #] In ice-9/boot-9.scm: 63: 13 [call-with-prompt prompt0 ...] In ice-9/eval.scm: 432: 12 [eval # #] In ice-9/boot-9.scm: 2320: 11 [save-module-excursion #] 3966: 10 [#] 1645: 9 [%start-stack load-stack #] 1650: 8 [#] In unknown file: ?: 7 [primitive-load "/gnu/store/7ny6wjvw8pqw1zcgwq8bxja7946l2l2d-glibc-mesboot-2.16.0-builder"] In ice-9/boot-9.scm: 157: 6 [catch srfi-34 ...] In srfi/srfi-1.scm: 616: 5 [for-each # ...] In ice-9/boot-9.scm: 171: 4 [with-throw-handler #t ...] In guix/build/gnu-build-system.scm: 925: 3 [#] In ice-9/eval.scm: 411: 2 [eval # #] In unknown file: ?: 1 [string-append " -L " ...] In ice-9/boot-9.scm: 106: 0 [# wrong-type-arg ...] ice-9/boot-9.scm:106:20: In procedure #: ice-9/boot-9.scm:106:20: In procedure string-append: Wrong type (expecting string): #f --8<---------------cut here---------------end--------------->8--- I deduced that this is because `(assoc-ref inputs "libc")` is returning #f. And indeed, changing the code to look in %build-inputs instead fixes the issue. I also noticed that most other places which look for a "libc" package do so in %build-inputs rather than in inputs. Just changing the line for "libc" is enough to fix the build but for consistency, also change the other variables as well. diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index fb028390a260..ab22bca2fb8f 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -2133,10 +2133,10 @@ ac_cv_c_float_format='IEEE (little-endian)' (invoke "tar" "xvf" source) (chdir (string-append "glibc-" ,version)))) (replace 'setenv - (lambda* (#:key inputs #:allow-other-keys) - (let* ((headers (assoc-ref inputs "headers")) - (libc (assoc-ref inputs "libc")) - (gcc (assoc-ref inputs "gcc")) + (lambda _ + (let* ((headers (assoc-ref %build-inputs "headers")) + (libc (assoc-ref %build-inputs "libc")) + (gcc (assoc-ref %build-inputs "gcc")) (cppflags (string-append " -I " (getcwd) "/nptl/sysdeps/pthread/bits" " -D BOOTSTRAP_GLIBC=1"))