Hi,

I figured out that I should add "--disable-werror" to the configure.

After this I was able to build successfully.

Thanks,
Naveen
________________________________
From: Naveen Chaudhary
Sent: Wednesday, August 19, 2020 3:54 PM
To: bug-grub@gnu.org <bug-grub@gnu.org>; grub-de...@gnu.org <grub-de...@gnu.org>
Subject: GRUB build failure

Hi,

Host : Ubuntu 18.04.3 LTS
GCC : gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0
uname : Linux vm 5.0.0-27-generic #28~18.04.1-Ubuntu SMP Thu Aug 22 03:00:32 
UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

I have clone the GRUB2 from https://github.com/rhboot/grub2 today and the HEAD 
points to e7b8856f8be3292afdb38d2e8c70ad8d62a61e10 (linux: Fix integer 
overflows in initrd size handling).

I followed the below steps to compile after cloning :
$ ./bootstrap
$ ./autogen.sh

$ export EFI_ARCH=x86_64

$ ./configure --with-platform=efi --target=$EFI_ARCH --program-prefix=""

$ make


I get the below error :


Making all in grub-core

make[2]: Entering directory '/home/naveen/Desktop/workspace/grub2/grub-core'
make  all-am
make[3]: Entering directory '/home/naveen/Desktop/workspace/grub2/grub-core'
gcc -std=gnu99 -Os -m64 -Wall -W -Wshadow -Wpointer-arith -Wundef 
-Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization 
-Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k 
-Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wmain 
-Wmissing-braces -Wmissing-format-attribute -Wmultichar -Wparentheses 
-Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wswitch -Wtrigraphs 
-Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter 
-Wunused-value  -Wunused-variable -Wwrite-strings -Wnested-externs 
-Wstrict-prototypes -g -Wredundant-decls -Wmissing-prototypes 
-Wmissing-declarations  -Wextra -Wattributes -Wendif-labels -Winit-self 
-Wint-to-pointer-cast -Winvalid-pch -Wmissing-field-initializers -Wnonnull 
-Woverflow -Wvla -Wpointer-to-int-cast -Wstrict-aliasing -Wvariadic-macros 
-Wvolatile-register-var -Wpointer-sign -Wmissing-include-dirs 
-Wmissing-prototypes -Wmissing-declarations -Wformat=2 -freg-struct-return 
-mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-3dnow -msoft-float 
-fno-dwarf2-cfi-asm -mno-stack-arg-probe -fno-asynchronous-unwind-tables 
-fno-unwind-tables -fno-ident -mcmodel=large -mno-red-zone -fno-stack-protector 
-Wtrampolines -Werror   -ffreestanding   -m64 -Wl,-melf_x86_64 
-Wl,--build-id=none  -nostdlib -Wl,-N -Wl,-r,-d   -o disk.module 
lib/disk_module-disk.o
/usr/bin/x86_64-linux-gnu-ld: -r and -pie may not be used together
collect2: error: ld returned 1 exit status
Makefile:27605: recipe for target 'disk.module' failed
make[3]: *** [disk.module] Error 1



Can someone please direct me what am I missing and why I get this error.


Regards,

Naveen

Reply via email to