FS#15388 - setlocale: LC_ALL: cannot change locale

Attached to Project: Arch Linux
Opened by Michal (broch) - Sunday, 05 July 2009, 18:19 GMT
Last edited by Roman Kyrylych (Romashka) - Monday, 06 July 2009, 09:58 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture i686
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
since updates of last week, each time when loading firewall, I am getting the following error:
LC_ALL: cannot change locale (US) no such file or directory
line 812: warning: setlocale: LC_ALL: cannot change locale (US)
line 884: warning: setlocale: LC_ALL: cannot change locale (US)
line 928: warning: setlocale: LC_ALL: cannot change locale (US)

Similar problem with locale was reported here:
http://bbs.archlinux.org/viewtopic.php?pid=580128#p580128
Additional info:
* package version(s)
this is i686 system updated on 07-05-09

* config and/or log files etc.


Steps to reproduce:
in my case, each time when I boot system ore restart firewall
This task depends upon

Closed by  Roman Kyrylych (Romashka)
Monday, 06 July 2009, 09:58 GMT
Reason for closing:  Not a bug
Comment by Roman Kyrylych (Romashka) - Sunday, 05 July 2009, 18:42 GMT
what's your LOCALE in rc.conf?
Comment by Jan de Groot (JGC) - Sunday, 05 July 2009, 19:11 GMT
"US" is not a valid locale, and will never become a valid one either. You will have to enable the wanted locale in /etc/locale.gen, run locale-gen and then pick one from the "locale -a" output.
Comment by Michal (broch) - Sunday, 05 July 2009, 20:30 GMT
""US" is not a valid locale, and will never become a valid one either."
I know that US is not valid locale. I doubt that error is about that, as we have two (or more) different english locales, error refers to US settings (US part in en_US.utf8).

anyway:
what's your LOCALE in rc.conf?
cat /etc/rc.conf | grep LOCALE
# LOCALE: available languages can be listed with the 'locale -a' command
LOCALE="en_US.utf8"

"run locale-gen and then pick one from the "locale -a" output."
done three years ago and working correctly until now:
locale -a | grep US
en_US.utf8

I just have run this again and it did not change anything
Comment by Roman Kyrylych (Romashka) - Sunday, 05 July 2009, 21:06 GMT
what is output of `locale` then?
Comment by Michal (broch) - Sunday, 05 July 2009, 21:29 GMT
locale
LANG=en_US.utf8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=en_US.UTF-8
Comment by Jan de Groot (JGC) - Sunday, 05 July 2009, 21:32 GMT
This is what gdm sets up for me when I select US english:
LANG=en_US.utf8
LC_CTYPE="en_US.utf8"
LC_NUMERIC="en_US.utf8"
LC_TIME="en_US.utf8"
LC_COLLATE=C
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=

Looks like the UTF-8 things should be changed to utf8, just like you did in the LANG variable.
Comment by Roman Kyrylych (Romashka) - Sunday, 05 July 2009, 22:16 GMT
@Michal:
I'm pretty sure that LC_* (except LC_COLLATE which is set to C in /etc/profile) are not set explicitly anywhere by default.
They are set automagically when LANG is set (which is done in /etc/profile.d/locale.sh which is generated from rc.sysinit).
So my question is: where do you set LC_ALL (or other LC_* vars) and why?
Comment by Michal (broch) - Sunday, 05 July 2009, 22:48 GMT
well because I have locale problem, I did try to force locale by exporting it (export LC_ALL="en_US.UTF-8"
export LANG="en_US.UTF-8") shutting down and then loading firewall. Obviously I made an error: it should be export LC_ALL="en_US.utf8"


by default this is what I am getting (after rebooting system a minute ago):
locale
LANG=en_US.utf8
LC_CTYPE="en_US.utf8"
LC_NUMERIC="en_US.utf8"
LC_TIME="en_US.utf8"
LC_COLLATE=C
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 error is still there
Comment by Roman Kyrylych (Romashka) - Sunday, 05 July 2009, 23:27 GMT
what firewall are you talking about? is it some 3rd party script?
Comment by Michal (broch) - Monday, 06 July 2009, 00:19 GMT
thank you for trying help.

I am using Guarddog (AUR).
Comment by Roman Kyrylych (Romashka) - Monday, 06 July 2009, 01:13 GMT
If you do not experience the same problem with any other package, then the problem is with that package only.
Try to rebuild it.
Comment by Jan de Groot (JGC) - Monday, 06 July 2009, 06:45 GMT
It's a bug in guarddog, it creates a script with these lines:
"LANG=US\n"
"LC_ALL=US\n"
"export LANG\n"
"export LC_ALL\n"

found that in src/guarddogdoc.cpp

As said, "US" is not a valid locale. Maybe on Windows, but not on linux or any other Unix-like system.
Comment by Roman Kyrylych (Romashka) - Monday, 06 July 2009, 09:57 GMT
thanks, Jan

@Michal: please report this to guarddog developers.
You can also report this in Community Packages project of our bugtracker, so maintainer will be aware of this and may patch it until upstream devs fix it.

Loading...