Compiling uclibc with iconv/locale support
Hey,
I've been trying to get uclibc running with locale support. In particular, I need iconv support for pulseaudio to work. Since installing libiconv is supposedly a Bad Idea, I'm trying to get uclibc's iconv support working. I'm trying this with uclibc 0.9.29 (using the ebuild from the gentoo Bugzilla [1]). My first attempt was to simply enable the iconv use flag. This also meant removing iconv from /usr/portage/profiles/uclibc/use.mask, but I suspect (read: hope) that is was only there because there used to be no iconv support in uclibc before (But apparently, there is also someone else who got something similar to work [2]). Anyway, having iconv enabled didn't work. It tries to generate locale data at compiletime, which fails. It turns out this is not really supported by uclibc. They strongly recommend to use pregenerated localedata. So, I also enabled the pregen use flag. This resulted in an even quicker error, during unpacking. From the ebuild (this holds for both the new 0.9.29 and the older 0.9.28 ebuilds) I find the following. When nls, pregen and x86 but not userlocales are set, http://www.uclibc.org/downloads/uClibc-locale-030818.tgz is added to SRC_URI and is downloaded. This file is actualy available from that location and, according to uclibc documentation, should be placed in extra/locale before compilation. Then, further on, when the iconv use flag is set, both UCLIBC_PREGENERATED_LOCALE_DATA and UCLIBC_DOWNLOAD_PREGENERATED_LOCALE_DATA are enabled. The latter option seems irrelevant, since portage will download the locale data for us. However, to be able to use the downloaded locale data, it should still be copied into the extra/locale directory before compilation. There is some code which does something like that, but I can't see how it would ever work. In particular, this code only works when iconv and pregen are set. Then, depending on the userlocales setting, it copies ${DISTDIR}/${MY_P}-user-locale.tar.gz or ${DISTDIR}/${MY_P}-$(tc-arch)-full-locale.tar.gz to extra/locale/uClibc-locale-030818.tgz As far as I can see, neither ${MY_P}-user-locale.tar.gz nor ${MYP}-$(tc-arch)-full-locale.tar.gz will ever appearch in $DISTDIR, so these copies will never work. Nor can I find anything that actually does something with the uClibc-locale-030818.tgz that is downloaded. Since I don't really know what is supposed to happen when, I'm at a loss a to coding a fix. I'll probably see if I can whip up something that helps in my case, which will probably be something like this: if iconv and pregen are set, download uClibc-locale-030818.tgz and copy uClibc-locale-030818.tgz into extra/locale, ignoring all the other copy thingies. Any suggestions about how this is really supposed to work? Gr. Matthijs [1]: http://bugs.gentoo.org/process_bug.cgi k2]: http://jeremy.geeo.net/p7120/ |
Compiling uclibc with iconv/locale support
Matthijs Kooijman wrote:
Anyway, having iconv enabled didn't work. It tries to generate locale data at compiletime, which fails. It turns out this is not really supported by uclibc. They strongly recommend to use pregenerated localedata. I'm not sure the iconv is working in uClibc, but I have a cross-i586-pc-linux-uclibc/uclibc-0.9.28.3-r1 compiled with iconv flag set with the patch from http://bugs.gentoo.org/show_bug.cgi?id=177093 -- gentoo-embedded@gentoo.org mailing list |
Compiling uclibc with iconv/locale support
Hey,
> case, which will probably be something like this: if iconv and pregen are set, > download uClibc-locale-030818.tgz and copy uClibc-locale-030818.tgz into > extra/locale, ignoring all the other copy thingies. This kinda worked, uclibc succesfully compiled and did some locale thingies. objdump confirms that libuClibc-0.9.29.so does indeed contain iconv symbols. However, pulseaudio compilation still fails in an early stage, because it doesn't have the AM_ICONV macro. Googling turns out that this macro is provided by the gettext package to find out where iconv actually is and how to link against it. Now, to see where to fix this and how... Gr. Matthijs |
Compiling uclibc with iconv/locale support
> I'm not sure the iconv is working in uClibc, but I have a
> cross-i586-pc-linux-uclibc/uclibc-0.9.28.3-r1 compiled with iconv flag set > with the patch from http://bugs.gentoo.org/show_bug.cgi?id=177093 AFAICS, that's for generating the locales at compiletime, which had other problems for me. I've got it to work using pregenerated locales now. Thanks, Matthijs |
| All times are GMT. The time now is 09:47 PM. |
VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.