Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[gentoo-user] locale : cannot generate it

274 views
Skip to first unread message

Helmut Jarausch

unread,
Jan 7, 2017, 9:40:02 AM1/7/17
to
Hi,

hopefully some can help me.

cat /etc/locale.gen

gives

en_US ISO-8859-1
en_US.UTF-8 UTF-8
C.UTF-8
de_DE.UTF-8 UTF-8
de_DE ISO-8859-1
de_DE@euro ISO-8859-15

but

locale-gen gives errors

* Generating locale-archive: forcing # of jobs to 1
* Generating 5 locales (this might take a while) with 1 jobs
* (1/5) Generating C.UTF-8 ...
character map file `de_DE' not found: No such file or directory
cannot open locale definition file `C': No such file or
directory [ !! ]
* (2/5) Generating de_DE.ISO-8859-1 ...
character map file `de_DE.UTF-8' not found: No such file or directory
cannot open locale definition file `ISO-8859-1': No such file or
directo [ !! ]
* (3/5) Generating de_DE.UTF-8 ...
character map file `de_DE@euro' not found: No such file or directory
cannot open locale definition file `UTF-8': No such file or
directory [ !! ]
* (4/5) Generating de_DE.ISO-8859-15@euro ...
character map file `en_US' not found: No such file or directory
cannot open locale definition file `ISO-8859-15': No such file or
direct [ !! ]
* Bad entry in locale.gen: 'UTF-8 '; skipping
* (5/5) Generating en_US.ISO-8859-1 ...
character map file `en_US.UTF-8' not found: No such file or directory
cannot open locale definition file `ISO-8859-1': No such file or
directo [ !! ]
* Generation complete

I've even rebuild glibc (2.24)

/usr/share/i18n/SUPPORTED contains the lines

de_DE.UTF-8 UTF-8
de_DE ISO-8859-1
de_DE@euro ISO-8859-15
en_US.UTF-8 UTF-8
en_US ISO-8859-1

Many thanks for a hint,
Helmut

Helmut Jarausch

unread,
Jan 7, 2017, 10:00:03 AM1/7/17
to
On 01/07/17 15:52:20, Alexander Kapshuk wrote:
> What's the full contents of your /etc/locale.gen?
>

There are only comments above these lines.

Thanks,
Helmut


Alexander Kapshuk

unread,
Jan 7, 2017, 10:00:03 AM1/7/17
to
On Sat, Jan 7, 2017 at 4:30 PM, Helmut Jarausch <jara...@skynet.be> wrote:

Alexander Kapshuk

unread,
Jan 7, 2017, 10:20:03 AM1/7/17
to
The reason I asked for the full contents of your /etc/locale.gen is
because users have been known to accidentally make typos when editing
the file in question.

Also, what's the output of 'locale -a' and 'localedef --list-archive'?

Mick

unread,
Jan 7, 2017, 10:30:02 AM1/7/17
to
There is an incorrect entry in the file. For example this line:

C.UTF-8

The locale name C. is not listed in /usr/share/i18n/locales/ on my system.

However, the remaining entries appear to be correct according to the contents
of /usr/share/i18n/SUPPORTED. So I am not sure what's gone wrong.

--
Regards,
Mick
signature.asc

Urs Schütz

unread,
Jan 7, 2017, 1:40:02 PM1/7/17
to
C.UTF-8 does not work this way. If you delete the C.UTF-8 line it works.
You will have a C locale and a POSIX locale even without specifying them
in /etc/locale.gen.

Let me know if you find a way to produce a locale named "C.UTF-8" on
Gentoo. I would be interested in it, as it seems that newest darktable
from git needs this to compile correctly.

Urs

Urs Schütz

unread,
Jan 8, 2017, 6:40:03 AM1/8/17
to
You can generate a "fake" C.UTF-8 locale with localedef:
# localedef -i en_US -f UTF-8 C.UTF-8
and remove it when no longer needed:
# localedef --delete-from-archive C.utf8
Don't blame me for ugly side effects...

Urs

Helmut Jarausch

unread,
Jan 8, 2017, 11:20:03 AM1/8/17
to
Many thanks to Alexander, Mick and Urs!

The strange C.UTF-8 , which was suggested by one of the devolopers of
media-gfx/darktable,
did cause the problems. The error messages were strange and misleading.


Urs wrote

> You can generate a "fake" C.UTF-8 locale with localedef:
> # localedef -i en_US -f UTF-8 C.UTF-8
> and remove it when no longer needed:
> # localedef --delete-from-archive C.utf8
> Don't blame me for ugly side effects...
>
> Urs

Many thanks for this unusual hint. With this I can build the
GIT-version of darktable.

Is the strange locale name C.UTF-8 a "specialty" of darktable or have
other distributions such a locale?

Many thanks again to you all,
Helmut

Tom H

unread,
Jan 8, 2017, 11:40:02 AM1/8/17
to
On Sun, Jan 8, 2017 at 11:14 AM, Helmut Jarausch <jara...@skynet.be> wrote:
>
> The strange C.UTF-8 , which was suggested by one of the devolopers of
> media-gfx/darktable, did cause the problems. The error messages were
> strange and misleading.
>
> Urs wrote
>
>> You can generate a "fake" C.UTF-8 locale with localedef:
>> # localedef -i en_US -f UTF-8 C.UTF-8
>> and remove it when no longer needed:
>> # localedef --delete-from-archive C.utf8
>> Don't blame me for ugly side effects...
>
> Many thanks for this unusual hint. With this I can build the
> GIT-version of darktable.
>
> Is the strange locale name C.UTF-8 a "specialty" of darktable or have
> other distributions such a locale?

C.UTF-8 is (and has been for a while) a valid Debian locale,installed
by default with libc. And it became, somewhat recently, a valid Fedora
locale (so as not to have to install any additional locales in a
container, over and above the default libc ones, C, C.UTF-8, and
POSIX).

Dominus Mundi

unread,
Jan 8, 2017, 11:50:03 AM1/8/17
to
Dont generate it. It pointles.
Soon laws will come in effect that will ban the use of locales.

--
Securely sent with Tutanota. Claim your encrypted mailbox today!
https://tutanota.com

8. Jan 2017 16:36 by tomh...@gmail.com:

Jonathan Callen

unread,
Jan 11, 2017, 8:20:02 PM1/11/17
to
It is possible to create this on Gentoo (with some warnings) by creating
a symlink /usr/share/i18n/locales/C that points to "POSIX", then adding
"C.UTF-8" to locale.gen as normal.

--
Jonathan Callen

signature.asc

Tom H

unread,
Jan 12, 2017, 12:30:03 AM1/12/17
to
On Wed, Jan 11, 2017 at 8:13 PM, Jonathan Callen <jca...@gentoo.org> wrote:
> On 01/08/2017 11:36 AM, Tom H wrote:
>> On Sun, Jan 8, 2017 at 11:14 AM, Helmut Jarausch <jara...@skynet.be> wrote:
>>> Urs wrote
>>>
>>>> You can generate a "fake" C.UTF-8 locale with localedef:
>>>> # localedef -i en_US -f UTF-8 C.UTF-8
>>>> and remove it when no longer needed:
>>>> # localedef --delete-from-archive C.utf8
>>>
>>> Is the strange locale name C.UTF-8 a "specialty" of darktable or have
>>> other distributions such a locale?
>>
>> C.UTF-8 is (and has been for a while) a valid Debian locale,installed
>> by default with libc. And it became, somewhat recently, a valid Fedora
>> locale (so as not to have to install any additional locales in a
>> container, over and above the default libc ones, C, C.UTF-8, and
>> POSIX).
>
> It is possible to create this on Gentoo (with some warnings) by creating
> a symlink /usr/share/i18n/locales/C that points to "POSIX", then adding
> "C.UTF-8" to locale.gen as normal.

Thanks. I've just done it. There were some warnings as you cautioned.
Symlinking C to en_US (to use locale-gen rather than localedef as
above) generates it without warnings but it's probably not
"appropriate."

Debian patches libc:

https://sources.debian.net/src/glibc/2.24-8/debian/patches/localedata/locale-C.diff/

Fedora patches libc:

http://pkgs.fedoraproject.org/cgit/rpms/glibc.git/tree/glibc-c-utf8-locale.patch

Helmut Jarausch

unread,
Jan 12, 2017, 5:10:03 AM1/12/17
to
Many thanks, Jonathan.

Wouldn't it make sense to add this to the standard Gentoo layout to be
"compatible" with other distributions.

Helmut


0 new messages