GNU bug report logs - #61841
‘guix shell’ computes different package derivation than ‘guix build’

Previous Next

Package: guix;

Reported by: Ludovic Courtès <ludo <at> gnu.org>

Date: Mon, 27 Feb 2023 13:38:01 UTC

Severity: important

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 61841 in the body.
You can then email your comments to 61841 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#61841; Package guix. (Mon, 27 Feb 2023 13:38:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ludovic Courtès <ludo <at> gnu.org>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Mon, 27 Feb 2023 13:38:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: bug-guix <at> gnu.org
Subject: ‘guix shell’ computes different package
 derivation than ‘guix build’
Date: Mon, 27 Feb 2023 14:36:56 +0100
Look at this weird phenomenon.

First, with ‘guix build’, everything works as expected:

--8<---------------cut here---------------start------------->8---
$ guix describe
Generation 247  Feb 27 2023 08:47:41    (current)
  guix 17bd024
    repository URL: https://git.savannah.gnu.org/git/guix.git
    branch: master
    commit: 17bd0243310754045cdc6cc362c804db4a8f9317
$ guix build ungoo
ungoogled-chromium          ungoogled-chromium-wayland  
$ guix build ungoogled-chromium -n
The following grafts would be made:
   /gnu/store/sb9bva92ycw40jiwvklvdwpr5pqs5y14-ungoogled-chromium-109.0.5414.119-1.drv
   /gnu/store/88bvz2ch3wsiz66qcmhhpbz2i60ms14j-harfbuzz-5.3.1.drv
   /gnu/store/pvrhcbpajl9cf2jjy8p01p5fh6kjf3fi-pipewire-0.3.63.drv
   /gnu/store/mjm6k8l2d0j1j3j3p7rqrrrj2pla4cwa-jack2-1.9.21.drv
$ guix build ungoogled-chromium -n --no-grafts
/gnu/store/p984s3dna89qw3j1s9w1jpz3wjw1jmfg-ungoogled-chromium-109.0.5414.119-1
$ guix build ungoogled-chromium -n --no-grafts -d
/gnu/store/i8f4qri399l1r2k7hrwpdxxgc3q77izw-ungoogled-chromium-109.0.5414.119-1.drv
--8<---------------cut here---------------end--------------->8---

But now ‘guix shell’ (same revision) wants to build ungoogled-chromium:

--8<---------------cut here---------------start------------->8---
$ guix shell ungoogled-chromium -n
The following derivations would be built:
  /gnu/store/6kgc8cd8wn010ba3jnywj2qsjsjk511s-ungoogled-chromium-109.0.5414.119-1.drv
  /gnu/store/xfiqj5qnnld9g8hdh879aa7gp7wprhaf-chromium-109.0.5414.119.tar.xz.drv
  /gnu/store/4ic70ax830gng6fbaqk3mf3rf2x6vf1j-jsoncpp.patch.drv
  /gnu/store/9sbl6km93sgb7wc2b14sc1fgf7alsb79-openjpeg.patch.drv
  /gnu/store/jcx82l35b070dz91aiz6gffgkngcf1gl-zlib.patch.drv

1,930.3 MB would be downloaded
$ guix shell ungoogled-chromium -n --no-grafts
The following derivations would be built:
  /gnu/store/mpfvrssy125chnxsy4qg61kk1a2s235d-profile.drv
  /gnu/store/kyncllwl57l2pk63rc154zdfmbx8759v-ungoogled-chromium-109.0.5414.119-1.drv
  /gnu/store/xfiqj5qnnld9g8hdh879aa7gp7wprhaf-chromium-109.0.5414.119.tar.xz.drv
  /gnu/store/4ic70ax830gng6fbaqk3mf3rf2x6vf1j-jsoncpp.patch.drv
  /gnu/store/9sbl6km93sgb7wc2b14sc1fgf7alsb79-openjpeg.patch.drv
  /gnu/store/jcx82l35b070dz91aiz6gffgkngcf1gl-zlib.patch.drv

1,930.3 MB would be downloaded
--8<---------------cut here---------------end--------------->8---

Why does ‘guix shell’ want to build a different derivation for the same
package?

The derivation ‘guix shell’ computed depends on different *.patch.drv,
compared to the “right” one:

--8<---------------cut here---------------start------------->8---
$ guix gc -R $(guix build ungoogled-chromium -d --no-grafts) |grep -E '(jsoncpp|openjpeg|zlib)\.patch\.drv'
/gnu/store/ysmmqzva7j49x7sswr5kdgdj59dsh8ip-zlib.patch.drv
/gnu/store/iamxhd6d0jqvmjfh458qwhm62bq2adb7-jsoncpp.patch.drv
/gnu/store/03hqmvhl97b8pxrcqahc9xk1bil2pbs3-openjpeg.patch.drv
--8<---------------cut here---------------end--------------->8---

To be continued…

Ludo’.




Severity set to 'important' from 'normal' Request was from Ludovic Courtès <ludo <at> gnu.org> to control <at> debbugs.gnu.org. (Mon, 27 Feb 2023 15:03:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-guix <at> gnu.org:
bug#61841; Package guix. (Mon, 27 Feb 2023 15:11:03 GMT) Full text and rfc822 format available.

Message #10 received at 61841 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: Josselin Poiret <dev <at> jpoiret.xyz>, Christopher Baines <mail <at> cbaines.net>,
 Simon Tournier <zimon.toutoune <at> gmail.com>, Mathieu Othacehe <othacehe <at> gnu.org>,
 Tobias Geerinckx-Rice <me <at> tobias.gr>, Ricardo Wurmus <rekado <at> elephly.net>,
 61255 <at> debbugs.gnu.org, 61841 <at> debbugs.gnu.org
Subject: Re: bug#61255: [PATCH 0/5] Add support for the RPM format to "guix
 pack"
Date: Mon, 27 Feb 2023 16:10:05 +0100
Hi Maxim,

Ludovic Courtès <ludo <at> gnu.org> skribis:

> I’m really not sure what the impact of
> 68775338a510f84e63657ab09242d79e726fa457 is, nor whether it was the only
> solution to the problem.
>
> One thing that probably happens is that (default-guile) is now never
> used for <computed-file>, contrary to what was happening before.  The
> spirit is that (default-guile) would be used as the default for all the
> declarative file-like objects; gexp compilers refer to (default-guile),
> not (%guile-for-build).
>
> Importantly, (%guile-for-build) is a derivation, possibly built for
> another system, whereas (default-guile) is a package, which allows
> ‘lower-object’ to return the derivation for the right system type.

Commit 68775338a510f84e63657ab09242d79e726fa457 turned out to have
unintended side effects:

  https://issues.guix.gnu.org/61841

I fixed it with:

  a516a0ba93 gexp: computed-file: Do not honor %guile-for-build.
  fee1d08f0d pack: Make sure tests can run without a world rebuild.

Please take a look.

We should think about how to improve our processes to avoid such issues
in the future.  I did raise concerns about this very patch late at night
during FOSDEM, 24h after submission, and reaffirmed my viewpoint days
later.  I understand that delaying a nice patch series like this one is
unpleasant, but I think those concerns should have been taken into
account.

Ludo’.




bug closed, send any further explanations to 61841 <at> debbugs.gnu.org and Ludovic Courtès <ludo <at> gnu.org> Request was from Ludovic Courtès <ludo <at> gnu.org> to control <at> debbugs.gnu.org. (Mon, 27 Feb 2023 15:41:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-guix <at> gnu.org:
bug#61841; Package guix. (Mon, 27 Feb 2023 16:42:02 GMT) Full text and rfc822 format available.

Message #15 received at 61841 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: Josselin Poiret <dev <at> jpoiret.xyz>, Christopher Baines <mail <at> cbaines.net>,
 Simon Tournier <zimon.toutoune <at> gmail.com>, Mathieu Othacehe <othacehe <at> gnu.org>,
 Tobias Geerinckx-Rice <me <at> tobias.gr>, Ricardo Wurmus <rekado <at> elephly.net>,
 61255 <at> debbugs.gnu.org, 61841 <at> debbugs.gnu.org
Subject: Re: bug#61255: [PATCH 0/5] Add support for the RPM format to "guix
 pack"
Date: Mon, 27 Feb 2023 11:41:32 -0500
Hi Ludovic,

Ludovic Courtès <ludo <at> gnu.org> writes:

> Hi Maxim,
>
> Ludovic Courtès <ludo <at> gnu.org> skribis:
>
>> I’m really not sure what the impact of
>> 68775338a510f84e63657ab09242d79e726fa457 is, nor whether it was the only
>> solution to the problem.
>>
>> One thing that probably happens is that (default-guile) is now never
>> used for <computed-file>, contrary to what was happening before.  The
>> spirit is that (default-guile) would be used as the default for all the
>> declarative file-like objects; gexp compilers refer to (default-guile),
>> not (%guile-for-build).
>>
>> Importantly, (%guile-for-build) is a derivation, possibly built for
>> another system, whereas (default-guile) is a package, which allows
>> ‘lower-object’ to return the derivation for the right system type.
>
> Commit 68775338a510f84e63657ab09242d79e726fa457 turned out to have
> unintended side effects:
>
>   https://issues.guix.gnu.org/61841

Ugh.

> I fixed it with:
>
>   a516a0ba93 gexp: computed-file: Do not honor %guile-for-build.
>   fee1d08f0d pack: Make sure tests can run without a world rebuild.
>
> Please take a look.

Thank you.  I still think it'd be nicer if computed-file had a means to
honor %guile-for-build rather than having to accommodate it specially as
you did in fee1d08f0d, so that it'd be symmetrical to gexp->derivation
in that regard.  Why can't they?

> We should think about how to improve our processes to avoid such issues
> in the future.  I did raise concerns about this very patch late at night
> during FOSDEM, 24h after submission, and reaffirmed my viewpoint days
> later.  I understand that delaying a nice patch series like this one is
> unpleasant, but I think those concerns should have been taken into
> account.

You are right, I should have delayed this submission passed its 2 weeks,
to let some extra time to look at alternatives w.r.t. the
%guile-for-build patch.  Apologies for being too eager!

-- 
Thanks,
Maxim




Information forwarded to bug-guix <at> gnu.org:
bug#61841; Package guix. (Mon, 27 Feb 2023 21:09:02 GMT) Full text and rfc822 format available.

Message #18 received at 61841 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: Josselin Poiret <dev <at> jpoiret.xyz>, Christopher Baines <mail <at> cbaines.net>,
 Simon Tournier <zimon.toutoune <at> gmail.com>, Mathieu Othacehe <othacehe <at> gnu.org>,
 Tobias Geerinckx-Rice <me <at> tobias.gr>, Ricardo Wurmus <rekado <at> elephly.net>,
 61255 <at> debbugs.gnu.org, 61841 <at> debbugs.gnu.org
Subject: Re: bug#61841: ‘guix shell’ computes
 different package derivation than ‘guix build’
Date: Mon, 27 Feb 2023 22:08:37 +0100
Maxim Cournoyer <maxim.cournoyer <at> gmail.com> skribis:

> Ludovic Courtès <ludo <at> gnu.org> writes:

[...]

>> Commit 68775338a510f84e63657ab09242d79e726fa457 turned out to have
>> unintended side effects:
>>
>>   https://issues.guix.gnu.org/61841
>
> Ugh.
>
>> I fixed it with:
>>
>>   a516a0ba93 gexp: computed-file: Do not honor %guile-for-build.
>>   fee1d08f0d pack: Make sure tests can run without a world rebuild.
>>
>> Please take a look.
>
> Thank you.  I still think it'd be nicer if computed-file had a means to
> honor %guile-for-build rather than having to accommodate it specially as
> you did in fee1d08f0d, so that it'd be symmetrical to gexp->derivation
> in that regard.  Why can't they?

Like I wrote, ‘default-guile’ returns a package whereas
‘%guile-for-build’ returns a derivation.

The latter is inherently lower-level: it’s used together with the
monadic interface or with plain ‘derivation’, when we know which system
we’re targeting.  The former is higher-level, system-independent; it
must be used for <computed-file> and similar forms, which are
system-independent.

Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#61841; Package guix. (Tue, 28 Feb 2023 02:27:01 GMT) Full text and rfc822 format available.

Message #21 received at 61841 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: Josselin Poiret <dev <at> jpoiret.xyz>, Christopher Baines <mail <at> cbaines.net>,
 Simon Tournier <zimon.toutoune <at> gmail.com>, Mathieu Othacehe <othacehe <at> gnu.org>,
 Tobias Geerinckx-Rice <me <at> tobias.gr>, Ricardo Wurmus <rekado <at> elephly.net>,
 61255 <at> debbugs.gnu.org, 61841 <at> debbugs.gnu.org
Subject: Re: bug#61841: ‘guix shell’ computes
 different package derivation than ‘guix build’
Date: Mon, 27 Feb 2023 21:25:52 -0500
Hi Ludo,

Ludovic Courtès <ludo <at> gnu.org> writes:

> Maxim Cournoyer <maxim.cournoyer <at> gmail.com> skribis:
>
>> Ludovic Courtès <ludo <at> gnu.org> writes:
>
> [...]
>
>>> Commit 68775338a510f84e63657ab09242d79e726fa457 turned out to have
>>> unintended side effects:
>>>
>>>   https://issues.guix.gnu.org/61841
>>
>> Ugh.
>>
>>> I fixed it with:
>>>
>>>   a516a0ba93 gexp: computed-file: Do not honor %guile-for-build.
>>>   fee1d08f0d pack: Make sure tests can run without a world rebuild.
>>>
>>> Please take a look.
>>
>> Thank you.  I still think it'd be nicer if computed-file had a means to
>> honor %guile-for-build rather than having to accommodate it specially as
>> you did in fee1d08f0d, so that it'd be symmetrical to gexp->derivation
>> in that regard.  Why can't they?
>
> Like I wrote, ‘default-guile’ returns a package whereas
> ‘%guile-for-build’ returns a derivation.
>
> The latter is inherently lower-level: it’s used together with the
> monadic interface or with plain ‘derivation’, when we know which system
> we’re targeting.  The former is higher-level, system-independent; it
> must be used for <computed-file> and similar forms, which are
> system-independent.

I see, it's starting to make sense.  I'll sleep on it :-).

-- 
Thanks,
Maxim




Information forwarded to bug-guix <at> gnu.org:
bug#61841; Package guix. (Wed, 01 Mar 2023 09:06:01 GMT) Full text and rfc822 format available.

Message #24 received at 61841 <at> debbugs.gnu.org (full text, mbox):

From: Josselin Poiret <dev <at> jpoiret.xyz>
To: Ludovic Courtès <ludo <at> gnu.org>, 61841 <at> debbugs.gnu.org
Subject: Re: bug#61841: ‘guix shell’ computes
 different package derivation than ‘guix build’
Date: Wed, 01 Mar 2023 10:05:12 +0100
[Message part 1 (text/plain, inline)]
Hi Ludo,

Ludovic Courtès <ludo <at> gnu.org> writes:

> Look at this weird phenomenon.
>
> First, with ‘guix build’, everything works as expected:
> [...]
> But now ‘guix shell’ (same revision) wants to build ungoogled-chromium:
> [...]
> Why does ‘guix shell’ want to build a different derivation for the same
> package?

Funnily enough, I don't have that problem locally: the `guix shell`
invocation only tells me it's gonna build a profile derivation (I don't
have ungoogled-chromium in my store btw), and the input derivation for
that profile is the same as for `guix build`.

Best,
-- 
Josselin Poiret
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#61841; Package guix. (Wed, 01 Mar 2023 21:35:02 GMT) Full text and rfc822 format available.

Message #27 received at 61841 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Josselin Poiret <dev <at> jpoiret.xyz>
Cc: 61841 <at> debbugs.gnu.org
Subject: Re: bug#61841: ‘guix shell’ computes
 different package derivation than ‘guix build’
Date: Wed, 01 Mar 2023 22:34:09 +0100
Howdy,

Josselin Poiret <dev <at> jpoiret.xyz> skribis:

> Ludovic Courtès <ludo <at> gnu.org> writes:
>
>> Look at this weird phenomenon.
>>
>> First, with ‘guix build’, everything works as expected:
>> [...]
>> But now ‘guix shell’ (same revision) wants to build ungoogled-chromium:
>> [...]
>> Why does ‘guix shell’ want to build a different derivation for the same
>> package?
>
> Funnily enough, I don't have that problem locally: the `guix shell`
> invocation only tells me it's gonna build a profile derivation (I don't
> have ungoogled-chromium in my store btw), and the input derivation for
> that profile is the same as for `guix build`.

It was fixed on Monday though, so perhaps you’re using a known-good
revision?

Anyway there are still people complaining about “lack of
ungoogled-chromium substitutes” (most likely: wrong ungoogled-chromium
derivation) right now on IRC.

Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#61841; Package guix. (Thu, 02 Mar 2023 09:24:01 GMT) Full text and rfc822 format available.

Message #30 received at 61841 <at> debbugs.gnu.org (full text, mbox):

From: Josselin Poiret <dev <at> jpoiret.xyz>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 61841 <at> debbugs.gnu.org
Subject: Re: bug#61841: ‘guix shell’ computes
 different package derivation than ‘guix build’
Date: Thu, 02 Mar 2023 10:23:13 +0100
[Message part 1 (text/plain, inline)]
Hi Ludo,

Ludovic Courtès <ludo <at> gnu.org> writes:

> It was fixed on Monday though, so perhaps you’re using a known-good
> revision?

That's probably the piece of info I was missing!  The discussion about
the issue didn't show up in the same thread in my MUA so I thought this
was simply unanswered, my bad.

Best,
-- 
Josselin Poiret
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 30 Mar 2023 11:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 22 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.