unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Locales not working
@ 2015-02-10 18:06 Andreas Enge
  2015-02-10 18:30 ` Andreas Enge
  0 siblings, 1 reply; 10+ messages in thread
From: Andreas Enge @ 2015-02-10 18:06 UTC (permalink / raw)
  To: guix-devel

Hello,

after the latest upgrade of my profile, the locales do not seem to work
any more. All the fancy utf8 in your messages is broken in mutt, and
the locale command returns:
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=de_DE.UTF-8
LC_CTYPE="de_DE.UTF-8"
LC_NUMERIC="de_DE.UTF-8"
LC_TIME="de_DE.UTF-8"
LC_COLLATE="de_DE.UTF-8"
LC_MONETARY="de_DE.UTF-8"
LC_MESSAGES="de_DE.UTF-8"
LC_PAPER="de_DE.UTF-8"
LC_NAME="de_DE.UTF-8"
LC_ADDRESS="de_DE.UTF-8"
LC_TELEPHONE="de_DE.UTF-8"
LC_MEASUREMENT="de_DE.UTF-8"
LC_IDENTIFICATION="de_DE.UTF-8"
LC_ALL=

Do I need to set anything special? Install a separate package?

In the meantime, hooray for "--roll-back"! Äöüß!

Andreas

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

* Re: Locales not working
  2015-02-10 18:06 Locales not working Andreas Enge
@ 2015-02-10 18:30 ` Andreas Enge
  2015-02-11 20:39   ` Ludovic Courtès
  0 siblings, 1 reply; 10+ messages in thread
From: Andreas Enge @ 2015-02-10 18:30 UTC (permalink / raw)
  To: guix-devel

Ah, it turns out that I wrote my message before reading the ongoing discussion
on locales. What a coincidence! So we were at least two being bitten by this
bug (yes, yes) at the same time! I do not think it is reasonable to break
systems for saving 100MB.

The code of glibc states
            ;; Installing a locale archive with all the locales is to
            ;; expensive (~100 MiB), so we rely on users to install the
            ;; locales they really want.
But how do I do that? I wondered if there was an additional "locale" output
of glibc, but there is not.

$ guix package -A locale
does not return anything useful.

There is a section 6.2.6 in the manual, but it only speaks about GSD,
not about Guix inside other systems.

So there needs to be a simple way to install locales to be used by Guix
packages, and it needs to be documented. Or the patch could be reverted.

Andreas

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

* Re: Locales not working
  2015-02-10 18:30 ` Andreas Enge
@ 2015-02-11 20:39   ` Ludovic Courtès
  2015-02-12 17:38     ` Andreas Enge
  2015-02-15  0:52     ` Mark H Weaver
  0 siblings, 2 replies; 10+ messages in thread
From: Ludovic Courtès @ 2015-02-11 20:39 UTC (permalink / raw)
  To: Andreas Enge; +Cc: guix-devel

Andreas Enge <andreas@enge.fr> skribis:

> The code of glibc states
>             ;; Installing a locale archive with all the locales is to
>             ;; expensive (~100 MiB), so we rely on users to install the
>             ;; locales they really want.
> But how do I do that? I wondered if there was an additional "locale" output
> of glibc, but there is not.
>
> $ guix package -A locale
> does not return anything useful.
>
> There is a section 6.2.6 in the manual, but it only speaks about GSD,
> not about Guix inside other systems.

Right, Mark reported it as well.

The basic idea is that it’s up to you to define $LOCPATH and have it
point to a place that contains locale data (info "(libc) Locale Names").

But I think we could provide a ‘glibc-locales’ package (110 MiB) for
those in search of a quick fix on foreign distros.

(Time passes...)

Commit aee6180c adds ‘glibc-locales’.  You can install it and do:

  export LOCPATH=$HOME/.guix-profile/share/locale

though that’s not the most efficient approach space-wise.

I would instead recommend using your host libc’s locale data, which
should be compatible; something like that (untested):

  export LOCPATH=/usr/share/locale

Last, commit d6718df of ‘core-updates’ adds a search path specification
for ‘LOCPATH’.  (Not really useful for profiles since one would need to
explicitly install glibc in their profile to get the message about
‘LOCPATH’.)

Ludo’.

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

* Re: Locales not working
  2015-02-11 20:39   ` Ludovic Courtès
@ 2015-02-12 17:38     ` Andreas Enge
  2015-02-15  0:52     ` Mark H Weaver
  1 sibling, 0 replies; 10+ messages in thread
From: Andreas Enge @ 2015-02-12 17:38 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

On Wed, Feb 11, 2015 at 09:39:36PM +0100, Ludovic Courtès wrote:
> Commit aee6180c adds ‘glibc-locales’.  You can install it and do:
>   export LOCPATH=$HOME/.guix-profile/share/locale

Excellent, that works for me!

Thank you very much,

Andreas

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

* Re: Locales not working
  2015-02-11 20:39   ` Ludovic Courtès
  2015-02-12 17:38     ` Andreas Enge
@ 2015-02-15  0:52     ` Mark H Weaver
  2015-02-23 21:28       ` LC_TIME category in Coreutils Ludovic Courtès
  1 sibling, 1 reply; 10+ messages in thread
From: Mark H Weaver @ 2015-02-15  0:52 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

ludo@gnu.org (Ludovic Courtès) writes:

> Commit aee6180c adds ‘glibc-locales’.  You can install it and do:
>
>   export LOCPATH=$HOME/.guix-profile/share/locale

I tried adding 'glibc-locales' to my system profile, and got this:

--8<---------------cut here---------------start------------->8---
ERROR: union-build: collision between file and directories ((files ("/gnu/store/nda1ih2iy8likfipl62afiqs6jwdsfxi-glibc-locales-2.20/share/locale/zh_CN/LC_TIME")) (dirs ("/gnu/store/mgfqcbm31rh738z13xlwh9ld9dm2vfvz-coreutils-8.23/share/locale/zh_CN/LC_TIME")))
--8<---------------cut here---------------end--------------->8---

Indeed, in coreutils "share/locale/zh_CN/LC_TIME" is a directory
containing a symbolic link "coreutils.mo" pointing to
"../LC_MESSAGES/coreutils.mo", whereas in glibc-locales
"share/locale/zh_CN/LC_TIME" is a binary file.

Any ideas how to resolve this conflict?

      Mark

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

* LC_TIME category in Coreutils
  2015-02-15  0:52     ` Mark H Weaver
@ 2015-02-23 21:28       ` Ludovic Courtès
  2015-02-23 22:01         ` bug#19933: " Andreas Schwab
  2015-02-23 22:15         ` bug#19933: " Paul Eggert
  0 siblings, 2 replies; 10+ messages in thread
From: Ludovic Courtès @ 2015-02-23 21:28 UTC (permalink / raw)
  To: Mark H Weaver, bug-coreutils; +Cc: guix-devel

Mark H Weaver <mhw@netris.org> skribis:

> I tried adding 'glibc-locales' to my system profile, and got this:
>
> ERROR: union-build: collision between file and directories ((files ("/gnu/store/nda1ih2iy8likfipl62afiqs6jwdsfxi-glibc-locales-2.20/share/locale/zh_CN/LC_TIME")) (dirs ("/gnu/store/mgfqcbm31rh738z13xlwh9ld9dm2vfvz-coreutils-8.23/share/locale/zh_CN/LC_TIME")))
>
> Indeed, in coreutils "share/locale/zh_CN/LC_TIME" is a directory
> containing a symbolic link "coreutils.mo" pointing to
> "../LC_MESSAGES/coreutils.mo", whereas in glibc-locales
> "share/locale/zh_CN/LC_TIME" is a binary file.
>
> Any ideas how to resolve this conflict?

I would have expected packages other than libc to provide only
LC_MESSAGES, so I didn’t think such collisions could happen.

This happens with Coreutils because its bootstrap.conf adds
‘EXTRA_LOCALE_CATEGORIES = LC_TIME’ to po/Makevars, and apparently
always has.

However, I suspect this isn’t needed.  Can someone comment?

Thanks,
Ludo’.

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

* bug#19933: LC_TIME category in Coreutils
  2015-02-23 21:28       ` LC_TIME category in Coreutils Ludovic Courtès
@ 2015-02-23 22:01         ` Andreas Schwab
  2015-02-24 23:07           ` Ludovic Courtès
  2015-02-23 22:15         ` bug#19933: " Paul Eggert
  1 sibling, 1 reply; 10+ messages in thread
From: Andreas Schwab @ 2015-02-23 22:01 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel, mhw, 19933

ludo@gnu.org (Ludovic Courtès) writes:

> Mark H Weaver <mhw@netris.org> skribis:
>
>> I tried adding 'glibc-locales' to my system profile, and got this:
>>
>> ERROR: union-build: collision between file and directories ((files ("/gnu/store/nda1ih2iy8likfipl62afiqs6jwdsfxi-glibc-locales-2.20/share/locale/zh_CN/LC_TIME")) (dirs ("/gnu/store/mgfqcbm31rh738z13xlwh9ld9dm2vfvz-coreutils-8.23/share/locale/zh_CN/LC_TIME")))
>>
>> Indeed, in coreutils "share/locale/zh_CN/LC_TIME" is a directory
>> containing a symbolic link "coreutils.mo" pointing to
>> "../LC_MESSAGES/coreutils.mo", whereas in glibc-locales
>> "share/locale/zh_CN/LC_TIME" is a binary file.
>>
>> Any ideas how to resolve this conflict?
>
> I would have expected packages other than libc to provide only
> LC_MESSAGES, so I didn’t think such collisions could happen.

glibc's locale files are supposed to reside in $(libdir)/locale, not
$(datadir)/locale, so there is no conflict.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

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

* bug#19933: LC_TIME category in Coreutils
  2015-02-23 21:28       ` LC_TIME category in Coreutils Ludovic Courtès
  2015-02-23 22:01         ` bug#19933: " Andreas Schwab
@ 2015-02-23 22:15         ` Paul Eggert
  2015-02-24 23:01           ` Ludovic Courtès
  1 sibling, 1 reply; 10+ messages in thread
From: Paul Eggert @ 2015-02-23 22:15 UTC (permalink / raw)
  To: Ludovic Courtès, mhw, 19933; +Cc: guix-devel, Andreas Enge

On 02/23/2015 01:28 PM, Ludovic Courtès wrote:
> I suspect this isn’t needed.

This is needed so that 'ls -l' can output a date format suitable for the 
current locale.  These formats aren't part of glibc and so are not in 
glibc's LC_TIME information.  The default formats for the C locale are 
"%b %e  %Y" for older files and "%b %e %H:%M" for newer files, but the 
formats differ in other locales (e.g., Dutch uses "%e %b" instead of "%b 
%e").

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

* Re: bug#19933: LC_TIME category in Coreutils
  2015-02-23 22:15         ` bug#19933: " Paul Eggert
@ 2015-02-24 23:01           ` Ludovic Courtès
  0 siblings, 0 replies; 10+ messages in thread
From: Ludovic Courtès @ 2015-02-24 23:01 UTC (permalink / raw)
  To: Paul Eggert; +Cc: guix-devel, 19933

Paul Eggert <eggert@cs.ucla.edu> skribis:

> On 02/23/2015 01:28 PM, Ludovic Courtès wrote:
>> I suspect this isn’t needed.
>
> This is needed so that 'ls -l' can output a date format suitable for
> the current locale.  These formats aren't part of glibc and so are not
> in glibc's LC_TIME information.  The default formats for the C locale
> are "%b %e  %Y" for older files and "%b %e %H:%M" for newer files, but
> the formats differ in other locales (e.g., Dutch uses "%e %b" instead
> of "%b %e").

I see, thanks for the explanation.

Ludo’.

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

* Re: LC_TIME category in Coreutils
  2015-02-23 22:01         ` bug#19933: " Andreas Schwab
@ 2015-02-24 23:07           ` Ludovic Courtès
  0 siblings, 0 replies; 10+ messages in thread
From: Ludovic Courtès @ 2015-02-24 23:07 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: guix-devel, bug-coreutils

Andreas Schwab <schwab@linux-m68k.org> skribis:

> ludo@gnu.org (Ludovic Courtès) writes:
>
>> Mark H Weaver <mhw@netris.org> skribis:
>>
>>> I tried adding 'glibc-locales' to my system profile, and got this:
>>>
>>> ERROR: union-build: collision between file and directories ((files ("/gnu/store/nda1ih2iy8likfipl62afiqs6jwdsfxi-glibc-locales-2.20/share/locale/zh_CN/LC_TIME")) (dirs ("/gnu/store/mgfqcbm31rh738z13xlwh9ld9dm2vfvz-coreutils-8.23/share/locale/zh_CN/LC_TIME")))
>>>
>>> Indeed, in coreutils "share/locale/zh_CN/LC_TIME" is a directory
>>> containing a symbolic link "coreutils.mo" pointing to
>>> "../LC_MESSAGES/coreutils.mo", whereas in glibc-locales
>>> "share/locale/zh_CN/LC_TIME" is a binary file.
>>>
>>> Any ideas how to resolve this conflict?
>>
>> I would have expected packages other than libc to provide only
>> LC_MESSAGES, so I didn’t think such collisions could happen.
>
> glibc's locale files are supposed to reside in $(libdir)/locale, not
> $(datadir)/locale, so there is no conflict.

Oops, indeed (I had been using a custom value for ‘libc_cv_localedir’
and overlooked what the default value is.)

Thank you,
Ludo’.

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

end of thread, other threads:[~2015-02-24 23:07 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-10 18:06 Locales not working Andreas Enge
2015-02-10 18:30 ` Andreas Enge
2015-02-11 20:39   ` Ludovic Courtès
2015-02-12 17:38     ` Andreas Enge
2015-02-15  0:52     ` Mark H Weaver
2015-02-23 21:28       ` LC_TIME category in Coreutils Ludovic Courtès
2015-02-23 22:01         ` bug#19933: " Andreas Schwab
2015-02-24 23:07           ` Ludovic Courtès
2015-02-23 22:15         ` bug#19933: " Paul Eggert
2015-02-24 23:01           ` 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).