From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id SJ23A+RhB2RFSQEASxT56A (envelope-from ) for ; Tue, 07 Mar 2023 17:10:12 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 6LK2A+RhB2QhuwAA9RJhRA (envelope-from ) for ; Tue, 07 Mar 2023 17:10:12 +0100 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 C3A8A3B2F2 for ; Tue, 7 Mar 2023 17:10:11 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pZZsj-0003ST-B4; Tue, 07 Mar 2023 11:09:41 -0500 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 1pZZsb-0003OS-F2 for help-guix@gnu.org; Tue, 07 Mar 2023 11:09:33 -0500 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 1pZZsb-0003BH-1f; Tue, 07 Mar 2023 11:09:33 -0500 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=A2/IRgP3UXVqj3Y4+QHQxdvs1SWpFXBgWW3urPuGHnQ=; b=N6UHQmWKQg9pFlTe7qBN CALyc2zLphLkhCnEUWo14SRcS8eZaxtYD4XHHoBbUuxviycNT/w2Is/yrU87eGetMLRl52/uAMepq Me6DFJ0NpHtT3mLGVS2GHkaOV2lhXTntnQkuMH1yDyDwvwYftr5jZxk7lsQ9S1vPQf3YUdGK99Ju4 0fNg80t8kwlew+lrLwtwdJZK/GwumOP2+kDsBcKIkOdtPkgK3DX6xFUcZJ9s+Nd8NeM+FeOUMV1A+ RNf68bazc+ouK4lGYTve4felAAL3bPVqI1rFVcWfyvHQKK28hGaT5V3XQX7xVlvShjtGUequXMX7R PyMba6gH/T3ZgA==; Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pZZsU-0001UV-L9; Tue, 07 Mar 2023 11:09:29 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Greg Hogan Cc: Guix Help Subject: Re: %current-system and --system References: X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Septidi 17 =?utf-8?Q?Vent=C3=B4se?= an 231 de la =?utf-8?Q?R=C3=A9volution=2C?= jour du Doronic X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Tue, 07 Mar 2023 17:09:21 +0100 In-Reply-To: (Greg Hogan's message of "Fri, 3 Mar 2023 10:37:44 -0500") Message-ID: <87fsagbl1q.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-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=1678205411; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=A2/IRgP3UXVqj3Y4+QHQxdvs1SWpFXBgWW3urPuGHnQ=; b=pmbeXR2cL7dwZO62YMPdxJ8af6Oig3vAseJRJ7bPk1GKSXvNHvH3yWqJKkwaJD0t3uEpBW R/nuUDcfaXws0b+gfHGdsfkkSrI6Sci7lUglDL/BJVqCjROOX7tPkK7Za9bXpVLoVW6nn1 pLX1utFd1RDRN7YRDMqZR3J8CXalTSBTW4ic7pA95T4k+opmENQaL7dQsk4x+V5zksN/Ba oYJ7uW1fcWFFZz4wvDwdPbyyuE+r3lVFIFq62EnnQAjkwibG8E6gK6O3bY47KSHbExR+Zh BV3eDaPhA834DsESWHOhnOXkz78hsOmeDT2xFDhyA14Xbaidld1NxEVhlQBdkw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=N6UHQmWK; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1678205411; a=rsa-sha256; cv=none; b=QsJ9vYM/JKZitcNkpIJ2bmXIGZt1kilT4jfSgwMjmiDeQgBYHnMkfIb563eCchErlHGkme y+IjD8YxOB6dOqu963DFI9xSegAMwup0GFrrXY7VzNOpW0CXdMm71HLM5vW9IxOBmrIfoj C1nzlBgS+59aaAwSQyCUWx9+9qfY1tmDbsNkljAAfvBeis/5Rv5JX7r8YWtp4Z5aiHCs24 6UdWE/prdwCsZeyj5kEcW3Yl0xsDIxtlpRdhy2i/tKb0JWi75LlfAQ06jG771pSgm1i4+P 6ewU+WdU9NuSDdoodxlnQzErhe9Kk1buyabJ5BGGaFgHGtFgEqfN6Re3/bZoXQ== Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=N6UHQmWK; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org X-Migadu-Spam-Score: -6.22 X-Spam-Score: -6.22 X-Migadu-Queue-Id: C3A8A3B2F2 X-Migadu-Scanner: scn1.migadu.com X-TUID: QvQQoDrG+hvV Hi, Greg Hogan skribis: > From my x86_64 machine I am executing offload builds targeting an > aarch64 machine: > > $ guix build --system=3Daarch64-linux --manifest=3Dmanifest.scm > > Several packages do not build for aarch64 and need to be filtered out. > %current-target-system is #f as these are offload builds not cross > compilation, and %current-system is reported as "x86_64-linux". How > can I access the current "build system"? Not via =E2=80=98%current-system=E2=80=99 because at the time the manifest = is evaluated, it can be bound to anything, as you saw. What you could do is wrap packages in =E2=80=98let-system=E2=80=99, which l= ets you check the =E2=80=9Ccurrent system=E2=80=9D as the time the object is =E2=80=9Clow= ered=E2=80=9D (untested): (define (package-or-emptiness p) (let-system system (if (supported-package? p system) p (plain-file "emptyness" "Nothing to see here.")))) (manifest (map (lambda (p) (manifest-entry (inherit (package->manifest-entry p)) (item (package-or-emptiness p)))) the-packages)) Obviously that=E2=80=99s not great because you still end up with entries for non-existing packages. It=E2=80=99s good enough for =E2=80=98guix build -m= =E2=80=99 though. HTH! Ludo=E2=80=99.