Re: Locale error: Falling back to C locale

2018-03-30 Thread Pierre Neidhardt

Ricardo Wurmus  writes:

> Pierre Neidhardt  writes:
>
>> The problem is gone for Emacs (hurray!) but not for stow.
>>
>> What does it mean?  That glibc _must_ be installed on all user profiles?
>
> Certainly not.  I’ve never installed glibc into any profile.  glibc is
> linked with programs.

So why did it fix it for Emacs?

> Have you upgraded stow?  If not, it’s possible that it is linked with an
> older version of glibc and thus cannot use the glibc-utf8-locales for
> glibc 2.26 that you have installed.

Upgrading did the trick.

If I get it right, updating glibc or the locales does not trigger an
upgrade of all packages that were built with older versions, hence the
issue.

Should Guix packages depend on glibc so that an upgrade of glibc
upgrades all glibc-dependent packages?

--
Pierre Neidhardt


signature.asc
Description: PGP signature


Re: Locale error: Falling back to C locale

2018-03-29 Thread Pierre Neidhardt

Ricardo Wurmus  writes:

> Pierre Neidhardt  writes:
>
>> Glibc was not installed, but installing it pulls 3 packages:
>>
>>  > guix build glibc
>>  
>> /gnu/store/2kjscn5i1zjq2h3j0dcwfnzmc69lajz1-glibc-2.26.105-g0890d5379c-debug
>>  /gnu/store/9j55362h2xgndjgy45f6283spjjx5990-glibc-2.26.105-g0890d5379c
>>  
>> /gnu/store/zpy7n3jjlgnq55lhzkdixf3dvk25vhlj-glibc-2.26.105-g0890d5379c-static
>>
>> Interestingly, `bin/locale` does not end up in the user PATH.
>
> That’s expected.  “guix build” doesn’t install anything and so the
> executables of built packages don’t automatically end up in PATH.
> That’s by design.

Duh!  That was so obvious, I completely forgot I wasn't "installing" :p

The problem is gone for Emacs (hurray!) but not for stow.

What does it mean?  That glibc _must_ be installed on all user profiles?

-- 
Pierre Neidhardt


signature.asc
Description: PGP signature


Re: Locale error: Falling back to C locale

2018-03-29 Thread Ricardo Wurmus

Pierre Neidhardt  writes:

> Glibc was not installed, but installing it pulls 3 packages:
>
>   > guix build glibc
>   
> /gnu/store/2kjscn5i1zjq2h3j0dcwfnzmc69lajz1-glibc-2.26.105-g0890d5379c-debug
>   /gnu/store/9j55362h2xgndjgy45f6283spjjx5990-glibc-2.26.105-g0890d5379c
>   
> /gnu/store/zpy7n3jjlgnq55lhzkdixf3dvk25vhlj-glibc-2.26.105-g0890d5379c-static
>
> Interestingly, `bin/locale` does not end up in the user PATH.

That’s expected.  “guix build” doesn’t install anything and so the
executables of built packages don’t automatically end up in PATH.
That’s by design.

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net





Re: Locale error: Falling back to C locale

2018-03-29 Thread Pierre Neidhardt

Marius Bakke  writes:

> Pierre Neidhardt  writes:
>
>> Marius Bakke  writes:
>>
>>> Can you post the output of these commands in a terminal:
>>>
>>> $ locale
>>
>> locale: command not found
>
> Try: "$(guix build glibc)/bin/locale" instead.

Glibc was not installed, but installing it pulls 3 packages:

> guix build glibc

/gnu/store/2kjscn5i1zjq2h3j0dcwfnzmc69lajz1-glibc-2.26.105-g0890d5379c-debug
/gnu/store/9j55362h2xgndjgy45f6283spjjx5990-glibc-2.26.105-g0890d5379c

/gnu/store/zpy7n3jjlgnq55lhzkdixf3dvk25vhlj-glibc-2.26.105-g0890d5379c-static

Interestingly, `bin/locale` does not end up in the user PATH.

> 
/gnu/store/9j55362h2xgndjgy45f6283spjjx5990-glibc-2.26.105-g0890d5379c/bin/locale
 
LANG=en_US.utf8
LC_CTYPE="en_US.utf8"
LC_NUMERIC="en_US.utf8"
LC_TIME="en_US.utf8"
LC_COLLATE="en_US.utf8"
LC_MONETARY="en_US.utf8"
LC_MESSAGES="en_US.utf8"
LC_PAPER="en_US.utf8"
LC_NAME="en_US.utf8"
LC_ADDRESS="en_US.utf8"
LC_TELEPHONE="en_US.utf8"
LC_MEASUREMENT="en_US.utf8"
LC_IDENTIFICATION="en_US.utf8"
LC_ALL=

> And then `ls -l /run/current-system/locale/2.26/`.

> ls -l /run/current-system/locale/2.26/
total 136
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 ca_ES.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 cs_CZ.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 da_DK.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 de_DE.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 el_GR.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 en_AU.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 en_CA.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 en_GB.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 en_US.UTF-8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 en_US.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 es_AR.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 es_CL.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 es_ES.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 es_MX.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 fi_FI.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 fr_BE.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 fr_CA.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 fr_CH.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 fr_FR.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 ga_IE.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 it_IT.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 ja_JP.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 ko_KR.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 nb_NO.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 nl_NL.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 pl_PL.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 pt_PT.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 ro_RO.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 ru_RU.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 sv_SE.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 tr_TR.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 uk_UA.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 vi_VN.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 zh_CN.utf8

-- 
Pierre Neidhardt


signature.asc
Description: PGP signature


Re: Locale error: Falling back to C locale

2018-03-29 Thread Marius Bakke
Pierre Neidhardt  writes:

> Marius Bakke  writes:
>
>> Can you post the output of these commands in a terminal:
>>
>> $ locale
>
> locale: command not found

Try: "$(guix build glibc)/bin/locale" instead.

And then `ls -l /run/current-system/locale/2.26/`.


signature.asc
Description: PGP signature


Re: Locale error: Falling back to C locale

2018-03-29 Thread Pierre Neidhardt

Marius Bakke  writes:

> Can you post the output of these commands in a terminal:
>
> $ locale

locale: command not found

> $ env | grep LOCPATH

GUIX_LOCPATH=/run/current-system/locale


> $ ls -l /run/current-system/locale/

total 4
dr-xr-xr-x  36 root   root 4096 1970-01-01  1970 2.26

-- 
Pierre Neidhardt


signature.asc
Description: PGP signature


Re: Locale error: Falling back to C locale

2018-03-29 Thread Marius Bakke
Pierre Neidhardt  writes:

> Marius Bakke  writes:
>
>> Pierre Neidhardt  writes:
>>
 guix package -I local
>>> glibc-utf8-locales  2.26.105-g0890d5379cout 
>>> /gnu/store/3k6hl20c3b7big8ngrsl6mj9k8xav99d-glibc-utf8-locales-2.26.105-g0890d5379c
>>>
 guix package -I emacs
>>> emacs   25.3out 
>>> /gnu/store/y335nx4r08m6kg0yrna7spfwr4s05n36-emacs-25.3
>>>
>>> How do I check which glibc Emacs is using?
>>> I can think of `ldd emacs` but... Where is ldd? :p
>>
>> "ldd" is in "glibc" :-)
>>
>> You can also use `guix gc -R /gnu/store/...-emacs-25.3 | grep glibc`.
>
> Here:
>
>   > guix gc -R ${guix build emacs} | grep glibc
>   /gnu/store/4sqaib7c2dfjv62ivrg9b8wa7bh226la-glibc-2.26.105-g0890d5379c

This looks good.  Let's rewind for a bit.  The original error message
was:


> stow .
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_US.utf8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

> emacs
(process:7796): Gtk-WARNING **: Locale not supported by C library.
Using the fallback 'C' locale.

Can you post the output of these commands in a terminal:

$ locale
$ env | grep LOCPATH
$ ls -l /run/current-system/locale/


signature.asc
Description: PGP signature


Re: Locale error: Falling back to C locale

2018-03-28 Thread Pierre Neidhardt

Marius Bakke  writes:

> Pierre Neidhardt  writes:
>
>>> guix package -I local
>> glibc-utf8-locales   2.26.105-g0890d5379cout 
>> /gnu/store/3k6hl20c3b7big8ngrsl6mj9k8xav99d-glibc-utf8-locales-2.26.105-g0890d5379c
>>
>>> guix package -I emacs
>> emacs25.3out 
>> /gnu/store/y335nx4r08m6kg0yrna7spfwr4s05n36-emacs-25.3
>>
>> How do I check which glibc Emacs is using?
>> I can think of `ldd emacs` but... Where is ldd? :p
>
> "ldd" is in "glibc" :-)
>
> You can also use `guix gc -R /gnu/store/...-emacs-25.3 | grep glibc`.

Here:

> guix gc -R ${guix build emacs} | grep glibc
/gnu/store/4sqaib7c2dfjv62ivrg9b8wa7bh226la-glibc-2.26.105-g0890d5379c

>> A more general question: How do I find to which non-installed package a
>> filename belongs?
>
> Guix does not currently know anything about the files inside each
> package, I typically do a web search...

This is too bad, I believe it's an important feature for any package
manager.
As far as I can tell, `portage` and `pacman` can both do it.

Any plan regarding guix?

>> If Emacs happens to be using glibc 2.25, how could such a sitution occur
>> in the first place?  Why is glibc 2.25 needed at all?
>
> This situation can occur when you've installed emacs built against glibc
> 2.25 (which was the glibc in Guix until ~February), and then later
> updated "glibc-utf8-locales" to 2.26 which has incompatible locale data.
>
> Updating emacs would fix it in that case, since it would be built
> against the new glibc.

Running `guix package -u emacs` does nothing special, possibly because
it's already up to date.  Can I force a rebuild?

-- 
Pierre Neidhardt


signature.asc
Description: PGP signature


Re: Locale error: Falling back to C locale

2018-03-28 Thread Marius Bakke
Pierre Neidhardt  writes:

>> guix package -I local
> glibc-utf8-locales2.26.105-g0890d5379cout 
> /gnu/store/3k6hl20c3b7big8ngrsl6mj9k8xav99d-glibc-utf8-locales-2.26.105-g0890d5379c
>
>> guix package -I emacs
> emacs 25.3out /gnu/store/y335nx4r08m6kg0yrna7spfwr4s05n36-emacs-25.3
>
> How do I check which glibc Emacs is using?
> I can think of `ldd emacs` but... Where is ldd? :p

"ldd" is in "glibc" :-)

You can also use `guix gc -R /gnu/store/...-emacs-25.3 | grep glibc`.

> A more general question: How do I find to which non-installed package a
> filename belongs?

Guix does not currently know anything about the files inside each
package, I typically do a web search...

> If Emacs happens to be using glibc 2.25, how could such a sitution occur
> in the first place?  Why is glibc 2.25 needed at all?

This situation can occur when you've installed emacs built against glibc
2.25 (which was the glibc in Guix until ~February), and then later
updated "glibc-utf8-locales" to 2.26 which has incompatible locale data.

Updating emacs would fix it in that case, since it would be built
against the new glibc.

On GuixSD, you can use the 'locale-libc' operating-system parameter to
install locale data for multiple glibc versions to ease transition
between glibc updates.


signature.asc
Description: PGP signature


Re: Locale error: Falling back to C locale

2018-03-27 Thread Ludovic Courtès
Pierre Neidhardt  skribis:

> Some applications complain about the locale:
>
>   > stow .
>   perl: warning: Setting locale failed.
>   perl: warning: Please check that your locale settings:
>   LANGUAGE = (unset),
>   LC_ALL = (unset),
>   LANG = "en_US.utf8"
>   are supported and installed on your system.
>   perl: warning: Falling back to the standard locale ("C").
>
>   > emacs
>   (process:7796): Gtk-WARNING **: Locale not supported by C library.
>   Using the fallback 'C' locale.
>
> Both emacs and stow still work properly but I wonder where this comes
> from.  Did I miss something during the install?

On GuixSD this should work fine out of the box.  On other distros,
please take a look at
.

HTH!

Ludo’.