Fwd: The problem of grub-0.97 install
Adam Lackorzynski
adam at os.inf.tu-dresden.de
Sun Oct 14 21:36:37 CEST 2007
On Fri Oct 12, 2007 at 19:51:55 +0800, li fei wrote:
> When I compiled the grub, I met some problems. I patched the patches
> which I down from the
> http://os.inf.tu-dresden.de/~adam/grub/0.97/<http://os.inf.tu-dresden.de/%7Eadam/grub/0.97/>
> .
> I patched the patches from the grub-0.97-os.1.diff to the
> grub-0.97-grub-0.97-os.5.diff, and I found they all have mistakes, the error
> from the grub-0.97-os.2.diff to the grub-0.97-os.5 were the same.Below are
> the errors:
>
> pre_stage2_exec-bios.o : In function `get_cdinfo':
> /home/l4/Desktop/grub-0.97/stage2/bios.c:179: undefined reference to
> `__stack_chk_fail'
> pre_stage2_exec-bios.o: In function `get_diskinfo':
> /home/l4/Desktop/grub- 0.97/stage2/bios.c:317: undefined reference to
> `__stack_chk_fail'
> pre_stage2_exec-boot.o: In function `load_image':
> /home/l4/Desktop/grub-0.97/stage2/boot.c:759: undefined reference to
> `__stack_chk_fail'
> pre_stage2_exec-builtins.o: In function `blocklist_func':
> /home/l4/Desktop/grub-0.97/stage2/builtins.c:224: undefined reference to
> `__stack_chk_fail'
> pre_stage2_exec-builtins.o: In function `embed_func':
> /home/l4/Desktop/grub-0.97/stage2/builtins.c:1191: undefined reference
> to `__stack_chk_fail'
> pre_stage2_exec-builtins.o:/home/l4/Desktop/grub-0.97/stage2/builtins.c:1350:
> more undefined references to `__stack_chk_fail' follow
>
> And the error when I patched the grub-0.97-os.1.diff is different. The
> error is below:
>
>
> builtins.c: In function 'vbeset_func':
> builtins.c :4891: warning: pointer targets in passing argument 1 of
> 'get_vbe_pmif' differ in signedness
> builtins.c:4891: warning: pointer targets in passing argument 2 of
> 'get_vbe_pmif' differ in signedness
> builtins.c: In function 'toggle_func':
> builtins.c:5463: error: invalid storage class for function 'process_var'
> builtins.c:5463: warning: no previous prototype for 'process_var'
> builtins.c:5523: error: invalid storage class for function 'process_block'
> builtins.c:5523: warning: no previous prototype for 'process_block'
> builtins.c: In function 'toggle_trigger_init':
> builtins.c:5744: error: invalid storage class for function 'detect_vmware'
> builtins.c:5744: warning: no previous prototype for 'detect_vmware'
> make[2]: *** [pre_stage2_exec- builtins.o] Error 1
> make[2]: Leaving directory `/home/l4/grub-0.97/stage2'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/home/l4/grub-0.97'
> make: *** [all] Error 2
>
> I compiled the grub under the ubuntu 7.04 environment, using the
> gcc-4.1.2and g++-
> 4.1.2.
And that's the problem. Grub up to including os.5 cannot be compiled
with gcc4, you have to use gcc3 and then it works.
I have released an os.6 patch by now which also works with gcc4. For the
stack protector thing I think you need to add -fno-stack-protector to
CFLAGS. It could work then.
Adam
--
Adam adam at os.inf.tu-dresden.de
Lackorzynski http://os.inf.tu-dresden.de/~adam/
More information about the l4-hackers
mailing list