grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Build error: "ENABLE_NLS" is not defined


From: address@hidden
Subject: Re: Build error: "ENABLE_NLS" is not defined
Date: Tue, 12 Jan 2010 13:09:01 -0600

2010/1/12 Grégoire Sutre <address@hidden>:
> Hi,
>
> When NLS is disabled or not supported, the macro ENABLE_NLS is not defined,
> and this breaks compilation of GRUB modules as they are compiled with
> -Werror -Wundef by default.  This is with bazaar trunk.
>
> $ ./autogen.sh && ./configure && gmake
> [...]
> gcc -Ikern -I./kern -nostdinc -isystem /usr/include -I./include -I.
> -I./include -Wall -W  -Os -DGRUB_MACHINE_PCBIOS=1 -Wall -W -Wshadow
> -Wpointer-arith -Wmissing-prototypes                -Wundef
> -Wstrict-prototypes -g -falign-jumps=1 -falign-loops=1 -falign-functions=1
> -mno-mmx -mno-sse -mno-sse2 -mno-3dnow -m32 -fno-stack-protector
> -mno-stack-arg-probe -Werror -fno-builtin -mrtd -mregparm=3 -m32   -MD -c -o
> kernel_img-kern_err.o kern/err.c
> In file included from kern/err.c:23:
> ./include/grub/i18n.h:29:5: error: "ENABLE_NLS" is not defined
> gmake: *** [kernel_img-kern_err.o] Error 1
>
> A possible fix consists in replacing the #if ENABLE_NLS by #if
> defined(ENABLE_NLS).  There are not many instances, so they can be changed
> manually, but the following command did the trick for me (assuming sed is
> GNU sed):
>
> find . -name '*.[ch]' -exec sed -i -e 's, ENABLE_NLS, defined(ENABLE_NLS),g'
> '{}' ';'

This fix breaks when ENABLE_NLS is defined as 0.

This gcc bug is blocking a better solution:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38105

>
> Best,
>
> Grégoire
>
>
> _______________________________________________
> Grub-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/grub-devel
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]