I'm trying to build a minimal gentoo-linux system using uclibc profile, but linux 2.6.12 requires gettext to build its configuration modules.
With 2.6.12 linux include Kconfig i18n support, see on linux.org commit 3b9fa0931dd86a1fe5507311ee8031650f5d0e8c Author: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> Date: Thu May 5 15:09:46 2005 -0700 on a minimal system without gettext installed it is impossible to configure and then compile a 2.6.12 kernel alniyat linux # make config HOSTCC scripts/basic/fixdep HOSTCC scripts/basic/split-include HOSTCC scripts/basic/docproc SHIPPED scripts/kconfig/zconf.tab.h HOSTCC scripts/kconfig/conf.o In file included from scripts/kconfig/conf.c:14: scripts/kconfig/lkc.h:11:21: libintl.h: No such file or directory scripts/kconfig/conf.c: In function `check_stdin': scripts/kconfig/conf.c:59: warning: implicit declaration of function `gettext' scripts/kconfig/conf.c:59: warning: passing arg 1 of `printf' makes pointer from integer without a cast scripts/kconfig/conf.c:60: warning: passing arg 1 of `printf' makes pointer from integer without a cast scripts/kconfig/conf.c:61: warning: passing arg 1 of `printf' makes pointer from integer without a cast scripts/kconfig/conf.c: In function `check_conf': scripts/kconfig/conf.c:473: warning: passing arg 1 of `printf' makes pointer from integer without a cast scripts/kconfig/conf.c: In function `main': scripts/kconfig/conf.c:508: warning: passing arg 1 of `printf' makes pointer from integer without a cast scripts/kconfig/conf.c:533: warning: passing arg 1 of `printf' makes pointer from integer without a cast scripts/kconfig/conf.c:550: warning: passing arg 1 of `printf' makes pointer from integer without a cast scripts/kconfig/conf.c:579: warning: passing arg 2 of `fprintf' makes pointer from integer without a cast make[1]: *** [scripts/kconfig/conf.o] Error 1 make: *** [config] Error 2
Created attachment 64002 [details, diff] i18n removal patch The attached patch removes i18n from Kconfig. After applying the patch I was able to configure the kernel. I think that this patch should be applied from the kernel sources ebuilds if the gettext USE flag is not present.
This really should go onto the LKML for discussion - we'd rather not include patches that revert upstream-specified behaviour without a better solution getting implemented.
Created attachment 70868 [details, diff] sources-nogettext.patch Another patch, this one detects if there is no gettext on the host system and disables its functionality, else all works like upstream.
Created attachment 71368 [details, diff] 2.6.13 i18n Reversal Patch Try this patch instead. I bumped into this while preparing Gentoo/MIPS SGI LiveCDs (using a mipx/uclibc chroot for genkernel testing) and this on ereared up and bit me. So I hunted down the full commit done upstream and reversed it. This is the 2.6.13 patch, which should/may apply to 2.6.12.
Created attachment 71369 [details, diff] 2.6.14 i18n Reversal Patch Here's the 2.6.14 version (against -rc2).
This is a blocker for any security bug which will present itself on 2.6.x kernels and uClibc environments.
Yuri, where has this patch come from? It looks more acceptable than the others floating around.
(In reply to comment #8) > Yuri, where has this patch come from? It looks more acceptable than the others > floating around. Made it myself and the auto detection idea is from vapier.
Ok. Have you sent it upstream?
No, but you kernel Gentoo guys please do so.
Ok, ignore the previous comment ;-) On vapier's advise I submitted it upstream: http://bugzilla.kernel.org/show_bug.cgi?id=5501 Also I made a tiny modification to the patch (in upstream bugzilla) (I was kind of nervous about that as this is a kernel after all)
The correct way to submit patches is to send to the linux kernel mailing list (see /usr/src/linux/Documentation/SubmittingPatches). I am happy to do this for you if you want me to (and you will still get credited for it).
Created attachment 71533 [details, diff] fix-build-on-nls-free-systems.patch This patch was accepted upstream, please add to sys-kernel/*-sources. ----------------------- From: akpm@osdl.org To: yvasilev@duke.math.cinvestav.mx, sam@ravnborg.org, mm-commits@vger.kernel.org Subject: + fix-build-on-nls-free-systems.patch added to -mm tree Date: Wed, 26 Oct 2005 13:19:34 -0700 The patch titled fix build on nls free systems has been added to the -mm tree. Its filename is fix-build-on-nls-free-systems.patch -------------------------------
Fixed in gentoo-sources-2.6.14 (genpatches-2.6.14-1)
Created attachment 71887 [details, diff] fix-build-on-nls-free-systems.patch Fixed a typo that caused all systems to appear as not having NLS (checked for the misspelled header file).