From: "Grégoire Sutre" <gregoire.sutre@gmail.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Build error: "ENABLE_NLS" is not defined
Date: Tue, 12 Jan 2010 19:52:31 +0100 [thread overview]
Message-ID: <4B4CC4EF.5000104@gmail.com> (raw)
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
next reply other threads:[~2010-01-12 18:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-12 18:52 Grégoire Sutre [this message]
2010-01-12 19:09 ` Build error: "ENABLE_NLS" is not defined 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B4CC4EF.5000104@gmail.com \
--to=gregoire.sutre@gmail.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox