From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 4HVCNfoydWIVcQAAbAwnHQ (envelope-from ) for ; Fri, 06 May 2022 16:38:50 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id mK0RNfoydWI0QwAA9RJhRA (envelope-from ) for ; Fri, 06 May 2022 16:38:50 +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 153C130A24 for ; Fri, 6 May 2022 16:38:50 +0200 (CEST) Received: from localhost ([::1]:51416 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nmz6W-00018z-Os for larch@yhetil.org; Fri, 06 May 2022 10:38:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45280) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nmz5m-00017E-Aw for guix-patches@gnu.org; Fri, 06 May 2022 10:38:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:55478) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nmz5l-0005YY-U4 for guix-patches@gnu.org; Fri, 06 May 2022 10:38:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nmz5l-0003Ei-SC for guix-patches@gnu.org; Fri, 06 May 2022 10:38:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55220] [PATCH 0/4] Add --list-systems and --list-targets options. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 06 May 2022 14:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55220 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Mathieu Othacehe Cc: 55220@debbugs.gnu.org Received: via spool by 55220-submit@debbugs.gnu.org id=B55220.165184784612399 (code B ref 55220); Fri, 06 May 2022 14:38:01 +0000 Received: (at 55220) by debbugs.gnu.org; 6 May 2022 14:37:26 +0000 Received: from localhost ([127.0.0.1]:49375 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nmz5B-0003Dv-O2 for submit@debbugs.gnu.org; Fri, 06 May 2022 10:37:26 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51866) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nmz59-0003Dh-KK for 55220@debbugs.gnu.org; Fri, 06 May 2022 10:37:23 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46810) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nmz54-0005Q3-50 for 55220@debbugs.gnu.org; Fri, 06 May 2022 10:37:18 -0400 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=flqQCoGwecRXp5f+tEI63kXzB6l/2wHRyhZamZOSyv0=; b=eIqcR/GqHWdFpDSyfs0a H08Q72JRbSzH3oEkBpQ37/oH1SBSH+WEkiwxvEnKl2G//nkXUAUhnhES195NcQQRNCb0tQJwA+KUi Vzqm2ufKlIsA+HxKX1Gq0HpDnVD17ikYQudnm/4v+9J6LdypvL/mQ13JVBJbgYtsePVJd9ubRUPaO GlFbEi98Q4+W/EzXWG+KUeC9l/6jvHQn05T5MOXoPxzrRAoZcU6wZCl+nvypBGHh7eoHSgvjc4Y9X VT4x/HD8E0BNZ5IwOLN83SrEyFgXGZpbU70YVo/xGuY3u2gLq3JA6im7ucpxpmN53cEnWRvkbNCJD xPWcCsf+rj8/6w==; Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=44894 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nmz53-0005uC-Cm; Fri, 06 May 2022 10:37:17 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20220502111715.13500-1-othacehe@gnu.org> Date: Fri, 06 May 2022 16:37:13 +0200 In-Reply-To: <20220502111715.13500-1-othacehe@gnu.org> (Mathieu Othacehe's message of "Mon, 2 May 2022 13:17:15 +0200") Message-ID: <87sfpm3exy.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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" 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=1651847930; 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:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=flqQCoGwecRXp5f+tEI63kXzB6l/2wHRyhZamZOSyv0=; b=asM6kYgFVzP12qzUeGx2NVV8M3Wtmggr1PN747xfoH786Fl6X2/muVnFIbTZWVldihxAf3 orW/mS8BSoaPqloDYCqQDEFXL/0zQ5eKSMd35F5BniITTrK7a0muuWvLAZV7VCv+a66vZn 088V0PAvw3hCBMychBG7UczTjSyz3I2z2AqkstwA4h2pPPiIMpfz0tQF1OlV0ydEiuop3r hOAMutj5oLwechee7YpUxxgXPIa4ENIGQNOm26Si7ewnkM2yBdRiyWyLQolJlw++ozYcdH WMMmrWJJoGYb17CYzoYX9rqkCeRm91mjM2PY2bwcOfLfDVW/7yl01iEGZEE/Ng== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1651847930; a=rsa-sha256; cv=none; b=AkRetMVYuwFJDmqQU0vBT/57r2iZgqDSVdJe7VRiFyBfodpa4xvvzKnbWoiJmu4i6WbhGC 4VtU+pWKNSBqRVwW+JJmmVtL+2wu5gXld+2L/xGPpWMeQCh/nFPO+DHsUScHY9nIU1phJ2 ChJ2dix4Fz39p8aloYenmw7dXMqHYI6psLc1vl2y3t8dYub+t+MDjhcndMBjzOgYyjyyPB d8B2BS0qShfWAFF4UhT6f+dScMpb9YjeYebRcUWvdF/stvA+6w9wMkNfG3DEFv3zf82xvW 3PBJpRC+nGVaAq5e4l0lmuBbS5KE0zNrkbB2s3m8ZubHZYYsxKzRFeph17Ntaw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b="eIqcR/Gq"; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.90 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b="eIqcR/Gq"; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 153C130A24 X-Spam-Score: -3.90 X-Migadu-Scanner: scn1.migadu.com X-TUID: wfMmnlcIgYp2 Hello! Mathieu Othacehe skribis: > Most build commands support --system and --target options. Those options > suffer from multiple issues: they are never listed and never checked. > > For --system, this is a real issue as aside from reading the (gnu packages > bootstrap) module content the user cannot know what are the supported > arguments. Providing a wrong system also fails badly: > > mathieu@meije ~$ guix build hello --system=3Darm-linux > Backtrace: > In guix/memoization.scm: > 101:0 19 (_ # # =E2=80=A6) > > ... > ice-9/boot-9.scm:1685:16: In procedure raise-exception: > dynamic linker name not known for this system "arm-linux" > > For --target, any GNU supported triplet can possibly work but providing a > wrong triplet will also fail badly: > > mathieu@meije ~$ guix build hello --target=3Darm-linux > Backtrace: > In guix/store.scm: > 1385:9 19 (map/accumulate-builds # =E2=80=A6) >=20=20 > > ... > ice-9/boot-9.scm:1685:16: In procedure raise-exception: > dynamic linker name not known for this system "arm-linux" > > This patchset adds two new options: --list-systems and --list-targets that > list the supported systems and targets. The arguments passed to --system = and > --target options are also checked: > > mathieu@meije ~/guix [env]$ ./pre-inst-env guix build hello --system=3Dar= m-linux > guix build: error: 'arm-linux' is not a supported system. Nice. > mathieu@meije ~/guix [env]$ ./pre-inst-env guix build hello --target=3Dar= m-linux > guix build: error: 'arm-linux' is not a supported target. Nice=E2=80=A6 but it=E2=80=99s a valid triplet (for freestanding binaries o= n 32-bit ARM, I believe). The =E2=80=98--target=E2=80=99 issue is tricky IMO because it=E2=80=99s mos= tly free-form. In (gnu packages =E2=80=A6), there are calls like: (cross-gcc "avr" =E2=80=A6) (cross-gcc "arm-none-eabi" =E2=80=A6) (cross-gcc "propeller-elf" =E2=80=A6) These are unusual but valid triplets. (I=E2=80=99m going to look more closely at the rest to get a more informed opinion=E2=80=A6) Thanks for looking into this loooongstanding issue! Ludo=E2=80=99.