GNU bug report logs -
#58859
profile contents depends on package order
Previous Next
To reply to this bug, email your comments to 58859 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guix <at> gnu.org
:
bug#58859
; Package
guix
.
(Sat, 29 Oct 2022 04:37:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
John Kehayias <john.kehayias <at> protonmail.com>
:
New bug report received and forwarded. Copy sent to
bug-guix <at> gnu.org
.
(Sat, 29 Oct 2022 04:37:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi Guix,
(I'm cc'ing the devel list for this bug report as I think some wider input and commentary would be worthwhile.)
While investigating a bug with the --emulate-fhs option (bug report forthcoming) I noticed that the profile contents can depend on the order of packages given as input to guix shell. The FHS bug is also due to argument order, but I think is clearly a bug and not expected behavior (wrong glibc included in the container). Though maybe we want to look around for other argument order problems or have some tests?
Actually, this is true for profiles more generally, as I just quickly tested the first example with "guix install" rather than just shell. My examples are all with shell, but I guess it comes down to the same thing. I think this is trickier with shell and the -D option, as we'll see in the second example.
First example, where we might expect something to happen, though personally I expected a profile collision error:
--8<---------------cut here---------------start------------->8---
❯ guix shell ffmpeg <at> 4 ffmpeg <at> 5
❯ ls -la $(which ffmpeg)
lrwxrwxrwx 1 root root 67 Dec 31 1969 /gnu/store/ivfa3mjhqiqc91m5h27sr9gfyzwnv1d0-profile/bin/ffmpeg -> /gnu/store/51gal8hjxilk1f26f3m3ggdhg9rykz6s-ffmpeg-5.1.2/bin/ffmpeg*
❯ ls -la $GUIX_ENVIRONMENT/lib/libavdevice.so*
lrwxrwxrwx 1 root root 75 Dec 31 1969 /gnu/store/ivfa3mjhqiqc91m5h27sr9gfyzwnv1d0-profile/lib/libavdevice.so -> /gnu/store/51gal8hjxilk1f26f3m3ggdhg9rykz6s-ffmpeg-5.1.2/lib/libavdevice.so*
lrwxrwxrwx 1 root root 78 Dec 31 1969 /gnu/store/ivfa3mjhqiqc91m5h27sr9gfyzwnv1d0-profile/lib/libavdevice.so.58 -> /gnu/store/hx4xf70yjgycx0asv1k1h33p7xms15m8-ffmpeg-4.4.2/lib/libavdevice.so.58*
lrwxrwxrwx 1 root root 85 Dec 31 1969 /gnu/store/ivfa3mjhqiqc91m5h27sr9gfyzwnv1d0-profile/lib/libavdevice.so.58.13.100 -> /gnu/store/hx4xf70yjgycx0asv1k1h33p7xms15m8-ffmpeg-4.4.2/lib/libavdevice.so.58.13.100*
lrwxrwxrwx 1 root root 78 Dec 31 1969 /gnu/store/ivfa3mjhqiqc91m5h27sr9gfyzwnv1d0-profile/lib/libavdevice.so.59 -> /gnu/store/51gal8hjxilk1f26f3m3ggdhg9rykz6s-ffmpeg-5.1.2/lib/libavdevice.so.59*
lrwxrwxrwx 1 root root 84 Dec 31 1969 /gnu/store/ivfa3mjhqiqc91m5h27sr9gfyzwnv1d0-profile/lib/libavdevice.so.59.7.100 -> /gnu/store/51gal8hjxilk1f26f3m3ggdhg9rykz6s-ffmpeg-5.1.2/lib/libavdevice.so.59.7.100*
--8<---------------cut here---------------end--------------->8---
Note that the last specified package, ffmpeg <at> 5, takes precedence here for bin, and the lib directory contains a mixture (as there are some unique filenames as well).
To compare, we do the same thing with the order of ffmpeg versions switched. As we might guess, the profile was not cached; this is a different profile.
--8<---------------cut here---------------start------------->8---
❯ guix shell ffmpeg <at> 5 ffmpeg <at> 4
The following derivation will be built:
/gnu/store/2273cnn0wpgid93na7wbhzijrz0r0hlx-profile.drv
building CA certificate bundle...
listing Emacs sub-directories...
building fonts directory...
generating GLib schema cache...
building directory of Info manuals...
building XDG desktop file cache...
building XDG MIME database...
building profile with 2 packages...
❯ ls -la $(which ffmpeg)
lrwxrwxrwx 1 root root 67 Dec 31 1969 /gnu/store/c3r3n5fxjs5r4lbjvz1x6rdlgbi8bv8a-profile/bin/ffmpeg -> /gnu/store/hx4xf70yjgycx0asv1k1h33p7xms15m8-ffmpeg-4.4.2/bin/ffmpeg*
❯ ls -la $GUIX_ENVIRONMENT/lib/libavdevice.so*
lrwxrwxrwx 1 root root 75 Dec 31 1969 /gnu/store/c3r3n5fxjs5r4lbjvz1x6rdlgbi8bv8a-profile/lib/libavdevice.so -> /gnu/store/hx4xf70yjgycx0asv1k1h33p7xms15m8-ffmpeg-4.4.2/lib/libavdevice.so*
lrwxrwxrwx 1 root root 78 Dec 31 1969 /gnu/store/c3r3n5fxjs5r4lbjvz1x6rdlgbi8bv8a-profile/lib/libavdevice.so.58 -> /gnu/store/hx4xf70yjgycx0asv1k1h33p7xms15m8-ffmpeg-4.4.2/lib/libavdevice.so.58*
lrwxrwxrwx 1 root root 85 Dec 31 1969 /gnu/store/c3r3n5fxjs5r4lbjvz1x6rdlgbi8bv8a-profile/lib/libavdevice.so.58.13.100 -> /gnu/store/hx4xf70yjgycx0asv1k1h33p7xms15m8-ffmpeg-4.4.2/lib/libavdevice.so.58.13.100*
lrwxrwxrwx 1 root root 78 Dec 31 1969 /gnu/store/c3r3n5fxjs5r4lbjvz1x6rdlgbi8bv8a-profile/lib/libavdevice.so.59 -> /gnu/store/51gal8hjxilk1f26f3m3ggdhg9rykz6s-ffmpeg-5.1.2/lib/libavdevice.so.59*
lrwxrwxrwx 1 root root 84 Dec 31 1969 /gnu/store/c3r3n5fxjs5r4lbjvz1x6rdlgbi8bv8a-profile/lib/libavdevice.so.59.7.100 -> /gnu/store/51gal8hjxilk1f26f3m3ggdhg9rykz6s-ffmpeg-5.1.2/lib/libavdevice.so.59.7.100*
--8<---------------cut here---------------end--------------->8---
This confirms the ordering of inputs to guix shell matters.
As a rather contrived example we might expect the user is paying attention with this explicit package input conflict. However, this also happens when that is not clear from the package names without inspecting package definitions.
See this second example, where the sdl2 package given to guix shell does not match the sdl2-2.0 input of ffmpeg <at> 4 (with the -D argument):
--8<---------------cut here---------------start------------->8---
❯ guix shell -D ffmpeg <at> 4 sdl2
❯ ls $GUIX_ENVIRONMENT/lib/libSDL2* -la
lrwxrwxrwx 1 root root 76 Dec 31 1969 /gnu/store/2hhpchr2xv01sbmjlngxhaq5znbvsckj-profile/lib/libSDL2-2.0.so.0 -> /gnu/store/f3bx0lad4w42035mlch9vnbl94q62yl0-sdl2-2.24.0/lib/libSDL2-2.0.so.0*
lrwxrwxrwx 1 root root 81 Dec 31 1969 /gnu/store/2hhpchr2xv01sbmjlngxhaq5znbvsckj-profile/lib/libSDL2-2.0.so.0.14.0 -> /gnu/store/m2p4dymf3s001kqmclr8dcysxdplz2b6-sdl2-2.0.14/lib/libSDL2-2.0.so.0.14.0*
lrwxrwxrwx 1 root root 83 Dec 31 1969 /gnu/store/2hhpchr2xv01sbmjlngxhaq5znbvsckj-profile/lib/libSDL2-2.0.so.0.2400.0 -> /gnu/store/f3bx0lad4w42035mlch9vnbl94q62yl0-sdl2-2.24.0/lib/libSDL2-2.0.so.0.2400.0*
lrwxrwxrwx 1 root root 69 Dec 31 1969 /gnu/store/2hhpchr2xv01sbmjlngxhaq5znbvsckj-profile/lib/libSDL2.a -> /gnu/store/f3bx0lad4w42035mlch9vnbl94q62yl0-sdl2-2.24.0/lib/libSDL2.a
lrwxrwxrwx 1 root root 70 Dec 31 1969 /gnu/store/2hhpchr2xv01sbmjlngxhaq5znbvsckj-profile/lib/libSDL2.la -> /gnu/store/f3bx0lad4w42035mlch9vnbl94q62yl0-sdl2-2.24.0/lib/libSDL2.la*
lrwxrwxrwx 1 root root 73 Dec 31 1969 /gnu/store/2hhpchr2xv01sbmjlngxhaq5znbvsckj-profile/lib/libSDL2main.a -> /gnu/store/f3bx0lad4w42035mlch9vnbl94q62yl0-sdl2-2.24.0/lib/libSDL2main.a
lrwxrwxrwx 1 root root 74 Dec 31 1969 /gnu/store/2hhpchr2xv01sbmjlngxhaq5znbvsckj-profile/lib/libSDL2main.la -> /gnu/store/f3bx0lad4w42035mlch9vnbl94q62yl0-sdl2-2.24.0/lib/libSDL2main.la*
lrwxrwxrwx 1 root root 70 Dec 31 1969 /gnu/store/2hhpchr2xv01sbmjlngxhaq5znbvsckj-profile/lib/libSDL2.so -> /gnu/store/f3bx0lad4w42035mlch9vnbl94q62yl0-sdl2-2.24.0/lib/libSDL2.so*
lrwxrwxrwx 1 root root 74 Dec 31 1969 /gnu/store/2hhpchr2xv01sbmjlngxhaq5znbvsckj-profile/lib/libSDL2_test.a -> /gnu/store/f3bx0lad4w42035mlch9vnbl94q62yl0-sdl2-2.24.0/lib/libSDL2_test.a
lrwxrwxrwx 1 root root 75 Dec 31 1969 /gnu/store/2hhpchr2xv01sbmjlngxhaq5znbvsckj-profile/lib/libSDL2_test.la -> /gnu/store/f3bx0lad4w42035mlch9vnbl94q62yl0-sdl2-2.24.0/lib/libSDL2_test.la*
--8<---------------cut here---------------end--------------->8---
Compare to
--8<---------------cut here---------------start------------->8---
❯ guix shell sdl2 -D ffmpeg <at> 4
❯ ls $GUIX_ENVIRONMENT/lib/libSDL2* -la
lrwxrwxrwx 1 root root 76 Dec 31 1969 /gnu/store/5qha912xpch2qswvc7clm3v08zab3zl9-profile/lib/libSDL2-2.0.so.0 -> /gnu/store/m2p4dymf3s001kqmclr8dcysxdplz2b6-sdl2-2.0.14/lib/libSDL2-2.0.so.0*
lrwxrwxrwx 1 root root 81 Dec 31 1969 /gnu/store/5qha912xpch2qswvc7clm3v08zab3zl9-profile/lib/libSDL2-2.0.so.0.14.0 -> /gnu/store/m2p4dymf3s001kqmclr8dcysxdplz2b6-sdl2-2.0.14/lib/libSDL2-2.0.so.0.14.0*
lrwxrwxrwx 1 root root 83 Dec 31 1969 /gnu/store/5qha912xpch2qswvc7clm3v08zab3zl9-profile/lib/libSDL2-2.0.so.0.2400.0 -> /gnu/store/f3bx0lad4w42035mlch9vnbl94q62yl0-sdl2-2.24.0/lib/libSDL2-2.0.so.0.2400.0*
lrwxrwxrwx 1 root root 69 Dec 31 1969 /gnu/store/5qha912xpch2qswvc7clm3v08zab3zl9-profile/lib/libSDL2.a -> /gnu/store/m2p4dymf3s001kqmclr8dcysxdplz2b6-sdl2-2.0.14/lib/libSDL2.a
lrwxrwxrwx 1 root root 70 Dec 31 1969 /gnu/store/5qha912xpch2qswvc7clm3v08zab3zl9-profile/lib/libSDL2.la -> /gnu/store/m2p4dymf3s001kqmclr8dcysxdplz2b6-sdl2-2.0.14/lib/libSDL2.la*
lrwxrwxrwx 1 root root 73 Dec 31 1969 /gnu/store/5qha912xpch2qswvc7clm3v08zab3zl9-profile/lib/libSDL2main.a -> /gnu/store/m2p4dymf3s001kqmclr8dcysxdplz2b6-sdl2-2.0.14/lib/libSDL2main.a
lrwxrwxrwx 1 root root 74 Dec 31 1969 /gnu/store/5qha912xpch2qswvc7clm3v08zab3zl9-profile/lib/libSDL2main.la -> /gnu/store/m2p4dymf3s001kqmclr8dcysxdplz2b6-sdl2-2.0.14/lib/libSDL2main.la*
lrwxrwxrwx 1 root root 70 Dec 31 1969 /gnu/store/5qha912xpch2qswvc7clm3v08zab3zl9-profile/lib/libSDL2.so -> /gnu/store/m2p4dymf3s001kqmclr8dcysxdplz2b6-sdl2-2.0.14/lib/libSDL2.so*
lrwxrwxrwx 1 root root 74 Dec 31 1969 /gnu/store/5qha912xpch2qswvc7clm3v08zab3zl9-profile/lib/libSDL2_test.a -> /gnu/store/m2p4dymf3s001kqmclr8dcysxdplz2b6-sdl2-2.0.14/lib/libSDL2_test.a
lrwxrwxrwx 1 root root 75 Dec 31 1969 /gnu/store/5qha912xpch2qswvc7clm3v08zab3zl9-profile/lib/libSDL2_test.la -> /gnu/store/m2p4dymf3s001kqmclr8dcysxdplz2b6-sdl2-2.0.14/lib/libSDL2_test.la*
--8<---------------cut here---------------end--------------->8---
We see that a needed and expected library, libSDL2-2.0.so.0, points to sdl2-2.24.0 in the first case and sdl2-2.014 in the second, matching the "later package argument takes precedence rule." We might expect this can get rather confusing given a few inputs and different versions.
Is this the expected behavior? In discussing with nckxhexen on #guix, it seemed something that should be messaged to the user. Perhaps a warning that there is a potential conflict/collision as one package is overriding or shadowing the other. And documented. The behavior itself seems predictable and perhaps the best choice here, if it is communicated.
Thoughts? Patches?
Thanks!
John
Information forwarded
to
bug-guix <at> gnu.org
:
bug#58859
; Package
guix
.
(Sat, 29 Oct 2022 15:03:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 58859 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Looks sort-of but not quite a duplicate of
<https://issues.guix.gnu.org/54350> (‘guix shell’ skips profile
collisions checks) to me.
Greetings,
Maxime.
[OpenPGP_0x49E3EE22191725EE.asc (application/pgp-keys, attachment)]
[OpenPGP_signature (application/pgp-signature, attachment)]
Information forwarded
to
bug-guix <at> gnu.org
:
bug#58859
; Package
guix
.
(Sat, 29 Oct 2022 20:48:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 58859 <at> debbugs.gnu.org (full text, mbox):
this is also somewhat related to:
https://issues.guix.gnu.org/50878
--
• attila lendvai
• PGP: 963F 5D5F 45C7 DFCD 0A39
--
“In your journey to healing, you will learn to appreciate the many faceted qualities of others. Your early impressions will grow more accurate and you will use your trust more wisely. As your boundaries become more clearly defined, you will detect more quickly when others violate them. When the wounds are healed, the sharks will no longer circle.”
— Richard Moskovitz, 'Lost in the Mirror'
Information forwarded
to
bug-guix <at> gnu.org
:
bug#58859
; Package
guix
.
(Wed, 02 Nov 2022 13:07:03 GMT)
Full text and
rfc822 format available.
Message #14 received at 58859 <at> debbugs.gnu.org (full text, mbox):
Hi,
On sam., 29 oct. 2022 at 20:47, Attila Lendvai <attila <at> lendvai.name> wrote:
> https://issues.guix.gnu.org/50878
It appears also related to:
http://issues.guix.gnu.org/issue/43585
Cheers,
simon
This bug report was last modified 2 years and 109 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.