From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id MP2hEg2f32UDRAEAqHPOHw:P1 (envelope-from ) for ; Wed, 28 Feb 2024 22:01:01 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id MP2hEg2f32UDRAEAqHPOHw (envelope-from ) for ; Wed, 28 Feb 2024 22:01:01 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=protonmail.com header.s=protonmail3 header.b=mqAi0PZg; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1709154061; h=from:from:sender:sender:reply-to: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=ERcdv10slbQk61Py2Gw843j5FuBvg3zBb+GACZ4unJs=; b=PX5rxQOluX8keiHmwnHVTHZvhzAJAGiuYay+70OCJwl6otQ4UVUUeKN5bYCJ9qTiRuCAQS unMDPVZ5u01J9gSbZdnf7GxqnCmdeFHtpWGi9XVe3JUdjirmUCmN0HctY7KDX6ppjBEpTD iV5hUrXGYOMtW0qmr7qncqsfN1iacrtWlYOmb5ecU/aDhqpkIe4FKioMZNk9etItdg0QhX TVkBPLX+p2PAXdMliCIusX6JyiGOcNHKFTfZmmCKoZjFEiS3OyclIoihFf5ctLNjoiwVvg l8ictV4irq1/D16tAyJPNdiRCJQ0uWcqBp6W3bAu/3XkfFon59YS22p4cKviLg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=protonmail.com header.s=protonmail3 header.b=mqAi0PZg; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1709154061; a=rsa-sha256; cv=none; b=gH98LjYDlZ3NwNu/L/ySRBqNtb7aTI0yMJzk2/F0PtdBXFQvLZ1kZmZe8x9agb2wFrSZvb RqCm00ZXnRS4FkazPkYjcQVzdnYJrDnsybexVRqD0m2t99ha/QiYjbSM/nGOFApDwXWTNZ 4NO7J0faHSpOpNepPQDdElrjSq7Sh0jiZ6qcNsFVVRLnAG0sBsR1yEp1EGaBgByvHFj/EM NpZtEiUCC13zbWcKIsuWtSFO1EZ+Ay1a0SUiqO9EVsfnb2l3WhHrRzyi/d0CNmDz86dIZO 5Khn5EmD3+PZHtPLjZUWdRwDgJHYc0yenHSRqQDKo/moCgmz11Ic2Yt+aSWknQ== 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 2C6EE17325 for ; Wed, 28 Feb 2024 22:01:00 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rfR2e-0006RD-I7; Wed, 28 Feb 2024 16:00:40 -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 1rfR2a-0006Q0-Nj for guix-patches@gnu.org; Wed, 28 Feb 2024 16:00:37 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rfR2Z-000383-Ut for guix-patches@gnu.org; Wed, 28 Feb 2024 16:00:36 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rfR30-0003H0-BY for guix-patches@gnu.org; Wed, 28 Feb 2024 16:01:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#64929] [PATCH] gnu: gcc-toolchain: Create a 'bin/cc' symlink. References: In-Reply-To: Resent-From: John Kehayias Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 28 Feb 2024 21:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64929 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxime Devos Cc: Attila Lendvai , 64929@debbugs.gnu.org Received: via spool by 64929-submit@debbugs.gnu.org id=B64929.170915405512546 (code B ref 64929); Wed, 28 Feb 2024 21:01:02 +0000 Received: (at 64929) by debbugs.gnu.org; 28 Feb 2024 21:00:55 +0000 Received: from localhost ([127.0.0.1]:43181 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rfR2s-0003GG-FD for submit@debbugs.gnu.org; Wed, 28 Feb 2024 16:00:55 -0500 Received: from mail-4322.protonmail.ch ([185.70.43.22]:28039) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rfR2p-0003Fk-LX for 64929@debbugs.gnu.org; Wed, 28 Feb 2024 16:00:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1709154018; x=1709413218; bh=ERcdv10slbQk61Py2Gw843j5FuBvg3zBb+GACZ4unJs=; h=Date:To:From:Cc:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=mqAi0PZgzve60/iADkzPXGXQUUtaTd/aJjWGAXdUt4nAHSvqmSD/Zh0N7gABGnj21 UOsCg5PKKF4yJOz4n68fO9X3FHreW4vImrZky57PA5IIMb0UwwXmE+xXretI+G8USi gDeLiKtBKCkb/jls84Gs4jrkHSABG/tUW5JAZPbW4LsSKdsqX3maAgOmm6gHpf3UoA sNAKRXLBo5OsH5ofV/xiZ3i0CNq94m1zpT533J3sygA+d5MYfodOc1fedroaI4bWxo GdltOteVyNOBYP3G2r+ye8OtYzKhYlcjwBXva/riTyNVky5oZr3aSVA2kZ2pz3+Xky JY+9sW4QJ0Yxg== Date: Wed, 28 Feb 2024 20:59:55 +0000 Message-ID: <87a5nk71a1.fsf@protonmail.com> Feedback-ID: 7805494:user:proton 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: , Reply-to: John Kehayias X-ACL-Warn: , John Kehayias via Guix-patches From: John Kehayias via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -6.77 X-Spam-Score: -6.77 X-Migadu-Queue-Id: 2C6EE17325 X-Migadu-Scanner: mx13.migadu.com X-TUID: h1l4KvQtWsRe Hello, On IRC Attila (I'm pretty sure) brought this to my attention. I don't have much to add or feelings on this (I generally agree with the reasoning for leaving out a cc link in gcc-toolchain directly) except: On Mon, Aug 21, 2023 at 05:08 PM, Maxime Devos wrote: > Op 21-08-2023 om 16:30 schreef Attila Lendvai: >> ok, i see why this won't work. >> CC=3D(cc-for-target) is fine for packages, but the use-case that i'd >> like to facilitate is `guix shell gcc-toolchain some-other-deps` and >> then build a project manually from the opened shell. >> any ideas how to help/handle that use-case without disrupting >> cross-compilation for packages? >> > > IIUC, gcc-toolchain isn't used for "guix build" (I'm not really sure > though), so if that's your use case, your current patch would work > without problems w.r.t. cross-compilation. Rhetorical question: why > didn't I think of this when writing my previous message? > > However, (assuming my assumption about gcc-toolchain is correct), > applying the patch would create a discrepancy between the build > environment from "guix build/guix shell -D ..." and "guix shell > gcc-toolchain more-deps", which isn't nice and is potentially > confusing. > > I was going to suggest that the solution would be to modify your > script to look for TARGET-cc when cross-compiling, but while that > would be an improvement it wouldn't solve anything as Guix doesn't > have TARGET-cc. > > For an alternate proposal (which I think has been proposed before, but > I don't recall where), it might be possible to create 'symlink' > packages "symlink-cc-gcc" and "symlink-cc-clang", that respectively > have the cc->gcc and cc->clang symlink (also cc->clang should be > removed from the clang package, otherwise there is a collision and a > preference for clang). > > (I'm thinking of Debian's alternative system, but simplified (no > priorities!) and based on packages.) > or something like our python-wrapper package. In other words, a package to make things similar to other distros, just for a user that wants their own environment like that. Alternatively, I just wanted to note that in the --emulate-fhs option, we do set up a 'cc' symlink, as part of "emulating" a more typical FHS setup. I sort of just did that on my own since I thought it would be useful for the times one wants the FHS shell. Anyway, that is an option, though in a container you have to do more to set up your environment in the first place. John > For --with-c-toolchain (*) (**) and the cross-compilation issue I > mentioned, these should be forbidden for use in Guix packages (as in, > "guix lint" doesn't like it/not accepted in Guix proper, if some other > channel does it anyway, it's not recommended, but also not really any > of Guix' concern). > > (*) I don't know if clang and cross-compilation is supported yet by > --with-c-toolchain. > (**) though with-c-toolchain isn't truly a concern, as it could simply > adjust the symlink inputs ... > > (I have the impression that I previously was against such symlink > packages, but I don't recall actually writing a message about it.) > > Best regards, > Maxime Devos.