Hi, grub 0.96 currently cannot be compiled with gcc 4. Reproducible: Always Steps to Reproduce: 1. emerge grub Actual Results: (This is after running ebuild ... compile a second time to get shorter output:) [...] builtins.c: In function
Hi, grub 0.96 currently cannot be compiled with gcc 4. Reproducible: Always Steps to Reproduce: 1. emerge grub Actual Results: (This is after running ebuild ... compile a second time to get shorter output:) [...] builtins.c: In function blocklist_func: builtins.c:147: error: invalid storage class for function disk_read_blocklist_func builtins.c:147: warning: no previous prototype for disk_read_blocklist_func smp-imps.c:252: error: static declaration of imps_any_new_apics follows non-static declaration smp-imps.h:190: error: previous declaration of imps_any_new_apics was here smp-imps.c:256: error: static declaration of imps_enabled follows non-static declaration smp-imps.h:196: error: previous declaration of imps_enabled was here smp-imps.c:257: error: static declaration of imps_num_cpus follows non-static declaration smp-imps.h:206: error: previous declaration of imps_num_cpus was here smp-imps.c:258: error: static declaration of imps_lapic_addr follows non-static declaration smp-imps.h:201: error: previous declaration of imps_lapic_addr was here smp-imps.c:259: error: static declaration of imps_cpu_apic_map follows non-static declaration smp-imps.h:211: error: previous declaration of imps_cpu_apic_map was here smp-imps.c:260: error: static declaration of imps_apic_cpu_map follows non-static declaration smp-imps.h:212: error: previous declaration of imps_apic_cpu_map was here builtins.c: In function color_func: builtins.c:594: error: invalid storage class for function color_number builtins.c:594: warning: no previous prototype for color_number make[2]: *** [pre_stage2_exec-smp-imps.o] Error 1 make[2]: *** Waiting for unfinished jobs.... builtins.c: In function install_func: builtins.c:1911: error: invalid storage class for function disk_read_savesect_func builtins.c:1911: warning: no previous prototype for disk_read_savesect_func builtins.c:1927: error: invalid storage class for function disk_read_blocklist_func builtins.c:1927: warning: no previous prototype for disk_read_blocklist_func builtins.c: In function setkey_func: builtins.c:3746: error: invalid storage class for function find_key_code builtins.c:3746: warning: no previous prototype for find_key_code builtins.c:3763: error: invalid storage class for function find_ascii_code builtins.c:3763: warning: no previous prototype for find_ascii_code make[2]: *** [pre_stage2_exec-builtins.o] Error 1 make[2]: Leaving directory `/mnt/hda3/tmp/portage/grub-0.96/work/grub-0.96/stage2' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/mnt/hda3/tmp/portage/grub-0.96/work/grub-0.96' make: *** [all] Error 2 !!! ERROR: sys-boot/grub-0.96 failed. !!! Function src_compile, Line 101, Exitcode 2 !!! making regular stuff !!! If you need support, post the topmost build error, NOT this status message. Expected Results: It should've compiled :) I created a patch that allows me to compile and install a working grub. I'll attach it. emerge info: Portage 2.0.51.19 (default-linux/x86/2004.3, gcc-4.0.0-beta20050305, glibc-2.3.4.20050125-r0, 2.6.11-cko1 i686) ================================================================= System uname: 2.6.11-cko1 i686 Intel(R) Pentium(R) M processor 1400MHz Gentoo Base System version 1.6.10 Python: dev-lang/python-2.4-r2 [2.4 (#2, Feb 8 2005, 19:57:57)] dev-lang/python: 2.4-r2 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.7.9-r1, 1.8.5-r3, 1.6.3, 1.5, 1.9.5 sys-devel/binutils: 2.15.92.0.2-r6 sys-devel/libtool: 1.5.10-r5 virtual/os-headers: 2.6.10 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-O2 -mcpu=i686 -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -mcpu=i686 -pipe" DISTDIR="/mnt/hda3/distfiles" FEATURES="autoconfig candy collision-protect confcache distlocks noauto notitles sandbox sfperms strict userpriv usersandbox" GENTOO_MIRRORS="http://ftp.easynet.nl/mirror/gentoo http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo" LANG="en_GB.UTF-8" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/mnt/hda3/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/etc/portage/overlay /etc/portage/overlay/fluidportage/tags/Dash-CVS" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="x86 X aalib accessibility acl aim alsa apache2 apm audiofile avi berkdb bidi bitmap-fonts boundschecking cdparanoia cdr cjk crypt cscope curl debugger dga divx4linux dvd dvdread emboss encode erandom fbcon flac flash foomaticdb fortran gdbm gif gnutls gpm gtk gtk2 hal imagemagick imlib ipv6 ithreads javascript jpeg lcms libcaca libwww live mad mmx mmx2 mng mozdevelop mozilla mozxmlterm mp3 mpc mpeg ncurses nethack nls no_wxgtk1 noplugin nptl objc offensive oggvorbis opengl oss pcre pdflib perlsuid pic png postgres psyco python quicktime readline real rtc samba sdl shaped slang speex spell sqlite sse sse2 ssl svg tcpd tetex theora threads tiff truetype truetype-fonts type1-fonts unicode userlocales vim-pager vim-with-x wmf wxwindows xgetdefault xml xml2 xprint xv xvid zlib linguas_en_GB linguas_en linguas_ja linguas_nl" Unset: ASFLAGS, CBUILD, CTARGET, LC_ALL, LDFLAGS
Created attachment 53279 [details, diff] grub-0.96-gcc4.patch I can boot my system without a problem with this. :)
Created attachment 53294 [details, diff] GCC4 compile fixes backported from CVS These are similar to the changes made in the other patch, but are the ones that are in grub's CVS. grub console comes up fine, rebooted and compiles with gcc 3.3, 3.4 and 4.0
Created attachment 53322 [details, diff] grub-0.96-gcc4.patch Hi, in your previous patch you included some unrelated modifications. I assume this was unintentional, so here's a patch without them. I don't see why the grub devs like auto, but if that's what they want, fair enough.
Talked to someone from base-system and got permission to add this patch. Fixed in cvs.
needs to be updated to work with 0.96-r1
Updated the patch.
+netboot still needs (minor) gcc4 patching. Are there some upstream?