Problem building Grub2 on OSX
Hi all,
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 errorskern/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
Can anyone help me on this issue?
Many thanks,
Signature · 1 line
André Lopes
Quoted 53 lines · André Lopes
Hi all,
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 errorskern/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 1I'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(quoted diff) +0
-5-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.csymlist.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
Quoted 2 lines
Can anyone help me on this issue?
It seems to be caused by following commit:
2009-10-25 Robert Millan <[email protected]>
* include/grub/misc.h: Fix wrong evaluation of APPLE_CC. (memset): Fix function prototype.
In particular by following part:
grub/misc.h 2009-10-25 15:14:08 +0000 renamed from grub/misc.h 2009-10-24 23:22:14 +0000 +1 -1
@@ -75,11 +75,11 @@ } /* Prototypes for aliases. */ -#if !defined (GRUB_UTIL) || !defined (APPLE_CC) +#if !defined (GRUB_UTIL) && !defined (APPLE_CC) int EXPORT_FUNC(memcmp) (const void *s1, const void *s2, grub_size_t n); void *EXPORT_FUNC(memmove) (void *dest, const void *src, grub_size_t n); void *EXPORT_FUNC(memcpy) (void *dest, const void *src, grub_size_t n);
It should have been
-#if !defined (GRUB_UTIL) || !defined (APPLE_CC)
+#if !defined (GRUB_UTIL)
Try this way and report back
Quoted 10 lines
Many thanks,
Signature · 7 lines
André Lopes ------------------------------------------------------------------------ _______________________________________________ Grub-devel mailing list [email protected] http://lists.gnu.org/mailman/listinfo/grub-devel
Signature · 3 lines
Regards Vladimir 'phcoder' Serbinenko Personal git repository: http://repo.or.cz/w/grub2/phcoder.git
Yes it was that. Now it builds almost fine!
Now it just gives an ignored error building the docs, i think:
Updating ./docs/version.texi
./install-sh -c -d docs/usr/bin/makeinfo -P ./docs --no-split --force docs/grub.texi -o docs/ grub.info
./docs/grub.texi:1552: Prev reference to nonexistent node `Internals' (perhaps incorrect sectioning?).
...
./docs/grub.texi:81: Menu reference to nonexistent node `Network' (perhaps incorrect sectioning?).
./docs/grub.texi:80: Menu reference to nonexistent node `Configuration' (perhaps incorrect sectioning?).
./docs/grub.texi:964: warning: unreferenced node `Menu entry editor'.
make: [docs/grub.info] Error 1 (ignored)
Many thanks for the help!
Quoted 104 lines · Vladimir 'phcoder' Serbinenko
Quoted 53 lines · André Lopes
Hi all,
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 errorskern/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 1I'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(quoted diff) +0
-5-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.csymlist.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 1Quoted 2 lines
Can anyone help me on this issue?
It seems to be caused by following commit:
2009-10-25 Robert Millan <[email protected]>*
include/grub/misc.h: Fix wrong evaluation ofAPPLE_CC. (memset): Fix function prototype.
In particular by following part:grub/misc.h 2009-10-25 15:14:08 +0000 renamed from grub/misc.h 2009-10-24 23:22:14 +0000 +1
-1@@ -75,11 +75,11 @@ } /* Prototypes for aliases. */ -#if !defined (GRUB_UTIL) || !defined (APPLE_CC) +#if !defined (GRUB_UTIL) && !defined (APPLE_CC) int EXPORT_FUNC(memcmp) (const void *s1, const void *s2, grub_size_t n); void *EXPORT_FUNC(memmove) (void *dest, const void *src, grub_size_t n); void *EXPORT_FUNC(memcpy) (void *dest, const void *src, grub_size_t n);It should have been
grub/misc.h 2009-10-25 15:14:08 +0000 renamed from grub/misc.h 2009-10-24 23:22:14 +0000 +1
-1-#if !defined (GRUB_UTIL) || !defined (APPLE_CC) +#if !defined (GRUB_UTIL)Try this way and report back
Quoted 10 lines
Many thanks,
--
André Lopes
------------------------------------------------------------------------_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel--
Regards
Vladimir 'phcoder' Serbinenko
Personal git repository: http://repo.or.cz/w/grub2/phcoder.git_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel
Signature · 4 lines
André Lopes Joan Crawford<http://www.brainyquote.com/quotes/authors/j/joan_crawford.html> - "I, Joan Crawford, I believe in the dollar. Everything I earn, I spend."
Quoted 1 line · André Lopes
Yes it was that. Now it builds almost fine!
Fixed in SVN, thank you.
Quoted 4 lines
Now it just gives an ignored error building the docs, i think:
[...]
make: [docs/grub.info] Error 1 (ignored)
This is to be expected. Patches welcome.
Signature · 5 lines
Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all."
Continuing this thread, today i was going to make grub.efi file, and then another error om grub-mkimage:
Command:
./grub-mkimage -v -d . -o grub.efi part_gpt hfsplus fat ext2 normal sh chain boot configfile
Output:
(...)
grub-mkimage: info: locating grub_zalloc at 0x4829
grub-mkimage: info: locating memcpy at 0x3b82
grub-mkimage: info: locating memmove at 0x3bc6
grub-mkimage: info: locating start at 0x400
grub-mkimage: info: locating start at 0x400
grub-mkimage: error: undefined symbol memcmp
After this i've tried to "svn update"(r2672) the sources but in the make execution:
gcc -Ikern -I./kern -nostdinc -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 -Werror -fno-builtin -m32 -MD -c -o kernel_mod-kern_main.o kern/main.c In file included from kern/main.c:21:./include/grub/misc.h:23:20: error: stdarg.h: No such file or directory In file included from kern/main.c:21:./include/grub/misc.h:178: error: syntax error before ‘va_list’
cc1: warnings being treated as errors./include/grub/misc.h:178: warning: function declaration isn’t a prototype ./include/grub/misc.h:180: error: syntax error before ‘va_list’ ./include/grub/misc.h:180: warning: function declaration isn’t a prototype
make: *** [kernel_mod-kern_main.o] Error 1
Any hints, on this problem? The svn tag release_1_97 compiles just fine with the include of stdarg.h.
Quoted 25 lines · Robert Millan
Quoted 1 line · André Lopes
Yes it was that. Now it builds almost fine!
Fixed in SVN, thank you.
Quoted 4 lines
Now it just gives an ignored error building the docs, i think:
[...]
make: [docs/grub.info] Error 1 (ignored)This is to be expected. Patches welcome.
--
Robert MillanThe DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all."
_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel
Signature · 3 lines
André Lopes Jonathan Swift<http://www.brainyquote.com/quotes/authors/j/jonathan_swift.html> - "May you live every day of your life."
Am Donnerstag, den 29.10.2009, 22:19 +0000 schrieb André Lopes:
Quoted 25 lines
After this i've tried to "svn update"(r2672) the sources but in the make execution:
gcc -Ikern -I./kern -nostdinc -I. -I./include -I./include -Wall -W
(quoted diff) +0
-5-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 -Werror -fno-builtin -m32 -MD -c -okernel_mod-kern_main.o
kern/main.c
In file included fromkern/main.c:21:./include/grub/misc.h:23:20: error:stdarg.h: No such file or directory
In file included fromkern/main.c:21:./include/grub/misc.h:178: error: syntax error before ‘va_list’
cc1: warnings being treated as errors./include/grub/misc.h:178: warning: function declaration isn’t a prototype./include/grub/misc.h:180: error: syntax error before ‘va_list’./include/grub/misc.h:180: warning: function declaration isn’t a prototype
make: *** [kernel_mod-kern_main.o] Error 1
Quoted 3 lines
Any hints, on this problem? The svn tag
release_1_97compiles just fine with the include ofstdarg.h.
Just revert r2670
Signature · 2 lines
Felix Zielcke Proud Debian Maintainer and GNU GRUB developer
In r2670 i still have problems with the stdarg.h. In r2669 the make was executed without any problem, but the problem with grub-mkimage remains:
grub-mkimage: error: undefined symbol memcmp
Quoted 45 lines · Felix Zielcke
Am Donnerstag, den 29.10.2009, 22:19 +0000 schrieb André Lopes:
Quoted 25 lines
After this i've tried to "svn update"(r2672) the sources but in the make execution:
gcc -Ikern -I./kern -nostdinc -I. -I./include -I./include -Wall -W
(quoted diff) +0
-5-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 -Werror -fno-builtin -m32 -MD -c -okernel_mod-kern_main.o
kern/main.c
In file included fromkern/main.c:21:./include/grub/misc.h:23:20: error:stdarg.h: No such file or directory
In file included fromkern/main.c:21:./include/grub/misc.h:178: error: syntax error before ‘va_list’
cc1: warnings being treated as errors./include/grub/misc.h:178: warning: function declaration isn’t a prototype./include/grub/misc.h:180: error: syntax error before ‘va_list’./include/grub/misc.h:180: warning: function declaration isn’t a prototype
make: *** [kernel_mod-kern_main.o] Error 1Quoted 3 lines
Any hints, on this problem? The svn tag
release_1_97compiles just fine with the include ofstdarg.h.Just revert r2670
--
Felix Zielcke
Proud Debian Maintainer and GNU GRUB developer_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel
Signature · 4 lines
André Lopes Samuel Goldwyn<http://www.brainyquote.com/quotes/authors/s/samuel_goldwyn.html> - "I'm willing to admit that I may not always be right, but I am never wrong."
2009/10/30 André Lopes <[email protected]>:
Quoted 4 lines
In r2670 i still have problems with the
stdarg.h. In r2669 the make was executed without any problem, but the problem with grub-mkimage remains:grub-mkimage: error: undefined symbol memcmp
Hi,
You can try my branch at https://launchpad.net/burg, I have built in without problem in OSX 10.4-10.6, with Xcode 2.5-3.2, on both ppc and intel machine.
Signature · 3 lines
Bean My repository: https://launchpad.net/burg
Quoted 5 lines · Bean
2009/10/30 André Lopes <[email protected]>:
Quoted 3 lines
In r2670 i still have problems with the
stdarg.h. In r2669 the make was executed without any problem, but the problem with grub-mkimage remains:
Quoted 10 lines
Quoted 2 lines
grub-mkimage: error: undefined symbol memcmp
Hi,
You can try my branch at https://launchpad.net/burg, I have built in without problem in OSX 10.4-10.6, with Xcode 2.5-3.2, on both ppc and intel machine.
Hello, his problem is specifically with mainstream branch and has to be fixed in it rather than recommending experimental stuff
Signature · 3 lines
Regards Vladimir 'phcoder' Serbinenko Personal git repository: http://repo.or.cz/w/grub2/phcoder.git