Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1NUm71-0001DC-0r for mharc-grub-devel@gnu.org; Tue, 12 Jan 2010 14:09:07 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NUm6z-0001Cw-Dn for grub-devel@gnu.org; Tue, 12 Jan 2010 14:09:05 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NUm6y-0001Cj-8d for grub-devel@gnu.org; Tue, 12 Jan 2010 14:09:04 -0500 Received: from [199.232.76.173] (port=47269 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NUm6y-0001Cg-2p for grub-devel@gnu.org; Tue, 12 Jan 2010 14:09:04 -0500 Received: from fg-out-1718.google.com ([72.14.220.155]:25033) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NUm6x-0002rD-Jz for grub-devel@gnu.org; Tue, 12 Jan 2010 14:09:03 -0500 Received: by fg-out-1718.google.com with SMTP id 19so333337fgg.12 for ; Tue, 12 Jan 2010 11:09:01 -0800 (PST) MIME-Version: 1.0 Received: by 10.239.139.39 with SMTP id r39mr1700371hbr.116.1263323341253; Tue, 12 Jan 2010 11:09:01 -0800 (PST) In-Reply-To: <4B4CC4EF.5000104@gmail.com> References: <4B4CC4EF.5000104@gmail.com> Date: Tue, 12 Jan 2010 13:09:01 -0600 Message-ID: <2e59e6971001121109t5314e819t30ee70bb509254e2@mail.gmail.com> From: "richardvoigt@gmail.com" To: The development of GNU GRUB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: Build error: "ENABLE_NLS" is not defined X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2010 19:09:05 -0000 2010/1/12 Gr=C3=A9goire Sutre : > Hi, > > When NLS is disabled or not supported, the macro ENABLE_NLS is not define= d, > and this breaks compilation of GRUB modules as they are compiled with > -Werror -Wundef by default. =C2=A0This is with bazaar trunk. > > $ ./autogen.sh && ./configure && gmake > [...] > gcc -Ikern -I./kern -nostdinc -isystem /usr/include -I./include -I. > -I./include -Wall -W =C2=A0-Os -DGRUB_MACHINE_PCBIOS=3D1 -Wall -W -Wshado= w > -Wpointer-arith -Wmissing-prototypes =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0-Wundef > -Wstrict-prototypes -g -falign-jumps=3D1 -falign-loops=3D1 -falign-functi= ons=3D1 > -mno-mmx -mno-sse -mno-sse2 -mno-3dnow -m32 -fno-stack-protector > -mno-stack-arg-probe -Werror -fno-builtin -mrtd -mregparm=3D3 -m32 =C2=A0= -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). =C2=A0There are not many instances, so they can be c= hanged > 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=3D38105 > > Best, > > Gr=C3=A9goire > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel >