From: Thomas Schwinge <tschwinge@baylibre.com>
To: help-guix@gnu.org
Subject: 'guix build [P]' followed by 'guix install /gnu/store/[...]' vs. 'guix install [P]'
Date: Sun, 03 Nov 2024 18:10:32 +0100 [thread overview]
Message-ID: <87cyjc5jlj.fsf@euler.schwinge.ddns.net> (raw)
Hi!
I was under the impression that 'guix build [P]' followed by
'guix install /gnu/store/[...]' would produce equivalent results to
'guix install [P]' -- but evidently that's not generally the case? With
up-to-date Guix:
$ guix build gcc-toolchain@4.8.5
[...]
/gnu/store/zq67w51hf6vpk3s2nriwnl7658biq9dz-gcc-toolchain-4.8.5-debug
/gnu/store/lahbqdidl3ynasd0vzxz2i0dmgh0v16i-gcc-toolchain-4.8.5
/gnu/store/82i6qfdqspg43rkphw0hhafny76z5bbr-gcc-toolchain-4.8.5-static
$ 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/
diff -ru bi/etc/profile i/etc/profile
--- bi/etc/profile 1970-01-01 01:00:01.000000000 +0100
+++ i/etc/profile 1970-01-01 01:00:01.000000000 +0100
@@ -8,4 +8,10 @@
# When GUIX_PROFILE is undefined, the various environment variables refer
# to this specific profile generation.
-export PATH="${GUIX_PROFILE:-/gnu/store/fh258i84wjshhaxnv4bb2qm6xipfxsnl-profile}/bin:${GUIX_PROFILE:-/gnu/store/fh258i84wjshhaxnv4bb2qm6xipfxsnl-profile}/sbin${PATH:+:}$PATH"
+export PATH="${GUIX_PROFILE:-/gnu/store/2vk4q0ffg4621pz4jd9pprscpm9dfiwf-profile}/bin:${GUIX_PROFILE:-/gnu/store/2vk4q0ffg4621pz4jd9pprscpm9dfiwf-profile}/sbin${PATH:+:}$PATH"
+export GUIX_LOCPATH="${GUIX_PROFILE:-/gnu/store/2vk4q0ffg4621pz4jd9pprscpm9dfiwf-profile}/lib/locale${GUIX_LOCPATH:+:}$GUIX_LOCPATH"
+export LIBRARY_PATH="${GUIX_PROFILE:-/gnu/store/2vk4q0ffg4621pz4jd9pprscpm9dfiwf-profile}/lib${LIBRARY_PATH:+:}$LIBRARY_PATH"
+export OBJCPLUS_INCLUDE_PATH="${GUIX_PROFILE:-/gnu/store/2vk4q0ffg4621pz4jd9pprscpm9dfiwf-profile}/include/c++:${GUIX_PROFILE:-/gnu/store/2vk4q0ffg4621pz4jd9pprscpm9dfiwf-profile}/include${OBJCPLUS_INCLUDE_PATH:+:}$OBJCPLUS_INCLUDE_PATH"
+export OBJC_INCLUDE_PATH="${GUIX_PROFILE:-/gnu/store/2vk4q0ffg4621pz4jd9pprscpm9dfiwf-profile}/include${OBJC_INCLUDE_PATH:+:}$OBJC_INCLUDE_PATH"
+export CPLUS_INCLUDE_PATH="${GUIX_PROFILE:-/gnu/store/2vk4q0ffg4621pz4jd9pprscpm9dfiwf-profile}/include/c++:${GUIX_PROFILE:-/gnu/store/2vk4q0ffg4621pz4jd9pprscpm9dfiwf-profile}/include${CPLUS_INCLUDE_PATH:+:}$CPLUS_INCLUDE_PATH"
+export C_INCLUDE_PATH="${GUIX_PROFILE:-/gnu/store/2vk4q0ffg4621pz4jd9pprscpm9dfiwf-profile}/include${C_INCLUDE_PATH:+:}$C_INCLUDE_PATH"
diff -ru bi/manifest i/manifest
--- 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)
+ ("OBJC_INCLUDE_PATH"
+ ("include")
+ ":"
+ directory
+ #f)
+ ("OBJCPLUS_INCLUDE_PATH"
+ ("include/c++" "include")
+ ":"
+ directory
+ #f)
+ ("LIBRARY_PATH" ("lib" "lib64") ":" directory #f)
+ ("GUIX_LOCPATH" ("lib/locale") ":" directory #f)
+ ("TZDIR" ("share/zoneinfo") #f directory #f)))
+ (properties
+ ((provenance
+ (repository
+ (version 0)
+ (url "https://git.savannah.gnu.org/git/guix.git")
+ (branch "master")
+ (commit
+ "8964dfdb84f7d21dbc89c217ca4f4546a15990af")
+ (name guix)
+ (introduction
+ (channel-introduction
+ (version 0)
+ (commit
+ "9edb3f66fd807b096b48283debdcddccfea34bad")
+ (signer
+ "BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA")))))))))))
This means that the 'bi' installation isn't usable.
Where is the error in (very likely) my thinking?
How do I, by the way, programmatically get from the 'guix build' list of
(here: three) outputs to the main ("out") output? Via
'/gnu/store/*-gcc-toolchain-4.8.5.drv' (as produced by
'guix build --derivations [...]'), I suppose, but what's the standard
way? Or, is there even a way to instruct 'guix build' to only produce
the main ("out") output, for example?
All this came up in context of wanting to install '--system=i686-linux'
packages on '--system=x86_64-linux', and I'm not able to just
'guix install --system=i686-linux gcc-toolchain@4.8.5' there.
(Is there a fundamental reason for not allowing that, or just not yet
implemented?)
Grüße
Thomas
next reply other threads:[~2024-11-05 15:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-03 17:10 Thomas Schwinge [this message]
2024-11-07 14:50 ` 'guix build [P]' followed by 'guix install /gnu/store/[...]' vs. 'guix install [P]' Thomas Schwinge
2024-11-07 18:21 ` Rutherther
2024-11-09 23:31 ` Ludovic Courtès
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=87cyjc5jlj.fsf@euler.schwinge.ddns.net \
--to=tschwinge@baylibre.com \
--cc=help-guix@gnu.org \
/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).