Gentoo Archives: gentoo-embedded

From: Matthijs Kooijman <matthijs@×××××.nl>
To: gentoo-embedded@l.g.o
Subject: [gentoo-embedded] Compiling uclibc with iconv/locale support
Date: Sun, 30 Dec 2007 18:52:18
Message-Id: 20071230185107.GB19991@katherina.student.utwente.nl
1 Hey,
2
3 I've been trying to get uclibc running with locale support. In particular, I
4 need iconv support for pulseaudio to work.
5
6 Since installing libiconv is supposedly a Bad Idea, I'm trying to get uclibc's
7 iconv support working. I'm trying this with uclibc 0.9.29 (using the ebuild from
8 the gentoo Bugzilla [1]).
9
10 My first attempt was to simply enable the iconv use flag. This also meant
11 removing iconv from /usr/portage/profiles/uclibc/use.mask, but I suspect
12 (read: hope) that is was only there because there used to be no iconv support
13 in uclibc before (But apparently, there is also someone else who got something
14 similar to work [2]).
15
16 Anyway, having iconv enabled didn't work. It tries to generate locale data at
17 compiletime, which fails. It turns out this is not really supported by uclibc.
18 They strongly recommend to use pregenerated localedata.
19
20 So, I also enabled the pregen use flag. This resulted in an even quicker
21 error, during unpacking. From the ebuild (this holds for both the new 0.9.29
22 and the older 0.9.28 ebuilds) I find the following.
23
24 When nls, pregen and x86 but not userlocales are set,
25 http://www.uclibc.org/downloads/uClibc-locale-030818.tgz is added to SRC_URI
26 and is downloaded. This file is actualy available from that location and,
27 according to uclibc documentation, should be placed in extra/locale before
28 compilation.
29
30 Then, further on, when the iconv use flag is set, both
31 UCLIBC_PREGENERATED_LOCALE_DATA and UCLIBC_DOWNLOAD_PREGENERATED_LOCALE_DATA
32 are enabled. The latter option seems irrelevant, since portage will download
33 the locale data for us.
34
35 However, to be able to use the downloaded locale data, it should still be
36 copied into the extra/locale directory before compilation. There is some code
37 which does something like that, but I can't see how it would ever work. In
38 particular, this code only works when iconv and pregen are set. Then,
39 depending on the userlocales setting, it copies
40 ${DISTDIR}/${MY_P}-user-locale.tar.gz or
41 ${DISTDIR}/${MY_P}-$(tc-arch)-full-locale.tar.gz to
42 extra/locale/uClibc-locale-030818.tgz
43
44 As far as I can see, neither ${MY_P}-user-locale.tar.gz nor
45 ${MYP}-$(tc-arch)-full-locale.tar.gz will ever appearch in $DISTDIR, so these
46 copies will never work. Nor can I find anything that actually does something
47 with the uClibc-locale-030818.tgz that is downloaded.
48
49 Since I don't really know what is supposed to happen when, I'm at a loss a to
50 coding a fix. I'll probably see if I can whip up something that helps in my
51 case, which will probably be something like this: if iconv and pregen are set,
52 download uClibc-locale-030818.tgz and copy uClibc-locale-030818.tgz into
53 extra/locale, ignoring all the other copy thingies.
54
55 Any suggestions about how this is really supposed to work?
56
57 Gr.
58
59 Matthijs
60
61 [1]: http://bugs.gentoo.org/process_bug.cgi
62 k2]: http://jeremy.geeo.net/p7120/

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-embedded] Compiling uclibc with iconv/locale support Arkadi Shishlov <arkadi@××××××.lv>
Re: [gentoo-embedded] Compiling uclibc with iconv/locale support Matthijs Kooijman <matthijs@×××××.nl>