From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id SMJwNPuEMGfhTQAA62LTzQ:P1 (envelope-from ) for ; Sun, 10 Nov 2024 10:03:40 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id SMJwNPuEMGfhTQAA62LTzQ (envelope-from ) for ; Sun, 10 Nov 2024 11:03:39 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=l11BFnjW; dmarc=none; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1731233019; a=rsa-sha256; cv=none; b=mQO/Jk9AXeyOfXgU20yt+/gEX2MVO4qdLkpq8AEybCpE8+zYe24G1HP46ewa9NXp0XQusx kV3g0igjnBX/abQWPWQSlpiyqdlvCUMUODszymPsVCl4ToejpI1vkO3yYWhctdJChWJkrO TZjZiprH+x0qpNnrrKDTZBPIQYT7n2cYXXDnXQiBVv0/O5kw/idUKAQ9XWRryh68AuvJJX W1UcQY8RL6NE4U0MTgPnyoQ7kJTx6BTFfcb3heyBuUfDUgr/absB2b1GvMwguvvdwwLfbI Xr7Ynuc6OWuFipOsU2Cen1aeSH8mQxmiQz054KtXMCCEg4o0BJhkOdbGqidtyQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=l11BFnjW; dmarc=none; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1731233019; 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=wGREpiIlkSDcv1tGJvOC7Oj1knm7KnVjt4ndJU+6Dmc=; b=iMT4l28eR0sOchtiYzht14clOUWFHjHVyjaeZkFHR7X89X3Bmi6sSRv4mnVExM6Kc/phoG 1YS37JUAa/GLijn4pIVK7U45ydcmBMUThtih7iHtapfQpO7gkQd9ETXqIurIVQud/Ir9Ee If95pox1msns+mJTuTW1NSctAnqQvBhpCC8U0tcpUkob/osmpB8jtRYR50z3vjPsjt7i7B s5MJu0IOUWm4mz5gYY9p7U825Zb6x8II4zU+1adWgpJLLxriV9uKyDl2bqJveUG5Exr01C 8gr9+An4W11JFyA2aI6WLI7mLqASoNM/cI3Znux69FxOfKdGBRaL/bl8iR+Z9g== 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 5090375645 for ; Sun, 10 Nov 2024 11:03:39 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tA4mk-0002Ql-Cn; Sun, 10 Nov 2024 05:03:10 -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 1tA4mi-0002QW-E4 for help-guix@gnu.org; Sun, 10 Nov 2024 05:03:08 -0500 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tA4mf-0004F6-Vz for help-guix@gnu.org; Sun, 10 Nov 2024 05:03:08 -0500 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-431ac30d379so30321625e9.1 for ; Sun, 10 Nov 2024 02:03:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1731232983; x=1731837783; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:user-agent :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wGREpiIlkSDcv1tGJvOC7Oj1knm7KnVjt4ndJU+6Dmc=; b=l11BFnjWUqobka1ry+xqKBWpCm18j++D1OMZ1G7qBF6Tc5tgwuNV0IRtu/oCQ2vDPd KhlmHZj8KRuocfTNCk5Kf9sdlSuM6QCHviciPLP7q+2PCMH/caLBNDEAsjJAJV01+Ew2 HG8lwhckx64MSQ8iSrffy/wW1b4QSOhoHzjZMnse7VAjc/gRBeDH6806absqkVCS3iTS WSmwyBGUWsUGLUbXS8Wb5pNXNgMOV60MBdNfhSX0pwMc6qN2W13tCddONCEvgXXrw04V 6gDiGSLhsMYykcpZdj6EWW1x/OlhHxoA/C+ivPuFx8CJmqIWwn1+kRGSvAhZ8YBVQNNs qLyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731232983; x=1731837783; h=content-transfer-encoding:mime-version:message-id:date:user-agent :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=wGREpiIlkSDcv1tGJvOC7Oj1knm7KnVjt4ndJU+6Dmc=; b=YLmZhXi0xnarjr/ryWKnp/zqeYbtoL1ocUps5lTR/BJ9njfpHflOfP3NEICOy1jThH dgkxu0g5NhLyktUmHMQlRqYYM3bKc+mhTLC+9qiFK8ECmgUVEIEv7FXhZoN7lL6JNA+R 7rwkZItsjRSvfoHLDzCCl3cUnBE7QamtRs+cA6kqWznjmREELmUXtwg5XuAF67zwDkA1 F5rWtweiD8gDki7FPZ7BltfKuZvAUsdm4tP14up0Mj1WCJI2IQ5X9N5ZGzcMIVx2DCr8 iMMkCLIyCp19yYXWdfwlwleWtUAEMmGrdEbU/WRrh9DeNqkX5DAkZXypt90/sXPX77Nq oXRA== X-Forwarded-Encrypted: i=1; AJvYcCUAhcOnhLGjTNo1KPAU4Jx03NbAPf4BR05OzvBLk/L3BX0JUy+YAWs76morOFdLqQGIfqmtwKoaG4A=@gnu.org X-Gm-Message-State: AOJu0YxPYq7GQGSo3fO5RRq7NB4saXeshj6W0brmuTt3IiFMGal/+p0J f0VgwBEpTyT2mLpBIYKFmAmt7CEk286FjctkRdBlWfhzAlJGOjzsJnm0miEDDGRCi2KfJyG9Kry p0qw= X-Google-Smtp-Source: AGHT+IEGKbBuvElRZ4aUjUuYRcsgOfJEJgVY7Kts11SDpidmk9dWufzYcelP0CZ7Ar4qEUkD1TlWBA== X-Received: by 2002:a05:6000:401f:b0:37d:3e00:9a9b with SMTP id ffacd0b85a97d-381f186cafbmr7769397f8f.20.1731232982814; Sun, 10 Nov 2024 02:03:02 -0800 (PST) Received: from euler.schwinge.ddns.net (p200300c8b743ca00d37840a5117bb56d.dip0.t-ipconnect.de. [2003:c8:b743:ca00:d378:40a5:117b:b56d]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-381ed970729sm9941586f8f.15.2024.11.10.02.03.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Nov 2024 02:03:02 -0800 (PST) From: Thomas Schwinge To: Ludovic =?utf-8?Q?Court=C3=A8s?= 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: <87cyj4x9vj.fsf@gnu.org> References: <87cyjc5jlj.fsf@euler.schwinge.ddns.net> <87ttcj2j45.fsf@euler.schwinge.ddns.net> <87cyj4x9vj.fsf@gnu.org> User-Agent: Notmuch/0.30+8~g47a4bad (https://notmuchmail.org) Emacs/29.4 (x86_64-pc-linux-gnu) Date: Sun, 10 Nov 2024 11:02:50 +0100 Message-ID: <87msi72yph.fsf@euler.schwinge.ddns.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=tschwinge@baylibre.com; helo=mail-wm1-x32f.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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-Spam-Score: -5.02 X-Spam-Score: -5.02 X-Migadu-Queue-Id: 5090375645 X-Migadu-Scanner: mx10.migadu.com X-TUID: PUyiZOxmSL2S Hi Ludo! On 2024-11-10T00:31:12+0100, Ludovic Court=C3=A8s wrote: > Thomas Schwinge skribis: > >>> $ guix install -p bi /gnu/store/lahbqdidl3ynasd0vzxz2i0dmgh0v16i-gc= c-toolchain-4.8.5 >>> [...] >>> >>> ..., where '/gnu/store/[...]-gcc-toolchain-4.8.5' is the main ("out") >>> output, which should -- per my understanding -- correspond to directly >>> 'guix install'ing: >>> >>> $ guix install -p i gcc-toolchain@4.8.5 >>> [...] >>> >>> But now compare the two installations: >>> >>> $ diff -ru bi/ i/ > > [...] > >>> --- bi/manifest 1970-01-01 01:00:01.000000000 +0100 >>> +++ i/manifest 1970-01-01 01:00:01.000000000 +0100 >>> @@ -9,4 +9,40 @@ >>> (("gcc-toolchain" >>> "4.8.5" >>> "out" >>> - "/gnu/store/lahbqdidl3ynasd0vzxz2i0dmgh0v16i-gcc-toolchain-4= .8.5")))) >>> + "/gnu/store/lahbqdidl3ynasd0vzxz2i0dmgh0v16i-gcc-toolchain-4= .8.5" >>> + (search-paths >>> + (("C_INCLUDE_PATH" ("include") ":" directory #f) >>> + ("CPLUS_INCLUDE_PATH" >>> + ("include/c++" "include") >>> + ":" >>> + directory >>> + #f) > > [...] > >>> This means that the 'bi' installation isn't usable. > > This may sound surprising but it=E2=80=99s expected. > > 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 Guix= 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'). But, of course, I'm still very new with learning Guix concepts and implementation, so... ;-| > 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? What is then the proper Guix way to achieve the following: | All this came up in context of wanting to install '--system=3Di686-linux' | 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? I'm happy to continue the discussion; hopefully with my GCC/toolchain experience I can eventually make a useful contribution to Guix here? (Unless, of course, I get convinced that the status quo is already the right way...) ;-) Gr=C3=BC=C3=9Fe Thomas