WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: locale not supported by C library  (Read 5782 times)

Offline rullolex

  • Full Member
  • ***
  • Posts: 134
    • Rullolex
locale not supported by C library
« on: March 09, 2021, 02: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.

Offline rullolex

  • Full Member
  • ***
  • Posts: 134
    • Rullolex
Re: locale not supported by C library
« Reply #1 on: March 10, 2021, 10:39:12 AM »
Could the problem is this?

Code: [Select]
mylocale.tcz is smaller than 10KBI check the folder and is empty

thank you

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: locale not supported by C library
« Reply #2 on: March 10, 2021, 10:45:19 PM »
Did you check that the getlocale extension and all of its dependencies were loaded before running the script to create mylocale:
Code: [Select]
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.

Offline rullolex

  • Full Member
  • ***
  • Posts: 134
    • Rullolex
Re: locale not supported by C library
« Reply #3 on: March 11, 2021, 07:10:25 AM »
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
« Last Edit: March 11, 2021, 07:35:35 AM by rullolex »

Offline rullolex

  • Full Member
  • ***
  • Posts: 134
    • Rullolex
Re: locale not supported by C library
« Reply #4 on: March 11, 2021, 10:02:06 AM »
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

Offline rullolex

  • Full Member
  • ***
  • Posts: 134
    • Rullolex
Re: locale not supported by C library
« Reply #5 on: March 12, 2021, 11:24:27 PM »
Hi Juanito,

it is the locale out put it can be helpfull?

Code: [Select]
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]

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: locale not supported by C library
« Reply #6 on: March 12, 2021, 11:55:24 PM »
If I try in CorePure64-12.x, I get this:
Code: [Select]
$ 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

Offline rullolex

  • Full Member
  • ***
  • Posts: 134
    • Rullolex
Re: locale not supported by C library
« Reply #7 on: March 13, 2021, 12:13:48 AM »
if I set lang=C I do not have errors

Code: [Select]
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=

Offline polikuo

  • Hero Member
  • *****
  • Posts: 714
Re: locale not supported by C library
« Reply #8 on: March 13, 2021, 03:42:46 AM »
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.
Code: [Select]
realpath /etc/sysconfig/tcedir
Remove the archive if it exist.
Code: [Select]
sudo rm -f /usr/lib/locale/locale-archive
Load getlocale and retry.
Code: [Select]
tce-load -i getlocale
sudo getlocale.sh

Offline rullolex

  • Full Member
  • ***
  • Posts: 134
    • Rullolex
Re: locale not supported by C library
« Reply #9 on: March 13, 2021, 08:21:51 AM »
Hi polikuo,

i try but not work.

if I run
Code: [Select]
realpath /etc/sysconfig/tcedir
I had

Code: [Select]
/mnt/sda1/tce
that is correct I think.

thank you


Offline polikuo

  • Hero Member
  • *****
  • Posts: 714
Re: locale not supported by C library
« Reply #10 on: March 14, 2021, 06:21:01 AM »
Would it work if you specify the charset for your locale ?
Code: [Select]
export LC_ALL='it_IT.utf8'
As for the archive, maybe you could try creating one manually ?
Code: [Select]
sudo rm -f /usr/lib/locale/locale-archive
sudo localedef -i it_IT -c -f UTF-8 it_IT.UTF-8

Offline rullolex

  • Full Member
  • ***
  • Posts: 134
    • Rullolex
Re: locale not supported by C library
« Reply #11 on: March 14, 2021, 11:36:07 AM »
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

Offline rullolex

  • Full Member
  • ***
  • Posts: 134
    • Rullolex
Re: locale not supported by C library
« Reply #12 on: March 17, 2021, 11:05:21 AM »
Hi polikuo,

works :)

I reinstall getlocale and run

Code: [Select]
sudo localedef -i it_IT -c -f UTF-8 it_IT.UTF-8
now it works.

Thank you very much

Offline polikuo

  • Hero Member
  • *****
  • Posts: 714
Re: locale not supported by C library
« Reply #13 on: March 17, 2021, 08:09:54 PM »
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

Offline rullolex

  • Full Member
  • ***
  • Posts: 134
    • Rullolex
Re: locale not supported by C library
« Reply #14 on: March 18, 2021, 03:21:44 AM »
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