From: Cyrille Lefevre <cyrille.lefevre-lists@laposte.net>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: does grub-emu is supposed to build right ? (was Re: grub2-rc1-emu under cygwin)
Date: Thu, 07 Feb 2013 03:06:50 +0100 [thread overview]
Message-ID: <51130C3A.3070003@laposte.net> (raw)
In-Reply-To: <510AEE21.20104@laposte.net>
[-- Attachment #1: Type: text/plain, Size: 4495 bytes --]
Le 31/01/2013 23:20, Cyrille Lefevre a écrit :
> Hi,
>
> I'm attempting to build grub2-rc1 -emu under cygwin w/o success.
> I've made a fast and dirty patch about the missing stuff (emunet tap),
> see attachment,
> but I don't known how to say to the build machine these symbols came
> from cygwin
> and should be resolved at last ? see bellow... everything else seems to
> be ok.
>
> thanks in advance.
>
> build environment => cygwin2 up-to-date w/ gcc4
>
> $ uname -a
> CYGWIN_NT-6.0 pcvista 1.7.17(0.262/5/3) 2012-10-19 14:39 i686 Cygwin
>
> the configure command I use :
>
> CC=gcc-4 ./configure --with-platform=emu --enable-grub-emu-usb
> --enable-grub-emu-sdl
>
> and the make command :
>
> make -j 1 -k
>
> -j 1 is to avoid fork failures.
>
> what's wrong is :
>
> cat syminfo.lst | sort | awk -f ./genmoddep.awk > moddep.lst || (rm -f
> moddep.lst; exit 1)
> __imp__CloseHandle@4 in emunet is not defined
> __imp__CreateEventA@16 in emunet is not defined
> __imp__CreateFileA@28 in emunet is not defined
> __imp__DeviceIoControl@32 in emunet is not defined
> __imp__GetLastError@0 in emunet is not defined
> __imp__GetOverlappedResult@16 in emunet is not defined
> __imp__ReadFile@20 in emunet is not defined
> __imp__RegCloseKey@4 in emunet is not defined
> __imp__RegEnumKeyExA@32 in emunet is not defined
> __imp__RegOpenKeyExA@20 in emunet is not defined
> __imp__RegQueryValueExA@24 in emunet is not defined
> __imp__ResetEvent@4 in emunet is not defined
> __imp__WaitForSingleObject@8 in emunet is not defined
> __imp__WriteFile@20 in emunet is not defined
> _cygwin_attach_handle_to_fd in emunet is not defined
> _get_osfhandle in emunet is not defined
> Makefile:81312: recipe for target `moddep.lst' failed
Hi,
well, I've resolve the above issue by manually editing the Makefile as
in the one attached.
now, I'm stuck with the following error, so, the question is, does
grub-emu is supposed to build right ?
gcc-4 -DHAVE_CONFIG_H -I. -I.. -Wall -W -I../include -I../include
-DGRUB_MACHINE_EMU=1 -DGRUB_MACHINE=I386_EMU -DGRUB_TARGET_CPU_I386=1
-m32 -DGRUB_FILE=\"symlist.c\" -I. -I. -I.. -I.. -I../include
-I../include -Os -Wall -W -Wshadow -Wold-style-definition
-Wpointer-arith -Wundef -Wextra -Waddress -Wattributes -Wcast-align
-Wchar-subscripts -Wcomment -Wdeprecated-declarations
-Wdisabled-optimization -Wdiv-by-zero -Wempty-body -Wendif-labels
-Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k
-Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Winit-self
-Wint-to-pointer-cast -Winvalid-pch -Wmain -Wmissing-braces
-Wmissing-field-initializers -Wmissing-format-attribute
-Wmissing-noreturn -Wmultichar -Wnonnull -Woverflow -Wparentheses
-Wpointer-arith -Wpointer-to-int-cast -Wreturn-type -Wsequence-point
-Wshadow -Wsign-compare -Wstrict-aliasing -Wswitch -Wtrigraphs -Wundef
-Wunknown-pragmas -Wunused -Wunused-function -Wunused-label
-Wunused-parameter -Wunused-value -Wunused-variable -Wvariadic-macros
-Wvolatile-register-var -Wwrite-strings -Wnested-externs
-Wstrict-prototypes -Wpointer-sign -g -Wredundant-decls
-Wmissing-prototypes -Wmissing-declarations -falign-jumps=1
-falign-loops=1 -falign-functions=1 -mno-mmx -mno-sse -mno-sse2
-mno-3dnow -fno-dwarf2-cfi-asm -fno-asynchronous-unwind-tables -m32
-fno-stack-protector -mno-stack-arg-probe -MT
grub_emu_lite-symlist.o -MD -MP -MF .deps-core/grub_emu_lite-symlist.Tpo
-c -o grub_emu_lite-symlist.o `test -f 'symlist.c' || echo './'`symlist.c
symlist.c: In function 'grub_register_exported_symbols':
symlist.c:72:31: error: 'grub_bios_interrupt' undeclared (first use in
this function)
symlist.c:72:31: note: each undeclared identifier is reported only once
for each function it appears in
symlist.c:73:29: error: 'grub_boot_device' undeclared (first use in this
function)
symlist.c:148:31: error: 'grub_pc_net_config' undeclared (first use in
this function)
symlist.c:149:25: error: 'grub_pit_wait' undeclared (first use in this
function)
symlist.c:154:25: error: 'grub_pxe_call' undeclared (first use in this
function)
symlist.c:216:3: error: duplicate case value
symlist.c:216:3: error: previously used here
Makefile:64893: recipe for target `grub_emu_lite-symlist.o' failed
make[1]: *** [grub_emu_lite-symlist.o] Error 1
thanks in advance...
Regards,
Cyrille Lefevre
--
mailto:Cyrille.Lefevre-lists@laposte.net
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Makefile.diff --]
[-- Type: text/x-diff; name="Makefile.diff", Size: 7927 bytes --]
--- Makefile.bak 2013-02-07 03:00:13.999999900 +0100
+++ Makefile 2013-02-07 02:28:55.999999900 +0100
@@ -28900,8 +28900,8 @@
nodist_grub_emu_OBJECTS = \
grub_emu-grub_emu_init.$(OBJEXT)
grub_emu_OBJECTS = $(am_grub_emu_OBJECTS) $(nodist_grub_emu_OBJECTS)
-am__DEPENDENCIES_1 =
-grub_emu_DEPENDENCIES = kernel.img$(EXEEXT) \
+am__DEPENDENCIES_1 = gnulib/libgnu.a
+grub_emu_DEPENDENCIES = kernel.exec$(EXEEXT) \
$(MODULE_FILES) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
@@ -28916,7 +28916,7 @@
grub_emu_lite-symlist.$(OBJEXT)
grub_emu_lite_OBJECTS = $(am_grub_emu_lite_OBJECTS) \
$(nodist_grub_emu_lite_OBJECTS)
-grub_emu_lite_DEPENDENCIES = kernel.img$(EXEEXT) \
+grub_emu_lite_DEPENDENCIES = kernel.exec$(EXEEXT) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
@@ -34170,7 +34170,7 @@
HELP2MAN =
HOST_CC = gcc-4
HOST_CCASFLAGS =
-HOST_CFLAGS = -Wall -W -Wshadow -Wold-style-definition -Wpointer-arith -Wundef -Wextra -Waddress -Wattributes -Wcast-align -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wempty-body -Wendif-labels -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmain -Wmissing-braces -Wmissing-field-initializers -Wmissing-format-attribute -Wmissing-noreturn -Wmultichar -Wnonnull -Woverflow -Wparentheses -Wpointer-arith -Wpointer-to-int-cast -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wstrict-aliasing -Wswitch -Wtrigraphs -Wundef -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wvariadic-macros -Wvolatile-register-var -Wwrite-strings -Wnested-externs -Wstrict-prototypes -Wpointer-sign -Werror
+HOST_CFLAGS = -Wall -W -Wshadow -Wold-style-definition -Wpointer-arith -Wundef -Wextra -Waddress -Wattributes -Wcast-align -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wempty-body -Wendif-labels -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmain -Wmissing-braces -Wmissing-field-initializers -Wmissing-format-attribute -Wmissing-noreturn -Wmultichar -Wnonnull -Woverflow -Wparentheses -Wpointer-arith -Wpointer-to-int-cast -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wstrict-aliasing -Wswitch -Wtrigraphs -Wundef -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wvariadic-macros -Wvolatile-register-var -Wwrite-strings -Wnested-externs -Wstrict-prototypes -Wpointer-sign
HOST_CPPFLAGS = -Wall -W -I$(top_builddir)/include -DGRUB_UTIL=1 -DGRUB_LIBDIR=\"$(pkglibdir)\" -DLOCALEDIR=\"$(localedir)\"
HOST_LDFLAGS =
INCLUDE_NEXT = include_next
@@ -34368,14 +34368,14 @@
TARGET_CC = gcc-4
TARGET_CCAS = gcc-4
TARGET_CCASFLAGS = -g -m32
-TARGET_CFLAGS = -Os -Wall -W -Wshadow -Wold-style-definition -Wpointer-arith -Wundef -Wextra -Waddress -Wattributes -Wcast-align -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wempty-body -Wendif-labels -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmain -Wmissing-braces -Wmissing-field-initializers -Wmissing-format-attribute -Wmissing-noreturn -Wmultichar -Wnonnull -Woverflow -Wparentheses -Wpointer-arith -Wpointer-to-int-cast -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wstrict-aliasing -Wswitch -Wtrigraphs -Wundef -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wvariadic-macros -Wvolatile-register-var -Wwrite-strings -Wnested-externs -Wstrict-prototypes -Wpointer-sign -g -Wredundant-decls -Wmissing-prototypes -Wmissing-declarations -falign-jumps=1 -falign-loops=1 -falign-functions=1 -mno-mmx -mno-sse -mno-sse2 -mno-3dnow -fno-dwarf2-cfi-asm -fno-asynchronous-unwind-tables -m32 -fno-stack-protector -mno-stack-arg-probe -Werror $(am__append_9)
+TARGET_CFLAGS = -Os -Wall -W -Wshadow -Wold-style-definition -Wpointer-arith -Wundef -Wextra -Waddress -Wattributes -Wcast-align -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wempty-body -Wendif-labels -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmain -Wmissing-braces -Wmissing-field-initializers -Wmissing-format-attribute -Wmissing-noreturn -Wmultichar -Wnonnull -Woverflow -Wparentheses -Wpointer-arith -Wpointer-to-int-cast -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wstrict-aliasing -Wswitch -Wtrigraphs -Wundef -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wvariadic-macros -Wvolatile-register-var -Wwrite-strings -Wnested-externs -Wstrict-prototypes -Wpointer-sign -g -Wredundant-decls -Wmissing-prototypes -Wmissing-declarations -falign-jumps=1 -falign-loops=1 -falign-functions=1 -mno-mmx -mno-sse -mno-sse2 -mno-3dnow -fno-dwarf2-cfi-asm -fno-asynchronous-unwind-tables -m32 -fno-stack-protector -mno-stack-arg-probe $(am__append_9)
TARGET_CPP = gcc-4 -E
TARGET_CPPFLAGS = -Wall -W -I$(top_srcdir)/include -I$(top_builddir)/include -DGRUB_MACHINE_EMU=1 -DGRUB_MACHINE=I386_EMU -DGRUB_TARGET_CPU_I386=1 -m32
TARGET_IMG_BASE_LDOPT = -Wl,-Ttext
TARGET_IMG_CFLAGS =
TARGET_IMG_LDFLAGS = -Wl,-N
TARGET_IMG_LDSCRIPT =
-TARGET_LDFLAGS = -m32
+TARGET_LDFLAGS = -m32 -static-libgcc
TARGET_LDFLAGS_OLDMAGIC = -Wl,-N
TARGET_MODULE_FORMAT = elf32
TARGET_OBJ2ELF = $(top_builddir)/grub-pe2elf
@@ -58385,14 +58385,14 @@
$(am__append_18216) $(am__append_18225) $(am__append_18234)
grub_emu_SOURCES = kern/emu/full.c
nodist_grub_emu_SOURCES = grub_emu_init.c
-grub_emu_LDADD = kernel.img$(EXEEXT) $(MODULE_FILES) $(LIBUTIL) $(LIBCURSES) $(LIBSDL) $(LIBUSB) $(LIBPCIACCESS) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)
+grub_emu_LDADD = kernel.exec$(EXEEXT) gnulib/libgnu.a $(MODULE_FILES) $(LIBUTIL) $(LIBCURSES) $(LIBSDL) $(LIBUSB) $(LIBINTL) $(LIBPCIACCESS) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)
grub_emu_CFLAGS = $(AM_CFLAGS) $(CFLAGS_PROGRAM)
grub_emu_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_PROGRAM)
grub_emu_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_PROGRAM)
grub_emu_CCASFLAGS = $(AM_CCASFLAGS) $(CCASFLAGS_PROGRAM)
grub_emu_lite_SOURCES = kern/emu/lite.c
nodist_grub_emu_lite_SOURCES = symlist.c
-grub_emu_lite_LDADD = kernel.img$(EXEEXT) $(LIBUTIL) $(LIBCURSES) $(LIBSDL) $(LIBUSB) $(LIBPCIACCESS) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)
+grub_emu_lite_LDADD = kernel.exec$(EXEEXT) $(LIBUTIL) $(LIBCURSES) $(LIBSDL) $(LIBUSB) $(LIBPCIACCESS) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)
grub_emu_lite_CFLAGS = $(AM_CFLAGS) $(CFLAGS_PROGRAM)
grub_emu_lite_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_PROGRAM)
grub_emu_lite_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_PROGRAM)
@@ -81301,8 +81301,12 @@
crypto.lst: $(srcdir)/lib/libgcrypt-grub/cipher/crypto.lst
cp $^ $@
-syminfo.lst: gensyminfo.sh kernel_syms.lst $(MODULE_FILES)
+cygwin.lst: /usr/bin/cygwin1.dll
+ nm -u net/drivers/emu/emunet_module-emunet.o | awk '!/grub/{print "defined cygwin", $$NF}' > cygwin.lst
+
+syminfo.lst: gensyminfo.sh kernel_syms.lst $(MODULE_FILES) cygwin.lst
cat kernel_syms.lst > $@.new
+ cat cygwin.lst >> $@.new
for m in $(MODULE_FILES); do \
sh $< $$m >> $@.new || exit 1; \
done
next prev parent reply other threads:[~2013-02-07 2:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-31 22:20 grub2-rc1-emu under cygwin Cyrille Lefevre
2013-02-07 2:06 ` Cyrille Lefevre [this message]
2013-02-07 9:14 ` does grub-emu is supposed to build right ? (was Re: grub2-rc1-emu under cygwin) Vladimir 'φ-coder/phcoder' Serbinenko
2013-04-03 14:28 ` grub2-rc1-emu under cygwin Vladimir 'φ-coder/phcoder' Serbinenko
2013-10-17 23:10 ` Vladimir 'φ-coder/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=51130C3A.3070003@laposte.net \
--to=cyrille.lefevre-lists@laposte.net \
--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.