From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: Problem building Grub2 on OSX
Date: Wed, 28 Oct 2009 23:15:56 +0100 [thread overview]
Message-ID: <4AE8C29C.1070409@gmail.com> (raw)
In-Reply-To: <ca5a3f590910281511l73d46fc2q458ecd67893199b2@mail.gmail.com>
André Lopes wrote:
> 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 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
>
> Can anyone help me on this issue?
>
It seems to be caused by following commit:
2009-10-25 Robert Millan <rmh.grub@aybabtu.com>
* include/grub/misc.h: Fix wrong evaluation of APPLE_CC.
(memset): Fix function prototype.
In particular by following part:
--- include/grub/misc.h 2009-10-24 23:22:14 +0000
+++ include/grub/misc.h 2009-10-25 15:14:08 +0000
@@ -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
> Many thanks,
> --
> André Lopes
> ------------------------------------------------------------------------
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>
--
Regards
Vladimir 'phcoder' Serbinenko
Personal git repository: http://repo.or.cz/w/grub2/phcoder.git
next prev parent reply other threads:[~2009-10-28 22:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-28 22:11 Problem building Grub2 on OSX André Lopes
2009-10-28 22:15 ` Vladimir 'phcoder' Serbinenko [this message]
2009-10-28 22:35 ` André Lopes
2009-10-28 22:56 ` Robert Millan
2009-10-29 22:19 ` André Lopes
2009-10-29 22:25 ` Felix Zielcke
2009-10-29 22:46 ` André Lopes
2009-10-30 5:29 ` Bean
2009-10-30 10:38 ` Vladimir 'phcoder' Serbinenko
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=4AE8C29C.1070409@gmail.com \
--to=phcoder@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 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.