unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* 'guix build [P]' followed by 'guix install /gnu/store/[...]' vs. 'guix install [P]'
@ 2024-11-03 17:10 Thomas Schwinge
  2024-11-07 14:50 ` Thomas Schwinge
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Schwinge @ 2024-11-03 17:10 UTC (permalink / raw)
  To: help-guix

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-11-14 10:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2024-11-10 10:02     ` Thomas Schwinge
2024-11-14 10:00       ` Ludovic Courtès

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).