Subject: Re: bug#32316: Build failure with installed guix that does not happen with pre-inst-env

From: Julien Lepiller <[email-masked]>
Date: Tue, 31 Jul 2018 12:04:13 +0200

Le Tue, 31 Jul 2018 11:42:14 +0200,
Konrad Hinsen <[email-masked]> a écrit :

> Hi Björn,
> 
> > thanks for the precise error report.  
> 
> Thanks for your quick reply!
> 
> > Could it be the case that in your `guix build ...` you are not using
> > the guix you pulled?
> >
> > What does `guix --version` say?
> >
> > Where does `which guix` point to?
> >
> > It should point to
> >
> > ~/.config/guix/current/bin/guix  
> 
> It points to $HOME/.guix-profile/bin/guix, and since I have the
> package "guix" installed in my profile, that looks OK to me. At the
> very least I am used to it: guix has always been in my profile, and
> has always worked well that way.
> 
> But I do see how this could cause various failures after a guix pull,
> because the guix in my profile has to work with the updated stuff the
> pull has placed under ~/.config. So perhaps the real mystery is that I
> haven't had any trouble before. And I wonder what strategy to adopt to
> avoid it - remove guix from my profile? There was a good reason to
> install it last year, but I don't remember what it was. If installing
> guix into a profile is not a good idea, perhaps the guix package
> should disappear or be renamed to something that indicates its true
> purpose?
> 
> BTW, since I updated my profile with the pre-inst-env guix, I now also
> have a new guix in my profile and the build failure has disappeared.
> 
> Konrad.

You're experiencing the change to the (not so) new guix pull. Now a
complete guix is installed in ~/.config/guix/current. The guix
installed in your profile doesn't look for packages in that directory,
but uses its own definitions. This has a side-effect: whenever you try
to update your profile, not only does your guix not use the newer guix,
but the only guix package it knows of is a least 1 commit *before* your
current guix, hence downgrading guix (and package definitions) at every
update.

Make sure you uninstall guix from your profile and add
~/.config/guix/current/bin to your PATH. Then you should be able to use
the freshly pulled guix.