All of lore.kernel.org
 help / color / mirror / Atom feed
* Build error: "ENABLE_NLS" is not defined
@ 2010-01-12 18:52 Grégoire Sutre
  2010-01-12 19:09 ` richardvoigt
  0 siblings, 1 reply; 7+ messages in thread
From: Grégoire Sutre @ 2010-01-12 18:52 UTC (permalink / raw)
  To: The development of GRUB 2

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' '{}' ';'

Best,

Grégoire



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-01-20 19:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-12 18:52 Build error: "ENABLE_NLS" is not defined Grégoire Sutre
2010-01-12 19:09 ` richardvoigt
2010-01-12 19:31   ` Grégoire Sutre
2010-01-12 20:59     ` richardvoigt
2010-01-13  1:02       ` Grégoire Sutre
2010-01-19 23:38         ` Robert Millan
2010-01-20 19:53           ` Grégoire Sutre

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.