From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id MLDgG4h0RGKypwAAgWs5BA (envelope-from ) for ; Wed, 30 Mar 2022 17:17:28 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id eDG1FIh0RGIUJQAAG6o9tA (envelope-from ) for ; Wed, 30 Mar 2022 17:17:28 +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 15BAF17348 for ; Wed, 30 Mar 2022 17:17:28 +0200 (CEST) Received: from localhost ([::1]:41380 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nZa4d-0005s5-7w for larch@yhetil.org; Wed, 30 Mar 2022 11:17:27 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57746) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nZa4L-0005qF-Km for guix-devel@gnu.org; Wed, 30 Mar 2022 11:17:09 -0400 Received: from jpoiret.xyz ([206.189.101.64]:48078) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nZa4K-0007FD-3X for guix-devel@gnu.org; Wed, 30 Mar 2022 11:17:09 -0400 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id 00AD9184F1E for ; Wed, 30 Mar 2022 15:17:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1648653424; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=Gb/IvorffylYHp8ZHp9uXGkCS+3R4ITT8QZcsr3QBT0=; b=gUSSWRYu+0V8fVIPrqZR8e8nYWCSvVE+MJZ6xNGoNlg8r4QnzRHXTUVsNsXcSBDolEsxS5 b21KehW+PcncT/NEQLUCO88SbcEpR2qccsO9xff3qfythWqhqf0FprjzEnao1kf4IHCxKG 3rngcLy8l8DAogeCnje+a6z9x7KZzGqwZ9KreCOHmWc4WxmFKvDl9SKAOm0PHz9yX93NuH hpN6lMkrtw3Da9FCAA/I1Pzq94Oast00U9qnHbdMMemToIlQLu9Zz/pPVTvSN8MV3vpC/1 wvlI1wBZ8kOM/gmrrnCO+yTT8YcgRuQI/WJNt/DKo80MyzVQoWuIkgyeGQQwwg== From: Josselin Poiret To: guix-devel@gnu.org Subject: Deprecating legacy build phase style when cross-compiling vs. native Date: Wed, 30 Mar 2022 17:17:03 +0200 Message-ID: <874k3fh3m8.fsf@jpoiret.xyz> MIME-Version: 1.0 Content-Type: text/plain X-Spamd-Bar: / Received-SPF: pass client-ip=206.189.101.64; envelope-from=dev@jpoiret.xyz; helo=jpoiret.xyz X-Spam_score_int: 24 X-Spam_score: 2.4 X-Spam_bar: ++ X-Spam_report: (2.4 / 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, FROM_SUSPICIOUS_NTLD=0.499, FROM_SUSPICIOUS_NTLD_FP=1.997, PDS_OTHER_BAD_TLD=1.997, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1648653448; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=Gb/IvorffylYHp8ZHp9uXGkCS+3R4ITT8QZcsr3QBT0=; b=Sd/YhmTgQHLIk5kVXIfZfPX7hyz4pfij910dh6ysUcjuYpO1kTHf4xbbiYwsTiTmYWtYzL if/apBrM/XeKCUjbnA0KGwwfx1mXlgZSIEMO+Uh5qPl3sZ1jdqwZvmTePhWEtShrBlp5Qw XpC2HL2eF4h15ZWEdwh6CHfY/8JcXAMTqGj91UjNvQ6rbAs7Iu8AeNb6zJ5+oZwIBLINtb hQNHOAFFuSDpD/FBDUAXM7ibYhKWK+3dTQKJ3TO9ZLfmBWWuye6DyS7G2iPJv8B71NRtEE 8GYEgfNtodlf/PDqfw/k6ZyUPLAnfEYp2dInGDhDxWS4Qq8A5zu3aegBbAHb4A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1648653448; a=rsa-sha256; cv=none; b=aXAvj6LGjx3hgVYbRIt99nBcL9B+ZDFfHDx9WzuSEK99s240mFdSuFRC5TcIsjCHzQXzZ/ 0Iw688hNZWOSWlwjayRtQ0/z0VjHaWCASGF/c7aJ2IJRNNzHYXAYrXvVPz5wRM8hEeIB25 4BlD9bZes0aaaBRjgI0+kMsUQXS0N+oNcchSa07SExTmXk7LWwgD4rSKh9jVyPDVIUuOI+ KnLSt9s+t3DBcd3WcLIqLwJG/1T8Opp5HdPUyKtURli+BYL4bsQ2MDffr1H0x4DxR9HWuG ZSMzm1hZGQuMH6srFxRPhsBmbCj0xnkJ7ATW4AerurHtUKpAW3cAgBZAvxKoFg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=jpoiret.xyz header.s=dkim header.b=gUSSWRYu; dmarc=pass (policy=reject) header.from=jpoiret.xyz; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.07 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=jpoiret.xyz header.s=dkim header.b=gUSSWRYu; dmarc=pass (policy=reject) header.from=jpoiret.xyz; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 15BAF17348 X-Spam-Score: -4.07 X-Migadu-Scanner: scn0.migadu.com X-TUID: 16V4Vs4X/n2B Hello everyone, Following a report on IRC [1] that nss-certs wouldn't cross-build, I found out that the old syntax of using %output instead of the shinier $output was still supported only when native-compiling, and not when cross-compiling, at least for build-systems inheriting from gnu. Looking at guix/build-system/gnu.scm [2], we have gnu-build vs. gnu-cross-build, which are responsible for native vs. cross-builds. The former uses with-build-variables to set the legacy build variables such as %output and %outputs (see the def in guix/gexp.scm), whereas the latter does not, only doing so manually and so omitting %output. This means that packages that were not updated to fit the new style should all fail to cross-compile. This simple bug could be resolved by adding %output to gnu-cross-build, however as was argued on IRC this is now undocumented behaviour and we'd rather switch all packages to the new style instead. While I 100% agree with this, I think we should have a uniform deprecation policy for this matter, and that there shouldn't be such a disparity between cross and native builds. What do you all think? [1] https://logs.guix.gnu.org/guix/2022-03-30.log#150521 [2] https://git.savannah.gnu.org/cgit/guix.git/tree/guix/build-system/gnu.scm?id=1c2da6603565bafba58b81742ce705dc8becb2f7 Best, -- Josselin Poiret