bugGNU GRUB - Bugs: bug #25220, Unbootable Grub2 on Gentoo with...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #25220: Unbootable Grub2 on Gentoo with lots of compiler warnings

Submitter:  Roger <rogerx>
Submitted:  Wed 31 Dec 2008 10:29:23 PM UTC
   
 
Category:  Compilation Severity:  Major
Priority:  5 - Normal Item Group:  None
Status:  Fixed Privacy:  Public
Assigned to:  None Originator Name: 
Open/Closed:  Closed Release:  Bazaar - trunk
Release:  svn revision 1935 Reproducibility:  Every Time
Planned Release:  None

Jump to the original submission

Sat 16 Oct 2010 10:50:07 PM UTC, comment #8: 

IF I understand last message correctly, it's confirmed to be fixed, just nobody updated the status. Doing so.

Vladimir Serbinenko <phcoder>
Group administrator
Mon 05 Jan 2009 09:27:22 AM UTC, comment #7: 

Thanks for your answer Vesa.

Everything you said makes sense to me and I've forwarded the comment and a bug url to the Gentoo Portage maintainer.

Thanks for your concern for warnings (ie. warning: implicit declaration of function).

(btw, using gcc-4.1.2)

We've added a grub-9999 (svn) version to the Gentoo Portage tree.

Roger <rogerx>
Sun 04 Jan 2009 01:54:50 PM UTC, comment #6: 

Due to bug in savannah this is a test to see if bug tracker emails are generated properly. Please check tracker for comments.

Vesa Jääskeläinen <chaac>
Group Member
Sun 04 Jan 2009 11:06:12 AM UTC, comment #5: 

Disucssion of the executable stack issue can be found on mailing list archives and on Wiki page you already found. Issue is as is.

Warnings however should be fixed.

There are no such reports from elsewhere that there is compilation bug in GRUB 2 so it is somehow related to your system/distribution.

Stripping should not be done to binaries as it removes all dynamic loader name references and thus GRUB 2 cannot load modules.

Vesa Jääskeläinen <chaac>
Group Member
Sun 04 Jan 2009 12:17:36 AM UTC, comment #4: 

Spanky's states this non-working grub is an upstream bug.  See:
http://bugs.gentoo.org/show_bug.cgi?id=231935

I've already reviewed:
http://grub.enbug.org/NestedFunctions

This is putting me into circles.  I'm taking a break from this for awhile.

Roger <rogerx>
Thu 01 Jan 2009 11:38:10 PM UTC, comment #3: 

Would be nice to change the topic to something more approriate as, "Unbootable Grub2 with lots of compiler warnings"

  • QA Notice: The following files contain executable stacks
  •  Files with executable stacks will not work properly (or at all!)
  •  on some architectures/operating systems.  A bug should be filed
  •  at http://bugs.gentoo.org/ to make sure the file is fixed.
  •  For more information, see http://hardened.gentoo.org/gnu-stack.xml
  •  Please include the following list of files in your report:
  • RWX --- --- sbin/grub-probe-9999
  • RWX --- --- sbin/grub-setup-9999


To reproduce this warning:
$ scanelf -qe /sbin/grub*

In the meantime, I'm also filing on bugs.gentoo.org.

Roger <rogerx>
Thu 01 Jan 2009 11:28:54 PM UTC, comment #2: 

According to the following bug, people were getting an unbootable grub after stripping binaries:
http://bugs.gentoo.org/show_bug.cgi?id=231935

However, I also found during the course of debugging, from using the following page describing Executable Stacks (ie trampoline warnings), I found using "append-ldflags -Wl,-z,noexecstack" and then stripping provided a successfully booting grub2 install (ie. grub-setup /dev/sda).

Causes of/ Fixes for executable stack markings
http://www.gentoo.org/proj/en/hardened/gnu-stack.xml

(However, package maintainers believe leaving things unstripped is safer.)

The only prominent warning, after adding ldflags, is:
commands/lsmmap.c:36: warning: implicit declaration of function 'grub_machine_mmap_iterate'

Roger <rogerx>
Wed 31 Dec 2008 10:35:07 PM UTC, comment #1: 

Additional Info: For some reason, grub2 will not boot (using /sbin/grub-setup /dev/sda) after stripping (after compiling).

Since I'm not setup for debugging grub, I cannot further test to see which warning might be causing this problem.  I can only guess, implicit declaration & executable stack errors might be an issue.

Thoughts?  Should any of grub2's libraries or binaries not be stripped?  Or am I on the ball here with guessing this?

Roger <rogerx>
Wed 31 Dec 2008 10:29:23 PM UTC, original submission:  

util/elf/grub-mkimage.c:106: warning: <E2><80><98>memdisk_size<E2><80><99> may be used uninitialized

A lot of "warning: generating trampoline in object (requires executable stack)"! ie:
util/i386/pc/grub-setup.c:99: warning: generating trampoline in object (requires executable stack)

./include/grub/types.h:99:1: warning: "ULONG_MAX" redefined
In file included from util/grub-mkdevicemap.c:30:
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/limits.h:89:1: warning: this is the location of the previous definition
In file included from ./include/grub/util/misc.h:28,
                 from util/grub-mkdevicemap.c:32:
./include/grub/types.h:100:1: warning: "LONG_MAX" redefined
In file included from util/grub-mkdevicemap.c:30:
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/limits.h:85:1: warning: this is the location of the previous definition

commands/lsmmap.c: In function <E2><80><98>grub_cmd_lsmmap<E2><80><99>:
commands/lsmmap.c:36: warning: implicit declaration of function <E2><80><98>grub_machine_mmap_iterate<E2><80><99>

term/i386/pc/at_keyboard.c: In function <E2><80><98>grub_mod_fini<E2><80><99>:
term/i386/pc/at_keyboard.c:234: warning: passing argument 1 of <E2><80><98>grub_term_unregister_output<E2><80><99> from incompatible pointer type

term/i386/pc/vga_text.c:147: warning: function declaration isn<E2><80><99>t a prototype


Roger <rogerx>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by phcoder (Posted a comment)
  • -email is unavailable- added by chaac (Updated the item)
  • -email is unavailable- added by rogerx (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-10-16 phcoder StatusNone Fixed
        Open/ClosedOpen Closed
        ReleaseNone Bazaar - trunk
    2009-01-04 chaac PrivacyPublic Public
    2009-01-04 chaac PrivacyPublic Public
        SummaryLots of Grub2 Compiler Warnings Unbootable Grub2 on Gentoo with lots of compiler warnings

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code