From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 2KoFMRTOs2R6SAAASxT56A (envelope-from ) for ; Sun, 16 Jul 2023 13:01:40 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id COK8MBTOs2TNLgEAauVa8A (envelope-from ) for ; Sun, 16 Jul 2023 13:01:40 +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 63B1D47ADB for ; Sun, 16 Jul 2023 13:01:40 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=irvise.xyz header.s=protonmail3 header.b=HwjDuzjK; dmarc=pass (policy=quarantine) header.from=irvise.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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1689505300; a=rsa-sha256; cv=none; b=CBKKMPI6fxWL6bmXzbhRAKQ2AANBXxFuduArbVDmpjpwD6NQOtKYJBv6EKdvFQbWHvaHSL 4OXAjHVHZbC7yUYauYX9fGmpWqfhr0E4Xyj7kFlb/ZeO6LMJgX9e5jHnj7tQqGJtV/+qeU fil74yWZtPucmZx3TWvQx6ZCGIb7IdH3DMROi1EuIdSzMSaY19Pc/uTacyULqJk9k+A3ph 7AN9EBCRJYsHVd25j1yPg1VlU+8pBMsdb2jsIefLK8oKhNb+331IgrlKLss2UPzPK7fnqL e9te6kaDG8KDfnZr06Oe9ll5L7dzPythb33CRfj2ipUK1C2QwVC8Xv6who9Ktw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=irvise.xyz header.s=protonmail3 header.b=HwjDuzjK; dmarc=pass (policy=quarantine) header.from=irvise.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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1689505300; 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: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=8BQFJoQaZ/m88N25/alvAtSfiRqzHGtoIzmcX+Id5iI=; b=gSY50QNbxOvQqcOyaxHhbJuxC9pXyjtD8WYcr3snZJrb5OjYIBqDxyou4CFC4KTmnKJMHm NXEhiR5rkhwvYfLb2+yXtfoV85UkrnsaUJq8kMu8cr0b2z1/ofIcqt4rD7Smwv8wua6x2c g/iaD3eIX13ZAzIYHAHbZKksxE1JAi9SKlaescXbvCjQvYL8bTQeasf4vrsXQheQ0/6RHT jcZJo0CyFLrx44Qj+SnmlkerHP18AnB3qQCtHMdUK6rNjIQvOiHqQxp1/gFWT62sK8/8aX Tb4DNHdrCi2KXwxCtaRAb1K4/nk15z4eSIcHulJQX4O13UC3uvyF4dFbCzV9tg== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qKzUu-0004bn-Mv; Sun, 16 Jul 2023 07:01:05 -0400 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 1qKxQ7-0001bn-VD for guix-devel@gnu.org; Sun, 16 Jul 2023 04:48:00 -0400 Received: from mail-4018.proton.ch ([185.70.40.18]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qKxQ4-0002ns-7V for guix-devel@gnu.org; Sun, 16 Jul 2023 04:47:59 -0400 Date: Sun, 16 Jul 2023 08:47:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=irvise.xyz; s=protonmail3; t=1689497266; x=1689756466; bh=8BQFJoQaZ/m88N25/alvAtSfiRqzHGtoIzmcX+Id5iI=; h=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=HwjDuzjK7TRc6jnllcso7QOc59QnDg5O8kXDIb20miUYeO7An2sfVwU0nbnOHu3ta TEINgNt8dXhrYMlUU/WHFP6jXUWlTFohCNCnC7uo27CFRkOJ2NK9xYLi713vqLhzqI 72AYoyv5aunhrahfBKi3KKs2NWwY+VfhCtvBhYnUowYsgyfBMN6BBEeL23kOZom9FL LtXymMhh4WIDFLKBA1uRsMl7qghYyPlaGo7AArHwXSAoFZp7snytQIlqfohbFHSDuu bxaA6iFYmpJUvsIjSQtUjfLUbfzTdk/VFLMoKqBf6bA6IrTkW+ZlIkj4Nof6nmMXfs uObW0olHiuvZQ== To: Guix Devel From: Fernando Oleo Blanco Subject: Adding GNAT/GCC-Ada to Guix Message-ID: <5e3b0f14-9acf-ae97-1b87-f539917ecd8c@irvise.xyz> Feedback-ID: 37218277:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.70.40.18; envelope-from=irvise_ml@irvise.xyz; helo=mail-4018.proton.ch 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, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sun, 16 Jul 2023 07:01:01 -0400 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Queue-Id: 63B1D47ADB X-Migadu-Scanner: mx1.migadu.com X-Migadu-Spam-Score: -7.35 X-Spam-Score: -7.35 X-TUID: GnUvVBjmskHh Dear Guix community, I would like to bring once again [1] the discussion regarding the=20 addition of a modern Ada compiler to Guix. In this case, GCC-Ada, aka GNAT. TL;DR: GCC-Ada/GNAT cannot be bootstrapped. I would like to package a=20 binary up until a bootstrap path is available; which is already under=20 discussion. As far as I know, GCC-Ada has not been added to Guix for two major=20 reasons. The first one is the lack of bootstrappability and the second=20 one is that no one has given it a thorough try. This emails hopes to=20 shed some light on both of these topics. 1. Bootstrapping Ada GCC-Ada (originally known as GNAT) has always required a previous GNAT=20 version to compile newer releases. Ada was made an official language of=20 the GCC stack with the GCC 3.1 release. Before this release, GNAT was=20 distributed as a set of patches that had to be applied to GCC's src and=20 it required a previous GNAT compiler to be available. I could not find=20 "the original binary", but I have found ancient GNAT patch sets. The=20 first (non-public) binaries were created using an Ada 83 compiler,=20 potentially with Ada-Ed, an Ada 83 interpreter written in C (already=20 available in Guix). However, the first publicly available patches dating=20 from (GCC 2) already used Ada 95 features and required the Ada 95=20 compiler based on GCC. What does this wall of text mean? There was never a publicly available GNAT/GCC-Ada compiler that could be=20 bootstrapped. The bootstrapping path was never made available and has=20 been lost to history. Why did I tell all of this? Because I would like to add GCC-Ada to Guix and I am fully aware of the=20 work that the Guix and the #bootstrappable people are doing towards a=20 fully transparent compilation history. Opaque binaries are not allowed=20 for that purpose. Sadly that is not currently possible with Ada.=20 Therefore, I would like to get permission to add GCC-Ada as a binary up=20 until there is a bootstrapping path available. I am aware that some=20 languages/tools have received this treatment before. 2. A path towards bootstrapping GCC-Ada As I said, some of us are aware of the issue mentioned above. We have=20 already talked about a solution. I will not explain it here. Please,=20 read the forum posts available in [2]. However, a bootstrapping compiler=20 is years into the future. 3. What can Ada provide to Guix? Apart from being an official language of the GCC toolsuite, it is also=20 used in some important and unique places. For example, the graphics=20 stack of Coreboot/Libreboot among other drivers are written in Ada [3]=20 (you can find more by running `find . -type f -name "*.ad*"` on=20 Coreboot's root folder). It is also the base programming language of=20 SPARK [4], a verifiable, GPLv3 licensed, programming language, used for=20 the ARIANE rockets and the Rosetta space probe for example. And of=20 course, there are plenty of libraries, tools and programs written in=20 Ada! Without a compiler, none of this can be packaged in Guix... 4. The dreaded binaries As I said, I would like to package GCC-Ada, but it would initially be a=20 binary blob (a semi-trusted one, maybe one from the Alire [5,6] project=20 or Debian [7]). Are the Guix maintainers okay with this? Would you=20 accept such a commit? 4.5 Some technical data about the proposed binaries The Debian binary is just the GNAT/GCC-Ada compiler, meaning it has as=20 dependencies gcc-12, libc6, libgmp10, libgnat-12 (Ada STL), etc. The=20 compressed size of the package is ~18 MB, uncompressed it weighs ~91 MB.=20 This indicates that it is not a high entropy package. However, as I said=20 before, this is a very barebones Ada installation and it may make the=20 package creation quite complex as other binaries may be required. The Alire installation [6] weighs 296 MB compressed. Uncompressed it=20 becomes a 837 MB folder. The reason for the much larger weight (but=20 still relatively low entropy) is that the Alire binary comes with the=20 entire compilation suit. It has a C/C++ compiler, Ada, binutils, GDB,=20 some runtime environments, etc. It is a full, self-contained=20 installation that is designed to be a drop-in deployment to get started=20 compiling Ada. The compilation of this package is done using this python=20 script [8], so the process is transparent. 5. Closing up I personally would like the Alire installation media to be allowed as a=20 binary if this proposal is accepted. This is because it is much easier=20 to package (as the package would not need to link to other compilers or=20 libraries) and it is the standard tooling used in the Alire project=20 (think of Rust's Cargo but for Ada), which makes it fairly standard=20 within the community. What do you think? Is this a good idea? Should Guix accept this? Should=20 Guix not provide an Ada compiler unless it can be bootstrapped, which=20 will take years? Of course, I would like to see this accepted, but I believe an initial=20 discussion is required. [1] https://lists.gnu.org/archive/html/guix-devel/2017-01/msg01568.html [2] https://fossil.irvise.xyz/gnat-bootstrap/forum [3]=20 https://review.coreboot.org/plugins/gitiles/coreboot/+/refs/heads/master/sr= c/drivers/intel/gma/ [4] https://github.com/AdaCore/spark2014 [5] https://alire.ada.dev/ [6]=20 https://github.com/alire-project/GNAT-FSF-builds/releases/tag/gnat-12.2.0-1 [7] https://packages.debian.org/bookworm/gnat-12 [8] https://github.com/alire-project/GNAT-FSF-builds Best regards and thank you for your time, Fer