Tiny Core Linux
Tiny Core Extensions => TCE Q&A Forum => Topic started by: rullolex on March 09, 2021, 05:06:50 PM
-
hi,
I try to locale mtpaint but I have this:
gdk-warning **:22:54:12.447: locale not supported by C library
how can I resolve this error?
I have installed getlocale.tcz and run it.
-
Could the problem is this?
mylocale.tcz is smaller than 10KBI check the folder and is empty
thank you
-
Did you check that the getlocale extension and all of its dependencies were loaded before running the script to create mylocale:
getlocale.tcz
glibc_gconv.tcz
glibc_i18n_locale.tcz
glibc_apps.tcz
dialog.tcz
ncursesw.tcz
squashfs-tools.tcz
liblzma.tcz
lzo.tcz
libzstd.tcz
You would need the locale files produced when compiling mtpaint to see a different locale in the mtpaint menus.
-
Hi Juanito,
I check and I have all dependance loaded but I have the same error.
About mtpaint, I have recompiled it again with the locale specification in the ./configure and I have reinstalled it.
I have the:
gdk-warning, locale not supported by C library
gtk-warning, locale not supported by C library
if language on boot is it,
if I set lang=C I have only the gdk-warning error
Ps.: mtpaint work I had only the warning
-
hi Junito,
I can't modify the previous post
I do some test:
1. "it" on boot and "it" in mtpaint:
gdk-warning, locale not supported by C library
gtk-warning, locale not supported by C library
2. "C£ on boot and "it" in mtpaint:
gdk-warning error
3. "C" on boot and "defoult language" on mtpaint
no error
-
Hi Juanito,
it is the locale out put it can be helpfull?
tc@box:~$ locale
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=it_IT
LC_CTYPE="it_IT"
LC_NUMERIC="it_IT"
LC_TIME="it_IT"
LC_COLLATE="it_IT"
LC_MONETARY="it_IT"
LC_MESSAGES="it_IT"
LC_PAPER="it_IT"
LC_NAME="it_IT"
LC_ADDRESS="it_IT"
LC_TELEPHONE="it_IT"
LC_MEASUREMENT="it_IT"
LC_IDENTIFICATION="it_IT"
LC_ALL=
/code]
-
If I try in CorePure64-12.x, I get this:
$ locale
LANG=en_US.UTF-8
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=
..with lang=en_US.UTF-8
-
if I set lang=C I do not have errors
tc@box:~$ locale
LANG=C
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=
-
Judging by the screenshot you provided, the extension is broken.
You should reboot the system without backup, preferably with boot code base norestore.
Check if your tcedir is correct, if not, run tce-setdrive.
realpath /etc/sysconfig/tcedir
Remove the archive if it exist.
sudo rm -f /usr/lib/locale/locale-archive
Load getlocale and retry.
tce-load -i getlocale
sudo getlocale.sh
-
Hi polikuo,
i try but not work.
if I run realpath /etc/sysconfig/tcedir
I had
/mnt/sda1/tce
that is correct I think.
thank you
-
Would it work if you specify the charset for your locale ?
export LC_ALL='it_IT.utf8'
As for the archive, maybe you could try creating one manually ?
sudo rm -f /usr/lib/locale/locale-archive
sudo localedef -i it_IT -c -f UTF-8 it_IT.UTF-8
-
Hi polikuo,
thank you for your answer, i will try.
I will ask in the forum if someone would test mtpaint-locale that I build, while I try to fix my locale
-
Hi polikuo,
works :)
I reinstall getlocale and run
sudo localedef -i it_IT -c -f UTF-8 it_IT.UTF-8
now it works.
Thank you very much
-
Good.
You could either add the archive to your /opt/.filetool.lst for filetool backup
Or you could create an extension with squashfs-tools.tcz
-
Hi Polikuo
I have add the folder /usr/lib/locale to the backup by the tool, I think it is the same think than edit the file /opt/.filetool.lst
I will do the extension with squashfs-tools.tcz for exercise
-
Hi,
i have made a big mistake, i have put norestore in the boot loader and I have loose the locale-archive, i made the extention and i named it it-locale but do not work, i have to name the extention mylocale? Or i do a mistake in made it.
Thank you.
PS fortunately i have a backup of the file locale-archive :D
-
The name doesn't matter.
Did you add the renamed tcz into your onboot.lst ?
They have to be consistent you know.
BTW, you'll need to regenerate it whenever TC move on to a new release.
Hi,
i have made a big mistake, i have put norestore in the boot loader and I have loose the locale-archive, i made the extention and i named it it-locale but do not work, i have to name the extention mylocale? Or i do a mistake in made it.
Thank you.
PS fortunately i have a backup of the file locale-archive :D
What's the output if you type this ?
unsquashfs -l it-locale.tcz
-
Hi Polikuo,
yes, it-locale.tcz is on boot.
here the outupt of the command,
tc@box:/mnt/sda1/tce/optional$ unsquashfs -l it-locale.tcz
Parallel unsquashfs: Using 2 processors
1 inodes (743 blocks) to write
squashfs-root
squashfs-root/locale-archive
thank you
-
http://forum.tinycorelinux.net/index.php/topic,24857.15.html
here the outupt of the command
OK, I see the problem here.
This is how it should look like.
$ unsquashfs -l mylocale.tcz
Parallel unsquashfs: Using 16 processors
1 inodes (974 blocks) to write
squashfs-root
squashfs-root/usr
squashfs-root/usr/lib
squashfs-root/usr/lib/locale
squashfs-root/usr/lib/locale/locale-archive
To make it right:
1. Unpack
2. Make directories
3. Repack
Simple enough.
Replace it-locale.tcz with the repacked one.
Don't forget to add a dep file:
echo glibc_gconv.tcz > it-locale.tcz.dep
P.S.
Sorry, I couldn't post the exact commands for the job
The server internal error is so wonderful :P
-
Hi Polikuo,
Done, it works, now I have norestore and the localization.
Sometime it is bettere to have only the indication and learn ;)
if I have understand good, if I move from TC 12 to for expample 12.1, I have to do again the locale-archive it is correct?
I can share the it-locale.tcz for other italian users that have the getlocale problem as me? It would works?
thank you
-
Hi rullolex
... if I have understand good, if I move from TC 12 to for expample 12.1, I have to do again the locale-archive it is correct? ...
No, you shouldn't need to do it again.
-
if I have understand good, if I move from TC 12 to for expample 12.1, I have to do again the locale-archive it is correct?
From my past experience, if the glibc version is different, some programs may not act correctly.
It may be locale specific, but they do cause some trouble.
That's why I always remake the extension when TC move on to a newer release.
In short:
For major release -> yes
For minor release -> no