[SOLVED] Warnings about locale - I want to understand...
Linux From ScratchThis Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have build lfs several times, and every time I get 'bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)'. I started a new build of chapter 6 yesterday, shutdown my computer at night, and when I re-entered the chroot today I got this warning. Last package I build yesterday was gcc. I didn't see this warning yesterday.
I have googled, and there are lots and lots of hits with this warning as title. Most of them says one should generate the language with whatever tool the distro has, and then put it in /etc/profile. I have done that. Some said it disappeared after reboot.
I have seen this so many times now, and I want to understand what it is about. Every time so far it's gone away by itself, I think after booting up the new system. Is there a way to get rid of the warnings before that? What happens at boot that makes it go away?
Code:
(chroot) root:/# locale -a
C
en_US
en_US.iso88591
en_US.utf8
POSIX
sv_SE
sv_SE.iso88591
sv_SE.utf8
Code:
(chroot) root:/# cat /etc/profile
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
umask 022
#export PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin"
#export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/share/pkgconfig
for script in /etc/profile.d/*.sh ; do
if [ -r $script ] ; then
. $script
fi
done
Edit: And after finishing lfs and rebooting - it booted up nicely -, back to chroot to start with blfs, and the warnings are again mysteriously gone... But I still want to know what this is about.
$ ls /usr/share/locale
af de et ia locale.alias pt sr@latin
ar de_AT eu id lt pt_BR sv
ast de.us-ascii fa is lv pt_BR.us-ascii th
az dz fi it ms pt.us-ascii tl
be el fr ja nb ro tr
bg en@boldquot fr.us-ascii ka ne ru uk
bs en_GB ga kk nl rw vi
ca en@quot gl km nn sk wa
crh eo he ko no.us-ascii sl zh_CN
cs es hr ky pa sq zh_HK
da es.us-ascii hu lg pl sr zh_TW
Last time I did LFS, it didn't have UTF-8 so I really don't know what's up. I don't see any utf-8 locales. That's the sort of thing you'll sort quickly by searching the LFS mail archives. You apparently have enough locales made, which is really what I was checking. I would go straight to the glibc page and read it again, then search the archives
I guess you mean one should avoid using utf, as the book also said. I tried 'en_US.iso88591', but then some of the special characters didn't show correctly. I tried it both for console and X, and none of them worked. So far I haven't had any problem with utf.
I didn't find any hint about it, I searched for it in the hints page.
I did LFS a while back, 2000 - 2003 or so. Back then, LFS was not utf8 compliant. The issue was that there were patches needed which maintainers were not accepting for various programs to go unicode and so the thing was bogged down. I gather the distros would have put pressure on; Red hat just patched away, and gave a middle finger to the maintainers. Some guy (Alexander Patrakov?) at LFS was beavering away on it and knew all there was to know about it, him being Russian.
You can select any locale from /usr/share/locale. From your list, I don't see unicode in there. Even then, they won't all be trouble free. Unicode hits at the GNU stuff, which is old style unix text based, and needs a shake up from maintainers who didn't write it for the most part. So they are a tad unwilling to rewrite it.
I know this thread was active a while back but I am coming across the same warning as Lennie.
Is it ok to go ahead? Or should I make changes by selecting another locale?
I tried running the command as given in post #4 but then i get a message
Are you running those commands from Salix, or are you already inside the chroot (without knowing it)? It seems either Salix is foobared or something went wrong when you installed coreutils. All those commands are from coreutils. Strange echo works but not the others...
How far in the build have you come? Which package was the last installed? Was everything working before you left the chroot? More info is needed to help you.
The screenshot is saying "chroot: command not found." You have the potential to mix yourself and us up totally, not know which system you are in, and hack apart your real system as long as that continues.
Go away. close whatever terminal you got that from and get a clean flawless chroot as per the book. Fix things or go back as necessary to get that. If you can't, post your issues.
I
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.