I'm trying to build Grub2 in my Macbook5,1. The OSX version is 10.5.8, and the Grub2 source code was obtained from the SVN trunk
So, after the ./configure --with-platform=efi --target=i386 i get this:
******************************************************* GRUB2 will be compiled with following components: Platform: i386-efi grub-emu: Yes USB support for grub-emu: Yes With memory debugging: No efiemu runtime: No (cannot compile with -m64 -mcmodel=large -mno-red-zone -nostdlib)
grub-fstest: Yes grub-mkfont: Yes *******************************************************
Everything looks fine, so i issue a make command, that gives me this error: cc1: warnings being treated as errors
kern/misc.c:62: warning: no previous prototype for ‘memcpy’ kern/misc.c:66: warning: no previous prototype for ‘memmove’ make: *** [kernel_mod-kern_misc.o] Error 1
I've tryied also to configure with the argument --disable-werror, but on the make the error is similar:
gcc -I. -I./. -I. -I./include -I./include -Wall -W -Wall -W -Wshadow -Wpointer-arith -Wmissing-prototypes -Wundef -Wstrict-prototypes -g -Os -falign-jumps=1 -falign-loops=1 -falign-functions=1 -mno-mmx -mno-sse -mno-sse2 -mno-3dnow -DAPPLE_CC=1 -fnested-functions -m32 -fno-stack-protector -mno-stack-arg-probe -fno-builtin -m32 -MD -c -o kernel_mod-symlist.o symlist.c
symlist.c: In function ‘grub_register_exported_symbols’: symlist.c:219: error: ‘memcmp’ undeclared (first use in this function) symlist.c:219: error: (Each undeclared identifier is reported only once symlist.c:219: error: for each function it appears in.)
symlist.c:219: warning: missing initializer symlist.c:219: warning: (near initialization for ‘tab[157].addr’) symlist.c:220: error: ‘memcpy’ undeclared (first use in this function) symlist.c:220: warning: missing initializer
symlist.c:220: warning: (near initialization for ‘tab[158].addr’) symlist.c:221: error: ‘memmove’ undeclared (first use in this function) symlist.c:221: warning: missing initializer symlist.c:221: warning: (near initialization for ‘tab[159].addr’)
symlist.c:222: error: ‘memset’ undeclared (first use in this function) symlist.c:222: warning: missing initializer symlist.c:222: warning: (near initialization for ‘tab[160].addr’) symlist.c:226: error: duplicate case value
symlist.c:226: error: previously used here make: *** [kernel_mod-symlist.o] Error 1