[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Make grub error "too few arguments" with xen



Hi all,

 

I used git bisect and found the following error occurred from commit: 4d4a8c96e3593d76fe7b025665ccdecc70a53c1f.

Such error in loader/arm64/xen_boot.c has been fixed, bur the error in loader/i386/xen.c hasn’t been fixed, do you have any idea?

Thanks a lot!

 

…….

loader/i386/xen.c: In function ‘grub_cmd_xen’:

loader/i386/xen.c:650:10: error: too few arguments to function ‘grub_create_loader_cmdline’

          sizeof (xen_state.next_start.cmd_line) - 1);

          ^

In file included from loader/i386/xen.c:38:0:

../include/grub/lib/cmdline.h:29:12: note: declared here

grub_err_t grub_create_loader_cmdline (int argc, char *argv[], char *buf,

            ^

loader/i386/xen.c:651:3: error: pointer targets in passing argument 1 of ‘grub_verify_string’ differ in signedness [-Werror=pointer-sign]

   err = grub_verify_string (xen_state.next_start.cmd_line, GRUB_VERIFY_MODULE_CMDLINE);

   ^

In file included from loader/i386/xen.c:43:0:

../include/grub/verify.h:76:1: note: expected ‘char *’ but argument is of type ‘int8_t *’

grub_verify_string (char *str, enum grub_verify_string_type type);

^

loader/i386/xen.c: In function ‘grub_cmd_module’:

loader/i386/xen.c:914:10: error: too few arguments to function ‘grub_create_loader_cmdline’

          get_virtual_current_address (ch), cmdline_len);

          ^

In file included from loader/i386/xen.c:38:0:

../include/grub/lib/cmdline.h:29:12: note: declared here

grub_err_t grub_create_loader_cmdline (int argc, char *argv[], char *buf,

            ^

cc1: all warnings being treated as errors

make[3]: *** [loader/i386/linux_module-xen.o] Error 1

make[3]: *** Waiting for unfinished jobs....

mv -f lib/.deps-core/linux_module-cmdline.Tpo lib/.deps-core/linux_module-cmdline.Po

mv -f loader/.deps-core/macho_module-lzss.Tpo loader/.deps-core/macho_module-lzss.Po

mv -f kern/.deps-core/elf_module-elf.Tpo kern/.deps-core/elf_module-elf.Po

mv -f loader/.deps-core/macho_module-macho.Tpo loader/.deps-core/macho_module-macho.Po

mv -f loader/.deps-core/linux_module-linux.Tpo loader/.deps-core/linux_module-linux.Po

mv -f gfxmenu/.deps-core/gfxmenu_module-gui_list.Tpo gfxmenu/.deps-core/gfxmenu_module-gui_list.Po

mv -f lib/.deps-core/crypto_module-crypto.Tpo lib/.deps-core/crypto_module-crypto.Po

mv -f loader/.deps-core/macho_module-macho32.Tpo loader/.deps-core/macho_module-macho32.Po

mv -f loader/.deps-core/macho_module-macho64.Tpo loader/.deps-core/macho_module-macho64.Po

mv -f normal/.deps-core/normal_module-main.Tpo normal/.deps-core/normal_module-main.Po

mv -f normal/.deps-core/normal_module-cmdline.Tpo normal/.deps-core/normal_module-cmdline.Po

mv -f io/.deps-core/gzio_module-gzio.Tpo io/.deps-core/gzio_module-gzio.Po

mv -f lib/.deps-core/relocator_module-relocator.Tpo lib/.deps-core/relocator_module-relocator.Po

mv -f fs/zfs/.deps-core/zfs_module-zfs.Tpo fs/zfs/.deps-core/zfs_module-zfs.Po

mv -f gnulib/.deps-core/regexp_module-regex.Tpo gnulib/.deps-core/regexp_module-regex.Po

make[3]: Leaving directory `/home/fan/grub/grub-core'

make[2]: *** [all] Error 2

make[2]: Leaving directory `/home/fan/grub/grub-core'

make[1]: *** [all-recursive] Error 1

make[1]: Leaving directory `/home/fan/grub'

make: *** [all] Error 2

 

 

 

Thanks,

Fan

 

 

 

From: Chen, Farrah
Sent: Monday, November 26, 2018 1:51 PM
To: bug-grub@xxxxxxx; lee.jones@xxxxxxxxxx
Cc: 'xen-devel@xxxxxxxxxxxxxxxxxxxx' <xen-devel@xxxxxxxxxxxxxxxxxxxx>; Hao, Xudong <xudong.hao@xxxxxxxxx>
Subject: Make grub error "too few arguments" with xen

 

Hi,

 

When I make grub with xen using the latest commit: e8b37e2c8de7570ca9a6c7ba874762d8c4ba9373,  I met error “too few arguments to function grub_create_loader_cmdline()”.

I saw the following commit tried to fix this error, but we still met such error with the latest commit e8b37e2c8de7:

commit 25e35377a84779ceeb350aa530e5adde287f6eb6

Author: Lee Jones <lee.jones@xxxxxxxxxx>

Date:   Tue Nov 20 10:45:04 2018 +0000

 

    arm64/xen: Fix too few arguments to function grub_create_loader_cmdline()

 

    Without this fix, building xen_boot.c omits:

 

    loader/arm64/xen_boot.c: In function ‘xen_boot_binary_load’:

    loader/arm64/xen_boot.c:370:7: error: too few arguments to function ‘grub_create_loader_cmdline’

           grub_create_loader_cmdline (argc - 1, argv + 1, binary->cmdline,

           ^~~~~~~~~~~~~~~~~~~~~~~~~~

    In file included from loader/arm64/xen_boot.c:36:0:

    ../include/grub/lib/cmdline.h:29:12: note: declared here

     grub_err_t grub_create_loader_cmdline (int argc, char *argv[], char *buf,

 

    Signed-off-by: Lee Jones <lee.jones@xxxxxxxxxx>

    Reviewed-by: Julien Grall <julien.grall@xxxxxxx>

    Reviewed-by: Daniel Kiper <daniel.kiper@xxxxxxxxxx>

 

 

Details as below:

 

………

cd grub

./autogen.sh

./configure --target=amd64 --with-platform=xen --prefix=${PWD}/../pvgrub2

make

 

………

loader/i386/xen.c: In function ‘grub_cmd_xen’:

loader/i386/xen.c:650:10: error: too few arguments to function ‘grub_create_loader_cmdline’

          sizeof (xen_state.next_start.cmd_line) - 1);

          ^

In file included from loader/i386/xen.c:38:0:

../include/grub/lib/cmdline.h:29:12: note: declared here

grub_err_t grub_create_loader_cmdline (int argc, char *argv[], char *buf,

            ^

loader/i386/xen.c:651:3: error: pointer targets in passing argument 1 of ‘grub_verify_string’ differ in signedness [-Werror=pointer-sign]

   err = grub_verify_string (xen_state.next_start.cmd_line, GRUB_VERIFY_MODULE_CMDLINE);

   ^

In file included from ../include/grub/lib/cmdline.h:24:0,

                 from loader/i386/xen.c:38:

../include/grub/verify.h:81:1: note: expected ‘char *’ but argument is of type ‘int8_t *’

grub_verify_string (char *str, enum grub_verify_string_type type);

^

loader/i386/xen.c: In function ‘grub_cmd_module’:

loader/i386/xen.c:914:10: error: too few arguments to function ‘grub_create_loader_cmdline’

          get_virtual_current_address (ch), cmdline_len);

          ^

In file included from loader/i386/xen.c:38:0:

../include/grub/lib/cmdline.h:29:12: note: declared here

grub_err_t grub_create_loader_cmdline (int argc, char *argv[], char *buf,

            ^

cc1: all warnings being treated as errors

make[3]: *** [loader/i386/linux_module-xen.o] Error 1

make[3]: Leaving directory `/home/build/xen_build/data/xen/xen-20181126131613/grub/grub-core'

make[2]: *** [all] Error 2

make[2]: Leaving directory `/home/build/xen_build/data/xen/xen-20181126131613/grub/grub-core'

make[1]: *** [all-recursive] Error 1

make[1]: Leaving directory `/home/build/xen_build/data/xen/xen-20181126131613/grub'

make: *** [all] Error 2

 

 

Thanks,

Fan

 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.