From: "Ludovic Courtès" <ludo@gnu.org>
To: Thomas Schwinge <tschwinge@baylibre.com>
Cc: guix-devel@gnu.org, help-guix@gnu.org
Subject: Re: 'guix build [P]' followed by 'guix install /gnu/store/[...]' vs. 'guix install [P]'
Date: Sun, 10 Nov 2024 00:31:12 +0100 [thread overview]
Message-ID: <87cyj4x9vj.fsf@gnu.org> (raw)
In-Reply-To: <87ttcj2j45.fsf@euler.schwinge.ddns.net> (Thomas Schwinge's message of "Thu, 07 Nov 2024 15:50:34 +0100")
Hi, Thomas!
Thomas Schwinge <tschwinge@baylibre.com> skribis:
>> $ guix install -p bi /gnu/store/lahbqdidl3ynasd0vzxz2i0dmgh0v16i-gcc-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’s expected.
The reason is that when you run:
guix install gcc-toolchain
‘gcc-toolchain’ 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/…
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.
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.
(For development, I’d also recommend ‘guix shell’ over ‘guix install’!)
HTH,
Ludo’.
next prev parent reply other threads:[~2024-11-09 23:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-03 17:10 'guix build [P]' followed by 'guix install /gnu/store/[...]' vs. 'guix install [P]' Thomas Schwinge
2024-11-07 14:50 ` Thomas Schwinge
2024-11-07 18:21 ` Rutherther
2024-11-09 23:31 ` Ludovic Courtès [this message]
2024-11-10 10:02 ` Thomas Schwinge
2024-11-14 10:00 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87cyj4x9vj.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guix-devel@gnu.org \
--cc=help-guix@gnu.org \
--cc=tschwinge@baylibre.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).