From patchwork Thu Jul 15 00:46:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thiago Jung Bauermann X-Patchwork-Id: 31420 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 DAB4F27BC82; Thu, 15 Jul 2021 01:48:16 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 69B6D27BC6B for ; Thu, 15 Jul 2021 01:48:16 +0100 (BST) Received: from localhost ([::1]:57918 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3pXz-0000yG-F0 for patchwork@mira.cbaines.net; Wed, 14 Jul 2021 20:48:15 -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 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Thiago Jung Bauermann X-ACL-Warn: , Thiago Jung Bauermann via Guix-patches X-Patchwork-Original-From: Thiago Jung Bauermann via Guix-patches via From: Thiago Jung Bauermann X-getmail-retrieved-from-mailbox: Patches 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"))