locale confusion

  • Done
  • quality assurance status badge
Details
4 participants
  • Chris Marusich
  • Dave Love
  • Leo Famulari
  • Ludovic Courtès
Owner
unassigned
Submitted by
Dave Love
Severity
normal
D
D
Dave Love wrote on 8 Dec 2016 14:48
(address . bug-guix@gnu.org)
87y3zq7cqx.fsf@pc102091.liv.ac.uk
I followed the instructions for getting locales working in
"(guix)Application Setup" to no effect initially. I'm running over
RHEL6, if that's relevant, and I have:

$ locale
LANG=en_GB.UTF-8
LC_CTYPE="en_GB.UTF-8"
LC_NUMERIC="en_GB.UTF-8"
LC_TIME="en_GB.UTF-8"
LC_COLLATE="en_GB.UTF-8"
LC_MONETARY="en_GB.UTF-8"
LC_MESSAGES="en_GB.UTF-8"
LC_PAPER="en_GB.UTF-8"
LC_NAME="en_GB.UTF-8"
LC_ADDRESS="en_GB.UTF-8"
LC_TELEPHONE="en_GB.UTF-8"
LC_MEASUREMENT="en_GB.UTF-8"
LC_IDENTIFICATION="en_GB.UTF-8"
LC_ALL=
$ export -p | grep GUIX
declare -x GUIX_LOCPATH="/home/dlove/.guix-profile/lib/locale"
$ find $GUIX_LOCPATH -name en_GB.UTF-8
/home/dlove/.guix-profile/lib/locale/2.24/en_GB.UTF-8

but saw this (note the warning):

$ guix --version
warning: failed to install locale: Invalid argument
guix (GNU Guix) 20161208.12
Copyright (C) 2016 the Guix authors
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

strace showed it looking in "locale/2.23", not "locale/2.24", despite
the environment.

"guix" there was from the /usr/local/bin link suggested by the
installation instructions. After a "guix package -i guix" (to the same
version of guix, but now in .guix-profile), I don't get the warning but
I wonder why that should have made a difference and why the environment
seems to be ignored.
L
L
Leo Famulari wrote on 8 Dec 2016 21:08
(name . Dave Love)(address . fx@gnu.org)(address . 25136@debbugs.gnu.org)
20161208200859.GB23449@jasmine
On Thu, Dec 08, 2016 at 01:48:38PM +0000, Dave Love wrote:
Toggle quote (16 lines)
> $ find $GUIX_LOCPATH -name en_GB.UTF-8
> /home/dlove/.guix-profile/lib/locale/2.24/en_GB.UTF-8
>
> but saw this (note the warning):
>
> $ guix --version
> warning: failed to install locale: Invalid argument
> guix (GNU Guix) 20161208.12
> Copyright (C) 2016 the Guix authors
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.
>
> strace showed it looking in "locale/2.23", not "locale/2.24", despite
> the environment.

The `guix` used here is older than the latest version, as evidenced by
the call to an older version of the locales.

Toggle quote (6 lines)
> "guix" there was from the /usr/local/bin link suggested by the
> installation instructions. After a "guix package -i guix" (to the same
> version of guix, but now in .guix-profile), I don't get the warning but
> I wonder why that should have made a difference and why the environment
> seems to be ignored.

If you followed the installation instructions, then
'/usr/local/bin/guix' is owned by root, as it is symlinked to
'/var/guix/profiles/per-user/root/guix-profile/bin/guix'.

My guess is that you updated dlove's Guix package definitions, using
`guix pull`, but not root's. This operation is per-user. So, dlove's
locales package is at 2.24, while root's is at 2.23.

The issue went away when you tried the `guix` command installed by dlove
because dlove's package definitions are more recent than root's, and
all refer to the 2.24 locales.

Note that you will also see these locale warnings from the guix-daemon
if GUIX_LOCPATH is unset in the daemon's environment.
C
C
Chris Marusich wrote on 9 Dec 2016 07:46
(name . Dave Love)(address . fx@gnu.org)(address . 25136@debbugs.gnu.org)
87a8c5sipu.fsf@gmail.com
Dave Love <fx@gnu.org> writes:

Toggle quote (37 lines)
> I followed the instructions for getting locales working in
> "(guix)Application Setup" to no effect initially. I'm running over
> RHEL6, if that's relevant, and I have:
>
> $ locale
> LANG=en_GB.UTF-8
> LC_CTYPE="en_GB.UTF-8"
> LC_NUMERIC="en_GB.UTF-8"
> LC_TIME="en_GB.UTF-8"
> LC_COLLATE="en_GB.UTF-8"
> LC_MONETARY="en_GB.UTF-8"
> LC_MESSAGES="en_GB.UTF-8"
> LC_PAPER="en_GB.UTF-8"
> LC_NAME="en_GB.UTF-8"
> LC_ADDRESS="en_GB.UTF-8"
> LC_TELEPHONE="en_GB.UTF-8"
> LC_MEASUREMENT="en_GB.UTF-8"
> LC_IDENTIFICATION="en_GB.UTF-8"
> LC_ALL=
> $ export -p | grep GUIX
> declare -x GUIX_LOCPATH="/home/dlove/.guix-profile/lib/locale"
> $ find $GUIX_LOCPATH -name en_GB.UTF-8
> /home/dlove/.guix-profile/lib/locale/2.24/en_GB.UTF-8
>
> but saw this (note the warning):
>
> $ guix --version
> warning: failed to install locale: Invalid argument
> guix (GNU Guix) 20161208.12
> Copyright (C) 2016 the Guix authors
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.
>
> strace showed it looking in "locale/2.23", not "locale/2.24", despite
> the environment.

Did /home/dlove/.guix-profile/lib/locale contain a "2.23" directory? If
not, then perhaps that's why the warning was emitted.

Toggle quote (6 lines)
> "guix" there was from the /usr/local/bin link suggested by the
> installation instructions. After a "guix package -i guix" (to the same
> version of guix, but now in .guix-profile), I don't get the warning but
> I wonder why that should have made a difference and why the environment
> seems to be ignored.

After "guix package -i guix", does the warning still show up when you
invoke "/usr/local/bin/guix"? If so, then perhaps the reason is that
the "guix" program installed in root's profile was compiled against a
different version of glibc (2.23, I guess) than the one in your profile.

I wonder if perhaps this is the kind of problem described in "(guix)
Locales", specifically the following:


--
Chris
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAlhKUz0ACgkQ3UCaFdgi
Rp3tFRAAsYtGlOq16jeZPYAzLN1gezH/wwbSKNp3L3+6hZ0rLvj0VInURm56Sq+W
v9CbdP3B85qQ02exDmIEYZYgVmoxUQpyd6wcm2oznyQdQ+NI+c/w+sF1dUfMEp8W
uPB52AqNxBbS+uVuoCpeQKWecU4QX/f8qgWGU3HUkTH33HJJtBgQ/UBI4tLTM2Tj
tw9t1+/o5+RR73SRZCuz+9SdyO1adyGREOYm3ByuPZuzdNDmBxCTLmXObpun4VO3
kZU/TrCZwVMRqt8lByy1u5ja2cB02baSpX8IihUeudWKHfiEFFqTahwJVgZacSIk
tl7w9ptsmARyPGJ8iqOnadGRI/oPBO72fo4mNrGrbcwZqtjKUMfeaa15n8RZ4pTp
KkVad9SvrJuEKyFHNTiXvuSkXaxtFXgzbnaefMNVKMmZjidLm9x+F2M7yrVZ1lSs
Ai9tR/qQHWtU5NgUnl932yHyiNNfSEUVjBPd9qaLuAKdlxd9A3IOPTQu8uW0Ctty
sf2XH+9ktHq8PLBL4+007kOmoS+jK/IdY2c6a/228s5McKB+W2s9RWqoVlkBUulO
bgsFFXw0p5jMiaf3LWk72zXrDiMABHsz0ZIhyAc1iW2/Ecxz+tGw5eHcZSrvoJyB
/0VQ9qnW1V7ZexOmpFpb5EyC/Tx/MxL4Smy4KZ0G7kJnBTsNfjc=
=ZzGm
-----END PGP SIGNATURE-----

D
D
Dave Love wrote on 12 Dec 2016 14:40
(name . Leo Famulari)(address . leo@famulari.name)(address . 25136@debbugs.gnu.org)
87a8c15kqy.fsf@pc102091.liv.ac.uk
Leo Famulari <leo@famulari.name> writes:

Toggle quote (4 lines)
> My guess is that you updated dlove's Guix package definitions, using
> `guix pull`, but not root's. This operation is per-user. So, dlove's
> locales package is at 2.24, while root's is at 2.23.

That may be right. I've lost track of this now, but I'll try to
reconstruct it and the thought process that caused the confusion.
Thanks for the comments, and perhaps this should have been on help-
rather than bug-. I guess it can be smoothed out anyhow. [For what
it's worth, I'm interested in avoiding obstacles to using saner
solutions on HPC systems, and the obstacles don't have to be very
high...]
L
L
Ludovic Courtès wrote on 24 Jan 2017 23:00
control message for bug #25136
(address . control@debbugs.gnu.org)
87efzs3ypi.fsf@gnu.org
tags 25136 notabug
close 25136
?