bugGNU GRUB - Bugs: bug #14874, gcc 4.02 optimization fails...

 
 

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

bug #14874: gcc 4.02 optimization fails buildins.c when filesystem was added to stage1_5_map

Submitter:  None
Submitted:  Thu 27 Oct 2005 09:07:36 AM UTC
   
 
Category:  Compilation Severity:  Major
Priority:  5 - Normal Item Group:  Software Error
Status:  None Privacy:  Public
Assigned to:  None Originator Name:  Gerhard Heift
Originator Email:  -email is unavailable- Open/Closed:  Closed
Release:  None Release:  0.97
Reproducibility:  Every Time Planned Release:  None

Sat 15 Dec 2007 09:01:38 PM UTC, comment #2: 

We've moved to GRUB 2 as a development platform. Please can you check if this bug still applies there, and if it does, reopen it?

Thanks

Robert Millan <robertmh>
Group administrator
Tue 21 Mar 2006 10:36:34 AM UTC, comment #1: 

Hi,

the problem is likely to be in the grub itself, I have the same symptoms for different filesystems, not only reiser4. I have debug grub a bit and found that the following patch solves the problem for me.

Please check the patch and consider to apply.

Thanks.

Vitaly Fertman <vitaly>
Thu 27 Oct 2005 09:07:36 AM UTC, original submission:  

I build an LFS and added Reiser4 Support to my kernel.
I patched grub with the reiser patch an build it with the GCC 4.0.2.

# ./configure --prefix=/usr && make && make install

When i wanted to install the new grub into my MBR by:

# grub
grub> root (hd0,1)
 Filesystem type is ext2fs, partition type 0x83

grub> setup (hd0)
 Checking if "/boot/grub/stage1" exists... yes
 Checking if "/boot/grub/stage2" exists... yes
 Checking if "/boot/grub/e2fs_stage1_5" exists... yes
 Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 23 sectors are embedded.
succeeded
 Running "install /boot/grub/stage1 (hd0) (hd0)1+23 p (hd0,1)/boot/grub/stage /boot/grub/menu.lst"... failed

Error 15: File not found.

grub>

I checked, where the install was build and found it in stage2/buildins.c, line 4020. So the part "/boot/grub/stage comes from "config_filename".
I added a few grub_printf("Debug: %s\n", config_filename); and noticed after rebuilding grub, that the variable changes somehow in line 4016, where the command sprint_device (installed_drive, installed_partition); is called.

Now i used a clean source-package an rebuild grub and everything worked, when I installed grub in the MBR. The only modification the reiser4-path did in stage2/buildins.c, was adding a filesystem to the "stage1_5_map" variable.
So i added a filesystem "foobar" to the map and rebuild grub. When I tried to install grub in the MBR the error happened again.

The next step was trying an older compiler, I used Knoppix 4.0 with gcc 3.3.4 and it works.
After this I tried to modified the CFLAGS. With -O0 or -O1 the installation worked, with -Os or -O2 not.

Anonymous

 

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

Attached Files
file #1476:  grub-0.97-strncat.patch added by vitaly (801B - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by robertmh (Posted a comment)
  •  

    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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-12-15 robertmh Open/ClosedOpen Closed
    2006-03-21 vitaly Attached File- Added grub-0.97-strncat.patch, #3510
    2005-10-27 None Carbon-Copy- Added mailing-list --AT-- gheift --PUNKT-- de

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code