unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Locales on NixOS
@ 2015-08-10 11:32 Andy Wingo
  2015-08-10 13:57 ` Andy Wingo
  2015-08-18 16:37 ` Ludovic Courtès
  0 siblings, 2 replies; 3+ messages in thread
From: Andy Wingo @ 2015-08-10 11:32 UTC (permalink / raw)
  To: guix-devel

Hi,

On one machine I have a NixOS system install and a Guix user install.
The specified recipe to set LOCPATH doesn't work for me there for some
reason.  I can't figure out why, the strace didn't show anything
obvious.

                                       locale from NixOS    locale from guix
  -----------------------------------+--------------------+-----------------
  LOCPATH unset                      | (1)                | (3)
  LOCPATH=~/.guix-profile/lib/locale | (2)                | (4)

This NixOS is the latest stable release and has glibc 2.20.  Guix is
from master and has glibc 2.21.

(1)
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=en_GB.utf8
LC_TIME=en_GB.utf8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=en_GB.utf8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=en_GB.utf8
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT=en_GB.utf8
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

(2)
/run/current-system/sw/bin/locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=en_GB.utf8
LC_TIME=en_GB.utf8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=en_GB.utf8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=en_GB.utf8
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT=en_GB.utf8
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

(3)
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=en_GB.utf8
LC_TIME=en_GB.utf8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=en_GB.utf8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=en_GB.utf8
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT=en_GB.utf8
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

(4)
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=en_GB.utf8
LC_TIME=en_GB.utf8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=en_GB.utf8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=en_GB.utf8
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT=en_GB.utf8
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

In all cases glibc-locales and glibc are installed.  What am I doing
wrong?  The settings ultimately come from GNOME's chooser thing, so
dunno what's up there but they should be fine.  Only (1) is a success.

Andy

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Locales on NixOS
  2015-08-10 11:32 Locales on NixOS Andy Wingo
@ 2015-08-10 13:57 ` Andy Wingo
  2015-08-18 16:37 ` Ludovic Courtès
  1 sibling, 0 replies; 3+ messages in thread
From: Andy Wingo @ 2015-08-10 13:57 UTC (permalink / raw)
  To: guix-devel

On Mon 10 Aug 2015 13:32, Andy Wingo <wingo@igalia.com> writes:

> Hi,
>
> On one machine I have a NixOS system install and a Guix user install.
> The specified recipe to set LOCPATH doesn't work for me there for some
> reason.  I can't figure out why, the strace didn't show anything
> obvious.
>
>                                        locale from NixOS    locale from guix
>   -----------------------------------+--------------------+-----------------
>   LOCPATH unset                      | (1)                | (3)
>   LOCPATH=~/.guix-profile/lib/locale | (2)                | (4)
>
> This NixOS is the latest stable release and has glibc 2.20.  Guix is
> from master and has glibc 2.21.
>
> (1)
> LANG=en_US.UTF-8
> LC_CTYPE="en_US.UTF-8"
> LC_NUMERIC=en_GB.utf8
> LC_TIME=en_GB.utf8

I finally figured this out: it works if I specify en_GB.UTF-8 instead of
en_GB.utf8.  I'm not sure why; strace shows en_GB.utf8 eventually
finding en_GB, for example:

  $ LC_MONETARY=en_GB.utf8 strace locale
  ...
  open("/home/wingo/.guix-profile/lib/locale/en_GB.utf8/LC_MONETARY", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
  open("/run/current-system/locale/en_GB.utf8/LC_MONETARY", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
  open("/home/wingo/.guix-profile/lib/locale/en_GB/LC_MONETARY", O_RDONLY|O_CLOEXEC) = 3
  fstat(3, {st_mode=S_IFREG|0444, st_size=291, ...}) = 0

Could it be a bug in glibc, where the first ENOENT errno is not getting
cancelled out by subsequent successful call?  Odd stuff.  I am going to
cut my losses and not investigate further, though.

Andy

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Locales on NixOS
  2015-08-10 11:32 Locales on NixOS Andy Wingo
  2015-08-10 13:57 ` Andy Wingo
@ 2015-08-18 16:37 ` Ludovic Courtès
  1 sibling, 0 replies; 3+ messages in thread
From: Ludovic Courtès @ 2015-08-18 16:37 UTC (permalink / raw)
  To: Andy Wingo; +Cc: guix-devel

Andy Wingo <wingo@igalia.com> skribis:

> (4)
> locale: Cannot set LC_ALL to default locale: No such file or directory
> LANG=en_US.UTF-8
> LC_CTYPE="en_US.UTF-8"
> LC_NUMERIC=en_GB.utf8
> LC_TIME=en_GB.utf8
> LC_COLLATE="en_US.UTF-8"
> LC_MONETARY=en_GB.utf8
> LC_MESSAGES="en_US.UTF-8"
> LC_PAPER=en_GB.utf8
> LC_NAME="en_US.UTF-8"
> LC_ADDRESS="en_US.UTF-8"
> LC_TELEPHONE="en_US.UTF-8"
> LC_MEASUREMENT=en_GB.utf8
> LC_IDENTIFICATION="en_US.UTF-8"
> LC_ALL=

Could it be because there’s a mixture UTF-8 and utf8?  So ‘setlocale’
works for the LC_MONETARY category but fails for the others, leading to
that that error message.

HTH,
Ludo’.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-08-18 16:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-10 11:32 Locales on NixOS Andy Wingo
2015-08-10 13:57 ` Andy Wingo
2015-08-18 16:37 ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).