From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id uPKJAlHKNWfTJAEA62LTzQ:P1 (envelope-from ) for ; Thu, 14 Nov 2024 10:00:49 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id uPKJAlHKNWfTJAEA62LTzQ (envelope-from ) for ; Thu, 14 Nov 2024 11:00:49 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=inria.fr header.s=dc header.b=BUwGH+aR; 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=inria.fr ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1731578448; 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=SS6m4NRz5VOQn6bzS7lc6fQ4tQ3VteBRwZezVEI5RN4=; b=gICJRmQbSPO2gfKUB5IQTlAn/QXJlaHAN79noGKN9RXsBOmBW3bI90LEiJx2NeXgTadSIY 5XfNPahmjLWWO7KXZpwskKvd7sREXQVG+p6UkhIKySj8EshKVSdFs3qiYsetC6mUVFqLn5 rNG+gNku7coNOOZiQ2mBZUniiBOV77nOmlBt+tR16sUh51gS46K+Bi70++DTkJ3Xa4t5EW 8zC0EMt+RBWQDQsU3lOPW5Y9D2nRe+M2A6CjN3KTT9Nc4qgk3ysrYBAG7I7lwCEuQXAebn eWH9ToNvJk2ckTISXnC+Jkd9SgRYaMbSQn/bO4K4yCFwmfc3MyBAX4Xwueb6mw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=inria.fr header.s=dc header.b=BUwGH+aR; 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=inria.fr ARC-Seal: i=1; s=key1; d=yhetil.org; t=1731578448; a=rsa-sha256; cv=none; b=iUTi4GEnurYzYIHakCzK6uqrWc6kHO/vhRK61gA6WOsycammZfP6z+R2vViITZON69kp4q U67F2YEF9L1Qeo5YNrwu850YjFkQ3mFIn3CHytc4unDcq53QEB+z6PAquV6nrsfUgWfGtl xi99bDERc3cgjVaM0IpvwC2pdQtgDQ30znK+NmhxXYM3Hzw8PrUIZ31cZf2zkrenpKWaIj T2HNxA7oeNE+QRVbExI2iouXr9yfuxoX6IkgpQCOSORERgWlCZ/qxWsrNDqLSrYCykISB5 U+qKWkcK92meEFwNXqDJ7Knojx2+nwQCsRIc5CUJKgpCnGOhYAUrLJTENDHusQ== 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 730437EC72 for ; Thu, 14 Nov 2024 11:00:48 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tBWe8-00062G-TA; Thu, 14 Nov 2024 05:00:16 -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 1tBWe5-00061h-UY; Thu, 14 Nov 2024 05:00:14 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tBWe3-00056p-IN; Thu, 14 Nov 2024 05:00:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version:content-transfer-encoding; bh=SS6m4NRz5VOQn6bzS7lc6fQ4tQ3VteBRwZezVEI5RN4=; b=BUwGH+aRbFCpx3dem3HueLNtothnrThvvr2r5KPPpGmx9l8nkdXhg3pJ Va9PF9N8lM4ShztfPORZiv5Bzg3nWsCa01H+PutOyKYvHpRknK4hkfJY9 qXUFKiqRBVlTh0HanlVCpel7VAKZbWnLYZUc4vy4MvxM6uDPGtAUb5+BJ I=; X-IronPort-AV: E=Sophos;i="6.12,153,1728943200"; d="scan'208";a="101591306" Received: from unknown (HELO ribbon) ([193.50.110.122]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Nov 2024 11:00:04 +0100 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Thomas Schwinge Cc: guix-devel@gnu.org, help-guix@gnu.org, rutherther@ditigal.xyz Subject: Re: 'guix build [P]' followed by 'guix install /gnu/store/[...]' vs. 'guix install [P]' In-Reply-To: <87msi72yph.fsf@euler.schwinge.ddns.net> (Thomas Schwinge's message of "Sun, 10 Nov 2024 11:02:50 +0100") References: <87cyjc5jlj.fsf@euler.schwinge.ddns.net> <87ttcj2j45.fsf@euler.schwinge.ddns.net> <87cyj4x9vj.fsf@gnu.org> <87msi72yph.fsf@euler.schwinge.ddns.net> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Quartidi 24 Brumaire an 233 de la =?utf-8?Q?R=C3=A9v?= =?utf-8?Q?olution=2C?= jour de l'Orange 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: Thu, 14 Nov 2024 11:00:03 +0100 Message-ID: <87ttcap23g.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=192.134.164.104; envelope-from=ludovic.courtes@inria.fr; helo=mail3-relais-sop.national.inria.fr 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_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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 X-Migadu-Scanner: mx11.migadu.com X-Migadu-Spam-Score: -1.30 X-Spam-Score: -1.30 X-Migadu-Queue-Id: 730437EC72 X-TUID: QDx6HLnYADNJ Hello! Thomas Schwinge skribis: >> The reason is that when you run: >> >> guix install gcc-toolchain >> >> =E2=80=98gcc-toolchain=E2=80=99 is a live package with metadata that Gui= x uses when it >> builds the profile, in particular data about search paths. >> >> However, when you run: >> >> guix package -i /gnu/store/=E2=80=A6 >> >> then all Guix sees is an inert store item with no associated metadata. >> This is why it ends up creating a profile without search path info. > > Hmm, I see. That also matches what Rutherther had written on IRC. > However, conceptually, I don't understand the rationale for doing it this > way. Isn't this Guix use of 'C_INCLUDE_PATH' etc. intimately specific to > the way how GCC has to be built/used in the Guix context? Therefore, I'd > expect such setup code to be an artifact (meta data) of 'guix build', > that is, written into '/gnu/store/[...]-gcc-toolchain-4.8.5/etc/profile' > at 'guix build' time, instead of into the '[Guix profile]/etc/profile' > created by 'guix install', and 'guix install' would then just use that > file (like, add to the '[Guix profile]/etc/profile' a shell > 'source /gnu/store/[...]-gcc-toolchain-4.8.5/etc/profile'). Yeah, I understand this can be confusing; it has to do with metadata only existing in package definitions and not in the build output in /gnu/store. >> This is one of the reasons why I would recommend against that second >> method. It might be useful as a last resort but should be avoided as >> much as possible. > > Hmm. But is it really a good idea then at all, to offer this way of > 'guix install'ing packages, if it can't be expected to work reliably? It can be helpful in =E2=80=9Crescue mode=E2=80=9D so to speak, but honestl= y, I haven=E2=80=99t used it in years and I thought nobody knew about it. :-) Maybe we should document it less prominently and/or add warnings against it, at least. > What is then the proper Guix way to achieve the following: > > | All this came up in context of wanting to install '--system=3Di686-linu= x' > | packages on '--system=3Dx86_64-linux', and I'm not able to just > | 'guix install --system=3Di686-linux gcc-toolchain@4.8.5' there. > | > | (Is there a fundamental reason for not allowing that, or just not yet > | implemented?) > > >> (For development, I=E2=80=99d also recommend =E2=80=98guix shell=E2=80= =99 over =E2=80=98guix install=E2=80=99!) > > That's also what yelninei suggested on IRC. I'm aware of 'guix shell', > and 'guix shell --system=3Di686-linux [...]' does work as expected, but > that's not feasible as an interactive shell if you'd like to use Guix GCC > to build upstream GCC: see > "gcc-toolchain environment variables", for example. I could have wrapper > 'gcc' etc. scripts that internally do: > > guix shell --system=3Di686-linux gcc-toolchain@4.8.5 -- gcc "$@" > > ..., but I'm not sure about the overhead of all those hundreds of > 'guix shell [...]' invocations? =E2=80=98guix shell=E2=80=99 maintains a cache, which means that subsequent= invocations (cache hit) runs in ~100 ms: --8<---------------cut here---------------start------------->8--- $ time guix shell -s i686-linux gcc-toolchain@4.8.5 -- gcc --version gcc (GCC) 4.8.5 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. real 0m0.124s user 0m0.131s sys 0m0.025s --8<---------------cut here---------------end--------------->8--- The overhead is small, but it might still be noticeable if you=E2=80=99re g= oing to run it hundreds of times. Ideally, you would set up the entire development environment for GCC with just a single =E2=80=98guix shell=E2=80=99 invocation and then go from= here. I haven=E2=80=99t looked at the bug report you mention above and how that pre= vents it from being practical, though. HTH, Ludo=E2=80=99.