GNU bug report logs - #62547
--symlink option of "guix shell -C -F" is non-functional for /lib and /usr/lib, unlike /bin

Previous Next

Package: guix;

Reported by: Maxime Devos <maximedevos <at> telenet.be>

Date: Thu, 30 Mar 2023 17:45:01 UTC

Severity: normal

To reply to this bug, email your comments to 62547 AT debbugs.gnu.org.

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#62547; Package guix. (Thu, 30 Mar 2023 17:45:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Maxime Devos <maximedevos <at> telenet.be>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Thu, 30 Mar 2023 17:45:01 GMT) Full text and rfc822 format available.

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

From: Maxime Devos <maximedevos <at> telenet.be>
To: bug-guix <bug-guix <at> gnu.org>
Subject: --symlink option of "guix shell -C -F" is non-functional for /lib and
 /usr/lib, unlike /bin
Date: Thu, 30 Mar 2023 19:44:32 +0200
[Message part 1 (text/plain, inline)]
$ guix shell -F -C tk -- some-software
# ... libtk8.5 not found, let's choose version 8.5

$ LC_ALL=en_GB.UTF-8 guix shell -F -C tk <at> 8.5 shell
guix shell: error: tk: package not found for version 8.5

# Guix doesn't have version 8.5.  Let's lie and pretend
# that 8.5=8.6, maybe it will be ‘close enough’ for
# ‘some-software’.

$ guix shell -F -C tk --symlink=/lib/libtk8.5.so=/lib/libtk8.5.so -- 
some-software

guix shell: fout: symlink target is absolute: '/lib/libtk8.5.so'

tip: The target of the symlink must be relative rather than absolute, as 
it is relative to the profile created.
Perhaps the source and target components of the symlink spec were 
inverted? Below is a valid example, where the
`/usr/bin/env' symbolic link is to target the profile's `bin/env' file:

     --symlink=/usr/bin/env=bin/env

# Looks an arbitrary limitation to me -- the symlink code could just
# treat absolute targets as absolute instead of relative to the profile.
# Still, let's give following the tip a try.

$ LC_ALL=en_GB.UTF-8 guix shell -F -C tk 
--symlink=/lib/libtk8.5.so=lib/libtk8.6.so -- some-software
error: failed to evaluate directive: ("/lib/libtk8.5.so" -> 
"/gnu/store/sbvf4784c43ssr20x45icvm8s8h7zvh4-profile/lib/libtk8.6.so")
guix shell: error: symlink: Read-only file system: ".//lib/libtk8.5.so"


# If /usr/lib is tried instead of /lib, a different error occurs:

$ LC_ALL=en_GB.UTF-8 guix shell -F -C tk 
--symlink=/usr/lib/libtk8.5.so=lib/libtk8.6.so -- some-software

guix shell: error: symlink: File exists: "/usr/lib"

# Contrast this with /bin, in which files symlinks can be put, unlike
# /usr/lib and /lib (yes I know that putting libraries in /bin doesn't
# make much sense, it's just an example):

$ LC_ALL=en_GB.UTF-8 guix shell -F -C tk 
--symlink=/bin/libtk8.5.so=lib/libtk8.6.so -- some-software
guix shell: error: some-software: command not found
hint: Did you mean 'mtrace'?

Greetings,
Maxime.
[OpenPGP_0x49E3EE22191725EE.asc (application/pgp-keys, attachment)]
[OpenPGP_signature (application/pgp-signature, attachment)]

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

Previous Next


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