From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by sourceware.org (Postfix) with ESMTPS id BDA5D3858D20 for ; Wed, 17 Apr 2024 14:54:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BDA5D3858D20 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embecosm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org BDA5D3858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::432 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713365663; cv=none; b=p1ggs7KXbGmN3Jxipz0nxlMEOH5xoFfpTpb2iuNUfcty6fTP98HP+CmaV5SpKSG76r+frswe05VA7ukMnEu6CR3rQEC02/bnBHTaf6L10MPcYsDQezbYnd3kpjgfDrRmc7yl9RZYorVPshPHfr+gVD2WWy8VYp3XYRXSTEUarqk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713365663; c=relaxed/simple; bh=2lHSg98+pUzLS5ofnarKkLPwl1bMH+RQCjVFnDKBIWE=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=a76EUnJfiXu7m2OIbFQId6pqXzD/x7rzc5KXYfYiBql8rg227kUGlQmvl2+2/rY99hfpKVYBc/WCCdmHtgFuCmBAHCHXgeBt0tv5IP09C/9EGBeJZNTWzX0VUaztDblny38yKJOvCF2MPfBmfnPtsYPEVJBdQhl6+R//1+jaI9U= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-3455ff1339dso3874051f8f.0 for ; Wed, 17 Apr 2024 07:54:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; t=1713365660; x=1713970460; darn=gcc.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=CCw1HqHalTH7bHbMEd46C86RkKmGQEjfe1UcZkA05UA=; b=NjjK0ws/FQ+jIbD0iv2U/jxt0wKkarlZI5aTSQyBI0ewJulIve5UoU4JBOhcLaMMv3 Ta4Ky7h6xkw3pAeKkgutKqaq43iAi5RacvQ4+Rg90HOV3ngk/9WJ//dpLDXnv2l8m0O6 H5vlYgs6tTgvRse1wi+Hxf2Vf3b/t6WHF/9zGiPnL9iu+Atlmf/3AFbb9eZ1EqLy14Yl HaWD/Rom8jla3hFNzqdQY1N0S2y83BDBeN+3Begc5wT+3bH30UDFSmjfmEmqENkeskkP JCHAk8zIZ0vtzIe7TnU7OuPLQoH7GGexxrDcL0DLrt8kQASBjXkjkFMpmqEp/g9Yg5dI c6vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713365660; x=1713970460; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=CCw1HqHalTH7bHbMEd46C86RkKmGQEjfe1UcZkA05UA=; b=KdsU4PMJ9eg101rHjqKW9G9qxBqzK0+uKZmvyqfSFnk2NQEJsHCwGerhFoyXgZ1kB7 PrppRGCjxgS1oGbnZ2+yLwi+Wuc0DDMUGYMr+0IBrMdkTNFiRvFugi2DF+i3XvYb0jct xODMHcgK05O4DQpD8XXNyIJpQFWf14tl/RS/d3fw3bJVL7Ii5mEQ/h+NLA2SYiKMUiY6 pEDhoTfV79t2UhXQvTaJbA8EBIMptedUeDUnFS06kLx+UIaCG5YXK+Ju+i85V1on7QS/ EPCvPS7Ev0o9GacN+6buGys6BoWT12fN+3oO0/TAFC6YVdWzkdAo+miFziTOE686MB7O Vm7A== X-Forwarded-Encrypted: i=1; AJvYcCVy0wqPlZrIFZFFLcBAkKM8oxClkh1jJgw3u01G21xUjOyV1M+I747qTiNv2sX/mSEr8LxbsD8lYkTqFo1+LrHkaNlSHw== X-Gm-Message-State: AOJu0YyC8PJLrSbjJzp31i/b93s3Xc4/AEO7gMUr37AVRwBnEgJpmARj AQxalkXH2BHjfO7nBMvrF9Wv7W366uDRg/fJWBD9ZOupjRPkaQdkeCErtPlY+g== X-Google-Smtp-Source: AGHT+IFeek1TY6tnDppyj1ytdxeE9ylPW3sREHJsieT47aTtQI3hYMHZ0YxnlxlwN8PoGMn3JsHbqQ== X-Received: by 2002:adf:a397:0:b0:33d:26b1:c460 with SMTP id l23-20020adfa397000000b0033d26b1c460mr12736877wrb.39.1713365660381; Wed, 17 Apr 2024 07:54:20 -0700 (PDT) Received: from ?IPV6:2a04:cec2:8:6d0e:5c52:8bb2:c9be:4816? ([2a04:cec2:8:6d0e:5c52:8bb2:c9be:4816]) by smtp.gmail.com with ESMTPSA id df10-20020a5d5b8a000000b003437799a373sm17592056wrb.83.2024.04.17.07.54.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 17 Apr 2024 07:54:20 -0700 (PDT) Message-ID: <45ff25ab-b39e-4f2d-84bd-a3ee8cfff98a@embecosm.com> Date: Wed, 17 Apr 2024 16:54:19 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] build: Check for cargo when building rust language Content-Language: en-US To: Rainer Orth , Andrew Pinski Cc: pierre-emmanuel.patry@embecosm.com, gcc-patches@gcc.gnu.org, gcc-rust@gcc.gnu.org References: <20240408163337.303317-2-pierre-emmanuel.patry@embecosm.com> From: Arthur Cohen In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi Rainer! On 4/17/24 10:13, Rainer Orth wrote: > Andrew Pinski writes: > >> On Mon, Apr 8, 2024 at 9:39 AM wrote: >>> >>> From: Pierre-Emmanuel Patry >>> >>> Hello, >>> >>> The rust frontend requires cargo to build some of it's components, >>> it's presence was not checked during configuration. >> >> WHY did this go in right before the release of GCC 14? >> I don't get why this is considered temporary and it goes in right >> before a release. >> That seems broken to me. > > two more questions about this: > > Right now, the new cargo configure test disable rust on all of my > targets (Solaris, Linux, Darwin) which didn't have it installed. Before > (as recent as last Friday), I could successfully build and test > crab1/rust on all of them without cargo in sight. So I wonder if the > patch isn't premature. We already have components depending on Rust libraries in our development repository, so this patch is important to ensure errors are emitted early during the configure phase rather than later at build time. I don't think this is premature, considering that your targets would fail to build the Rust frontend next time we upstream commits, which should happen this week or early next week. > Besides, while there are packaged versions of cargo for Solaris 11.4 and > Linux, Darwin hasn't anything (not checked Homebrew or similar yet). > What's worse, rustup only supports macOS 10.12 and up, while I'm still > regularly testing 10.7 and 10.11. I don't really feel like building > rust from source here (if it works at all). This hasn't been an issue > for any other languages that require additional tools for bootstrapping > (like Ada or D): there are versions of GNAT around that still support > those old Darwin releases, and I could use the C++ version of GDC in GCC > 11. Sorry, I'm not too familiar with the Rust situation on macOS. I am reading that starting from Rust version 1.74, the minimum macOS version required is indeed 10.12, released in 2016 I believe? We currently depend on Rust version 1.72, so you should be able to install it on macOS 10.11. Maybe with rustup? You can try something like the following: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain=1.72.0; which is the default installation method for Rustup, with version 1.72 of the language specified. I'm not able to test this, sorry, but I'm very interested in knowing if it works. I think you can also install Rust using Homebrew, but again I am not able to test this and apologize. The goal is to reduce that Rust version further soon anyway - we are going to target Rust version 1.49, released 3 years ago, as that is the version that gccrs aims to compile. This will bring us closer to compiling our dependencies with our own frontend. > At the very least, the Rust situation needs to be documented clearly. I'd love to work on this - what sort of documentation do you have in mind? Do you mean something like the online GCC documentation or an in-tree file? Let me know what you'd like me to add and I'll be happy to do so. > > Rainer > Kindly, Arthur