Can't compile 2.6.12 without Gettext
Hi,
I didn't see much informations about this.
It's not possible to "make {,menu}config" and even to compile a 2.6.12 kernel if there is no or partially installed Gettext on the system.
Full Gettext is *required* to launch the kbuild scripts since the modifications to add i18n to the config scripts.
Not all system have gettext, I'm thinking about small or embedded system with specific toolchain. For example, uClibc is widely used but as still a partial nls support.
Anyway, this should not be required for compiling a kernel. At least an option to pass to make which override the default behavior could solve the issue.
Moreover, the script doesn't do any sanity check about the system (there is no configure script of course) and just try to catch the gettext binaries he founds first. There is a hard-coded filename too.
Seems dangerous to me and should not be allowed by default.
Am I misleading ?
Signature · 2 lines
Jerome Pinot ftp://ngc891.blogdns.net/pub
Quoted 1 line · Jerome Pinot
Hi,
Hi Jerome,
Quoted 16 lines
I didn't see much informations about this.
It's not possible to "make {,menu}config" and even to compile a 2.6.12 kernel if there is no or partially installed Gettext on the system.
Full Gettext is *required* to launch the kbuild scripts since the modifications to add i18n to the config scripts.
Not all system have gettext, I'm thinking about small or embedded system with specific toolchain. For example, uClibc is widely used but as still a partial nls support.
Anyway, this should not be required for compiling a kernel. At least an option to pass to make which override the default behavior could solve the issue.
Quoted 7 lines
Moreover, the script doesn't do any sanity check about the system (there is no configure script of course) and just try to catch the gettext binaries he founds first. There is a hard-coded filename too.
Seems dangerous to me and should not be allowed by default.
Am I misleading ?
are you using an ftp.kernel.org 2.6.12 kernel or a vendor kernel?
If it's an ftp.kernel.org kernel, please send the exact error messages you are seeing.
Quoted 1 line
Jerome Pinot
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedOn 8/27/05, Adrian Bunk <[email protected]> wrote:
[...]
Quoted 1 line
are you using an ftp.kernel.org 2.6.12 kernel or a vendor kernel?
That's a vanilla 2.6.12.5 from kernel.org
For obvious reasons, I only do bugreports on lkml for vanilla kernel.
Quoted 2 lines
If it's an ftp.kernel.org kernel, please send the exact error messages you are seeing.
[...]
---- snip ----
ngc891@comet:/usr/src/linux-2.6.12.5$ make V=1 menuconfig
make -f scripts/Makefile.build obj=scripts/basic
gcc -Wp,-MD,scripts/basic/.fixdep.d -Wall -Wstrict-prototypes -O2
-fomit-frame-pointer -o scripts/basic/fixdep
scripts/basic/fixdep.c
gcc -Wp,-MD,scripts/basic/.split-include.d -Wall -Wstrict-prototypes
-O2 -fomit-frame-pointer -o scripts/basic/split-include
scripts/basic/split-include.c
gcc -Wp,-MD,scripts/basic/.docproc.d -Wall -Wstrict-prototypes -O2
-fomit-frame-pointer -o scripts/basic/docproc
scripts/basic/docproc.c
if test ! /usr/src/linux-2.6.12.5 -ef /usr/src/linux-2.6.12.5; then \
/bin/sh /usr/src/linux-2.6.12.5/scripts/mkmakefile \
/usr/src/linux-2.6.12.5 /usr/src/linux-2.6.12.5 2 6 \Quoted 1 line
/usr/src/linux-2.6.12.5/Makefile; \
echo ' GEN /usr/src/linux-2.6.12.5/Makefile'; \
fi
make -f scripts/Makefile.build obj=scripts/kconfig menuconfig
cat scripts/kconfig/zconf.tab.h_shipped > scripts/kconfig/zconf.tab.h gcc -Wp,-MD,scripts/kconfig/.conf.o.d -Wall -Wstrict-prototypes -O2
-fomit-frame-pointer -c -o scripts/kconfig/conf.oscripts/kconfig/conf.c
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' make[1]: *** [scripts/kconfig/conf.o] Error 1
make: *** [menuconfig] Error 2
---- snip ----
Actually, adding libintl.h in /usr/include didn't solve the issue in my case. My gettext implementation is not exactly complete. Anyway the script shouldn't failed at this step.
Segher Boessenkool, who had the same problem, sent me a way to compile the kernel by modifying a bit the lkc.h and mconf.c files. I suggested him to send this to lkml too.
The fix to do is really small but it needs to define a policy about how kconfig should decide about using gettext or not. It could use a configure script or a parameter from command line to choose whether or not to look for a gettext implementation (something like "make NLS=0 menuconfig" maybe). This should be define prior to any patch attempt.
So I just wonder what Roman Zippel think about this.
Regards,
Signature · 2 lines
Jerome Pinot ftp://ngc891.blogdns.net/pub
Quoted 16 lines · Jerome Pinot
...
---- snip ----
...
In file included fromscripts/kconfig/conf.c:14:scripts/kconfig/lkc.h:11:21:libintl.h: No such file or directory
...
---- snip ----Actually, adding
libintl.hin/usr/includedidn't solve the issue in my case. My gettext implementation is not exactly complete. Anyway the script shouldn't failed at this step.Segher Boessenkool, who had the same problem, sent me a way to compile the kernel by modifying a bit the
lkc.handmconf.cfiles. I suggested him to send this to lkml too.
Quoted 6 lines
The fix to do is really small but it needs to define a policy about how kconfig should decide about using gettext or not. It could use a configure script or a parameter from command line to choose whether or not to look for a gettext implementation (something like "make NLS=0 menuconfig" maybe). This should be define prior to any patch attempt.
...
You said "full gettext" was required and that the presence of "gettext binaries" should be checked what surprised me. It seems this is not the problem. Under Linux, libintl.h is not shipped with gettext but with the C library if you are using glibc or dietlibc.
I do not question your point that "uClibc is widely used", but it's widely used to _run_ a Linux kernel.
You said you are "thinking about small or embedded system with specific toolchain". If a system is so limited that you run uClibc on it, is this really the right system to _compile_ a kernel on? Where's the problem with cross-compiling the kernel for such a system?
Quoted 2 lines
Regards,
Jerome Pinot
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedOn 8/28/05, Adrian Bunk <[email protected]> wrote:
[...]
Quoted 4 lines
You said "full gettext" was required and that the presence of "gettext binaries" should be checked what surprised me. It seems this is not the problem. Under Linux,
libintl.his not shipped with gettext but with the C library if you are using glibc or dietlibc.
I said the libintl.h file didn't solve the problem
Quoted 6 lines
I do not question your point that "uClibc is widely used", but it's widely used to _run_ a Linux kernel.
You said you are "thinking about small or embedded system with specific toolchain". If a system is so limited that you run uClibc on it, is this really the right system to _compile_ a kernel on? Where's the problem with cross-compiling the kernel for such a system?
You need the libc headers, to compile a kernel.
If you want to really work cleanly, i.e. be as much independant of the host system as possible, you will not compile on another system, or even use a cross-compiler, but use your own environnement system in chroot. Everything in your system should have been built with the same toolchain.
The LFS project shown very nice informations about this 1 or 2 years ago. They still found bytes of the host system in the final build binaries (sorry, can't find back the mail with figures). They had to change completly the way of doing the toolchain. You can check the beginning of chapter 5 from current book for more informations.
Shall every toolchain have gettext?
I don't think so. Sometimes, you just don't need all the nls bloat.
Moreover, Kconfig should check before trying to compile. It could be a nasty way to introduce "some code" to the build program. Hum.
Anyway, there is no need of this kind of dependency to actually compile the kernel. I still could use gcc in the source tree to get my binaries.
The rationnal way should be to check for correct nls implementation and just not use it if it's missing. It's a matter of adding 2 #define in the code and add a proper test.
I don't understand why gettext must be _required_
Signature · 2 lines
Jerome Pinot ftp://ngc891.blogdns.net/pub