all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* warning: failed to install locale
@ 2019-01-16 18:11 Giovanni Biscuolo
  2019-01-17 13:31 ` zimoun
  2019-01-17 13:39 ` Ricardo Wurmus
  0 siblings, 2 replies; 12+ messages in thread
From: Giovanni Biscuolo @ 2019-01-16 18:11 UTC (permalink / raw)
  To: help-guix

[-- Attachment #1: Type: text/plain, Size: 2038 bytes --]

Hi!

I've installed Guix on a foreign distro (Debian 9) using the shell
installer script [1] linked in "Binary Installation" (and skipped
"manual verification" of each step)

I've also followed "Application setup", in particular for locales:

--8<---------------cut here---------------start------------->8---
$ guix package -I
nss-certs	3.39	out	/gnu/store/xbj4fhad0lnz0ziflwi90gyqbls8ains-nss-certs-3.39
glibc-utf8-locales	2.28	out	/gnu/store/94k5w17z54w25lgp90czdqfv9m4hwzhq-glibc-utf8-locales-2.28
--8<---------------cut here---------------end--------------->8---

and

--8<---------------cut here---------------start------------->8---
(anemone)g@anemone:~$ echo $GUIX_LOCPATH
/localhome/g/.guix-profile/lib/locale
--8<---------------cut here---------------end--------------->8---

but every time I try to run "guix build" I get the following message:

--8<---------------cut here---------------start------------->8---
$ guix build emacs --dry-run
substitute: guile: warning: failed to install locale
substitute: hint: Consider installing the `glibc-utf8-locales' or `glibc-locales' package and
substitute: defining `GUIX_LOCPATH', along these lines:
substitute: 
substitute:      guix package -i glibc-utf8-locales
substitute:      export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale"
substitute: 
substitute: See the "Application Setup" section in the manual, for more info.
substitute: 
substitute: 
117.1 MB would be downloaded:
   /gnu/store/fmsy4bddn5r3wdjsy0j0fn2vwzfsrkrx-emacs-26.1
   /gnu/store/13i02w6r4awyb5d4n8plk8m0idvryib0-cairo-1.14.12
   /gnu/store/2b6yzhsgqbmljh35j30x26n5lcl3a43y-gdk-pixbuf-2.38.0
   [...]
--8<---------------cut here---------------end--------------->8---
   
am I doing something wrong?

thanks,
Giovanni



[1] slightly hacked since I'm using a /gnu directory previuosly created
on LVM and mounted via fstab, we should consider this sort of use-cases
(I'll propose a patch later this week)

-- 
Giovanni Biscuolo

Xelera IT Infrastructures

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

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

* Re: warning: failed to install locale
  2019-01-16 18:11 warning: failed to install locale Giovanni Biscuolo
@ 2019-01-17 13:31 ` zimoun
  2019-01-17 13:39 ` Ricardo Wurmus
  1 sibling, 0 replies; 12+ messages in thread
From: zimoun @ 2019-01-17 13:31 UTC (permalink / raw)
  To: Giovanni Biscuolo; +Cc: help-guix

Dear,

If you are doing something wrong, I am doing the same. ;-)

I have the same issue on foreign distro, also Debian.
The hint fixes the warning for "regular" commands.
But the warning seems remaining when substitute is called. Any clue?


All the best,
simon

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

* Re: warning: failed to install locale
  2019-01-16 18:11 warning: failed to install locale Giovanni Biscuolo
  2019-01-17 13:31 ` zimoun
@ 2019-01-17 13:39 ` Ricardo Wurmus
  2019-01-17 14:18   ` zimoun
  1 sibling, 1 reply; 12+ messages in thread
From: Ricardo Wurmus @ 2019-01-17 13:39 UTC (permalink / raw)
  To: Giovanni Biscuolo; +Cc: help-guix


Hi Giovanni,

> substitute: guile: warning: failed to install locale
> substitute: hint: Consider installing the `glibc-utf8-locales' or `glibc-locales' package and
> substitute: defining `GUIX_LOCPATH', along these lines:
> substitute:
> substitute:      guix package -i glibc-utf8-locales
> substitute:      export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale"
> substitute:
> substitute: See the "Application Setup" section in the manual, for more info.
> substitute:
> substitute:

This tells us that environment within the context of the “substitute”
executable is not correct.  You need to make sure that the daemon’s
environment is correct, i.e. that GUIX_LOCPATH points to a profile that
contains a glibc-utf8-locales package that matches the version of the
glibc that’s in use for the daemon.

--
Ricardo

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

* Re: warning: failed to install locale
  2019-01-17 13:39 ` Ricardo Wurmus
@ 2019-01-17 14:18   ` zimoun
  2019-01-17 14:24     ` Ricardo Wurmus
  0 siblings, 1 reply; 12+ messages in thread
From: zimoun @ 2019-01-17 14:18 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: help-guix

Dear Ricardo,

Thank you for the explanations.


> > substitute: guile: warning: failed to install locale
> > substitute: hint: Consider installing the `glibc-utf8-locales' or `glibc-locales' package and
> > substitute: defining `GUIX_LOCPATH', along these lines:
> > substitute:
> > substitute:      guix package -i glibc-utf8-locales
> > substitute:      export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale"
> > substitute:
> > substitute: See the "Application Setup" section in the manual, for more info.
> > substitute:
> > substitute:
>
> This tells us that environment within the context of the “substitute”
> executable is not correct.  You need to make sure that the daemon’s
> environment is correct, i.e. that GUIX_LOCPATH points to a profile that
> contains a glibc-utf8-locales package that matches the version of the
> glibc that’s in use for the daemon.


Maybe I am doing wrong.

$ ldd /var/guix/profiles/per-user/root/current-guix/bin/guix-daemon
[...]
libc.so.6 => /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/lib/libc.so.6


So the version is 2.28, right?
Then my profile contains the version 2.28 of the locale, I guess.

$ echo $GUIX_LOCPATH
/home/simon/.guix-profile/lib/locale
$ ls `echo $GUIX_LOCPATH`
2.28

Is not correct?

I also tried to restart the daemon, in case. :-)
Because the machine should be turned on with the daemon linked to one
glibc. Then `guix pull' and `guix package -i glibc-locales' does not
necessary install the correct version, I guess.
I mean, does `guix pull' restart the daemon?


All the best,
simon

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

* Re: warning: failed to install locale
  2019-01-17 14:18   ` zimoun
@ 2019-01-17 14:24     ` Ricardo Wurmus
  2019-01-17 16:27       ` zimoun
                         ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Ricardo Wurmus @ 2019-01-17 14:24 UTC (permalink / raw)
  To: zimoun; +Cc: help-guix


Hi simon,

> Maybe I am doing wrong.
>
> $ ldd /var/guix/profiles/per-user/root/current-guix/bin/guix-daemon
> [...]
> libc.so.6 => /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/lib/libc.so.6
>
>
> So the version is 2.28, right?
> Then my profile contains the version 2.28 of the locale, I guess.
>
> $ echo $GUIX_LOCPATH
> /home/simon/.guix-profile/lib/locale
> $ ls `echo $GUIX_LOCPATH`
> 2.28

This is in your environment.  But what about the daemon’s environment?
It is not started in your environment where GUIX_LOCPATH is set.  How do
you start the daemon?  If it’s via systemd you may want to look at the
service file to see where GUIX_LOCPATH points.

> I mean, does `guix pull' restart the daemon?

No, it only installs a new version of Guix in $HOME/.config/guix/

--
Ricardo

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

* Re: warning: failed to install locale
  2019-01-17 14:24     ` Ricardo Wurmus
@ 2019-01-17 16:27       ` zimoun
  2019-01-17 20:56       ` Quiliro Ordonez
  2019-01-18 10:35       ` Giovanni Biscuolo
  2 siblings, 0 replies; 12+ messages in thread
From: zimoun @ 2019-01-17 16:27 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: help-guix

Hi Ricardo,


> This is in your environment.  But what about the daemon’s environment?
> It is not started in your environment where GUIX_LOCPATH is set.  How do
> you start the daemon?  If it’s via systemd you may want to look at the
> service file to see where GUIX_LOCPATH points.

Thank you.
I got it.

Now, it is clear. :-)

All the best,
simon

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

* Re: warning: failed to install locale
  2019-01-17 14:24     ` Ricardo Wurmus
  2019-01-17 16:27       ` zimoun
@ 2019-01-17 20:56       ` Quiliro Ordonez
  2019-01-17 21:05         ` Edouard KLEIN
  2019-01-18 10:13         ` zimoun
  2019-01-18 10:35       ` Giovanni Biscuolo
  2 siblings, 2 replies; 12+ messages in thread
From: Quiliro Ordonez @ 2019-01-17 20:56 UTC (permalink / raw)
  To: help-guix

Thank you for this straightforward answer Ricardo. I post some insights
below.

El 2019-01-17 09:24, Ricardo Wurmus escribió:
> This is in your environment.  But what about the daemon’s environment?
> It is not started in your environment where GUIX_LOCPATH is set.  How do
> you start the daemon?  If it’s via systemd you may want to look at the
> service file to see where GUIX_LOCPATH points.

In fact:
echo $GUIX_LOCPATH
gives no output as root (which runs the Guix daemon, presumably).

Where is the service file supposed to be and how to include GUIX_LOCPATH
in it?

I also ran the script to install Guix. Perhaps this script should do all
the setup.

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

* Re: warning: failed to install locale
  2019-01-17 20:56       ` Quiliro Ordonez
@ 2019-01-17 21:05         ` Edouard KLEIN
  2019-01-18 10:13         ` zimoun
  1 sibling, 0 replies; 12+ messages in thread
From: Edouard KLEIN @ 2019-01-17 21:05 UTC (permalink / raw)
  To: quiliro; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 983 bytes --]

I had the same problem, which was solved by installing glibc-utf8-locales
in root's profile and adding the export line to root's ~/.profile, which
fits Ricardo's explanations.

Le jeu. 17 janv. 2019 à 21:56, Quiliro Ordonez <quiliro@riseup.net> a
écrit :

> Thank you for this straightforward answer Ricardo. I post some insights
> below.
>
> El 2019-01-17 09:24, Ricardo Wurmus escribió:
> > This is in your environment.  But what about the daemon’s environment?
> > It is not started in your environment where GUIX_LOCPATH is set.  How do
> > you start the daemon?  If it’s via systemd you may want to look at the
> > service file to see where GUIX_LOCPATH points.
>
> In fact:
> echo $GUIX_LOCPATH
> gives no output as root (which runs the Guix daemon, presumably).
>
> Where is the service file supposed to be and how to include GUIX_LOCPATH
> in it?
>
> I also ran the script to install Guix. Perhaps this script should do all
> the setup.
>
>

[-- Attachment #2: Type: text/html, Size: 1269 bytes --]

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

* Re: warning: failed to install locale
  2019-01-17 20:56       ` Quiliro Ordonez
  2019-01-17 21:05         ` Edouard KLEIN
@ 2019-01-18 10:13         ` zimoun
  2019-01-18 15:51           ` Quiliro Ordonez
  1 sibling, 1 reply; 12+ messages in thread
From: zimoun @ 2019-01-18 10:13 UTC (permalink / raw)
  To: quiliro; +Cc: help-guix

Dear,


> echo $GUIX_LOCPATH
> gives no output as root (which runs the Guix daemon, presumably).

If I understand well, this should be expected. :-)

The $GUIX_LOCPATH in the root `env' is not necessary related to the
$GUIX_LOCPATH is the daemon `env'.


Well, if you run systemd, then the variable is defined in, say:

grep GUIX_LOCPATH /etc/systemd/system/guix-daemon.service

There you see where the GUIX_LOCPATH used by the daemon points to.
By default, the profile should be:
/var/guix/profiles/per-user/root/guix-profile/lib/locale

Therefore, if you install as root the glibc-utf8-locales, then it
should work. As Edouard said.

However, note that glibc-utf8-locales only contains the locales:
("de_DE" "el_GR" "en_US" "fr_FR" "tr_TR")

If the daemon is configured with another locale, then the simplest is
to install glibc-locales.
If your bandwidth is limited, be patient ;-) Or build a variant of
glibc-ut8-locales with your required locale.


If you run Upstart, it should be similar.

Hope that help.


All the best,
simon

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

* Re: warning: failed to install locale
  2019-01-17 14:24     ` Ricardo Wurmus
  2019-01-17 16:27       ` zimoun
  2019-01-17 20:56       ` Quiliro Ordonez
@ 2019-01-18 10:35       ` Giovanni Biscuolo
  2019-01-18 10:59         ` zimoun
  2 siblings, 1 reply; 12+ messages in thread
From: Giovanni Biscuolo @ 2019-01-18 10:35 UTC (permalink / raw)
  To: Ricardo Wurmus, zimoun; +Cc: guix-devel, help-guix

[-- Attachment #1: Type: text/plain, Size: 1659 bytes --]

Hi Ricardo,

Ricardo Wurmus <rekado@elephly.net> writes:

[...]

> This is in your environment.  But what about the daemon’s environment?
> It is not started in your environment where GUIX_LOCPATH is set.  How do
> you start the daemon?  If it’s via systemd you may want to look at the
> service file to see where GUIX_LOCPATH points.

OK now I understand too, thanks!

yes, Debian starts daemons via systemd and this issue is easily fixed by
installing glibc-utf8-locales in the guix default root profile:

  sudo -i
  guix package -i glibc-utf8-locales
  sudo systemctl restart guix-daemon.service

after doing so, when I "guix build emacs --dry-run" the warning I
reported disappeared

I think a similar approach should resolve similar issues with other init
systems

since I used the binary install script [1] I think we should easily
patch that so that it also "guix package -i glibc-utf8-locales" for lazy
users like me :-)

I'm going to test the binary install script on a brend new Debian 9 lxc
container since I found other possible improvements

this is also not clearly stated in
https://www.gnu.org/software/guix/manual/en/html_node/Application-Setup.html#Locales-1
do it need to be fixed?

AFAIU adding "export GUIX_LOCPATH=$HOME/.guix-profile/lib/locale" to
root's .profile or .bash_profile is not strictly needed (unless you want
to install and run packages as root user), so I'd _not_ automate this
via the binary install script or document this

Thanks!
Giovanni

[1] https://git.savannah.gnu.org/cgit/guix.git/plain/etc/guix-install.sh

-- 
Giovanni Biscuolo

Xelera IT Infrastructures

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

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

* Re: warning: failed to install locale
  2019-01-18 10:35       ` Giovanni Biscuolo
@ 2019-01-18 10:59         ` zimoun
  0 siblings, 0 replies; 12+ messages in thread
From: zimoun @ 2019-01-18 10:59 UTC (permalink / raw)
  To: Giovanni Biscuolo; +Cc: help-guix

Dear Giovanni,


> since I used the binary install script [1] I think we should easily
> patch that so that it also "guix package -i glibc-utf8-locales" for lazy
> users like me :-)

It should be: "guix package -i glibc-locales".
Because glibc-utf8-locales only contains the locales ("de_DE" "el_GR"
"en_US" "fr_FR" "tr_TR"). If I understand well.

To patch correctly, the locale should be guessed by the script and the
variant glibc-LOC-locales should be built on-the-fly and installed.
It is some work and I am not sure it will pay off. :-)


> this is also not clearly stated in
> https://www.gnu.org/software/guix/manual/en/html_node/Application-Setup.html#Locales-1
> do it need to be fixed?

From my opinion, yes. :-)



All the best,
simon

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

* Re: warning: failed to install locale
  2019-01-18 10:13         ` zimoun
@ 2019-01-18 15:51           ` Quiliro Ordonez
  0 siblings, 0 replies; 12+ messages in thread
From: Quiliro Ordonez @ 2019-01-18 15:51 UTC (permalink / raw)
  To: help-guix

El 2019-01-18 05:13, zimoun escribió:
> Hope that help.

This was very helpful. Thank you.

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

end of thread, other threads:[~2019-01-18 15:51 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-16 18:11 warning: failed to install locale Giovanni Biscuolo
2019-01-17 13:31 ` zimoun
2019-01-17 13:39 ` Ricardo Wurmus
2019-01-17 14:18   ` zimoun
2019-01-17 14:24     ` Ricardo Wurmus
2019-01-17 16:27       ` zimoun
2019-01-17 20:56       ` Quiliro Ordonez
2019-01-17 21:05         ` Edouard KLEIN
2019-01-18 10:13         ` zimoun
2019-01-18 15:51           ` Quiliro Ordonez
2019-01-18 10:35       ` Giovanni Biscuolo
2019-01-18 10:59         ` zimoun

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.