<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>2291</bug_id>
          
          <creation_ts>2012-04-13 08:59:21 +0000</creation_ts>
          <short_desc>grub 1.99: failed on FC17 x86_64</short_desc>
          <delta_ts>2012-04-14 13:32:29 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>core</component>
          <version>1.2</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>(1.2) patch review</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.2 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Robert Yang">liezhi.yang</reporter>
          <assigned_to name="Nitin Kamble">nitin.a.kamble</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>nitin.a.kamble</cc>
    
    <cc>sgw</cc>
    
    <cc>zhenfeng.zhao</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>20283</commentid>
    <comment_count>0</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2012-04-13 08:59:21 +0000</bug_when>
    <thetext>On Fedora FC17 x86_64:

bitbake grub, there was an error when build with gcc 4.7 (On Fedora 17 64bit):

    | fs/zfs/zfs.c: In function &apos;get_filesystem_dnode&apos;:
    | fs/zfs/zfs.c:1449:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
    ......
    cc1: all warnings being treated as errors
    
    While compare the compile command between gcc 4.4.4 and gcc 4.7.0, they
    are the same (both of them have -Wall and -Werror), it seems that gcc
    4.7.0 has changed its algorithm for the strict aliasing check, but I
    didn&apos;t find the related information from its release note.
    
    Add &quot;-fno-strict-aliasing&quot; to gcc&apos;s option would fix the problem, this
    would disable the optimization for strict-aliasing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20323</commentid>
    <comment_count>1</comment_count>
    <who name="Nitin Kamble">nitin.a.kamble</who>
    <bug_when>2012-04-13 16:07:13 +0000</bug_when>
    <thetext>I notice there are more errors for grub build on fedora 17 alpha

And Richard suggested to try fixing code instead of fixing the compilation options, and I am looking into it now.


| gcc -DHAVE_CONFIG_H -I. -I..  -Wall -W -I../include -I../include  -DGRUB_MACHINE_PCBIOS=1 -DGRUB_MACHINE=I386_PC -
nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/4.7.0/include -DGRUB_FILE=\&quot;gfxmenu/icon_manager.c\&quot; -I. -I. -I..
 -I.. -I../include -I../include     -O2 -pipe -g -feliminate-unused-debug-types -Wall -W -Wshadow -Wpointer-arith -W
missing-prototypes -Wundef -Wstrict-prototypes -g -falign-jumps=1 -falign-loops=1 -falign-functions=1 -mno-mmx -mno-
sse -mno-sse2 -mno-3dnow -fno-dwarf2-cfi-asm -m32 -fno-stack-protector -mno-stack-arg-probe -Werror -Wno-trampolines
   -mrtd -mregparm=3       -ffreestanding  -O2 -pipe -g -feliminate-unused-debug-types -c -o gfxmenu/gfxmenu_module-
icon_manager.o `test -f &apos;gfxmenu/icon_manager.c&apos; || echo &apos;./&apos;`gfxmenu/icon_manager.c
| fs/zfs/zfs.c: In function &apos;get_filesystem_dnode&apos;:
| fs/zfs/zfs.c:1449:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-ali
asing]
| fs/zfs/zfs.c:1449:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-ali
asing]
| fs/zfs/zfs.c: In function &apos;make_mdn&apos;:
| fs/zfs/zfs.c:1478:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-ali
asing]
| fs/zfs/zfs.c: In function &apos;dnode_get_fullpath&apos;:
| fs/zfs/zfs.c:1554:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
| fs/zfs/zfs.c:1554:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
| fs/zfs/zfs.c:1571:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
| fs/zfs/zfs.c:1571:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
| fs/zfs/zfs.c: In function &apos;grub_zfs_open&apos;:
| fs/zfs/zfs.c:2234:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
| fs/zfs/zfs.c:2234:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
| fs/zfs/zfs.c: In function &apos;fill_fs_info&apos;:
| fs/zfs/zfs.c:2362:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
| fs/zfs/zfs.c:2362:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
| fs/zfs/zfs.c:2395:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
| fs/zfs/zfs.c:2395:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
| fs/zfs/zfs.c: In function &apos;iterate_zap&apos;:
| fs/zfs/zfs.c:2420:5: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
| fs/zfs/zfs.c:2420:5: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
| fs/zfs/zfs.c: In function &apos;grub_zfs_dir&apos;:
| fs/zfs/zfs.c:2483:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
| fs/zfs/zfs.c:2483:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
| fs/zfs/zfs.c:2484:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
| fs/zfs/zfs.c:2484:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
| fs/zfs/zfs.c:2502:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
| fs/zfs/zfs.c:2502:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
| cc1: all warnings being treated as errors
| make[3]: *** [fs/zfs/zfs_module-zfs.o] Error 1
| make[3]: *** Waiting for unfinished jobs....
| fs/btrfs.c: In function &apos;grub_btrfs_read_logical&apos;:
| fs/btrfs.c:791:5: error: &apos;err&apos; may be used uninitialized in this function [-Werror=maybe-uninitialized]
| fs/btrfs.c:592:18: note: &apos;err&apos; was declared here
| cc1: all warnings being treated as errors
| make[3]: *** [fs/btrfs_module-btrfs.o] Error 1
| make[3]: Leaving directory `/home/nitin/builds/build0/tmp/work/i586-poky-ERROR: Function failed: do_compile (see /home/nitin/builds/build0/tmp/work/i586-poky-linux/grub-1.99-r3/temp/log.do_compile.2260 for further information)
| linux/grub-1.99-r3/grub-1.99/grub-core&apos;
| make[2]: *** [all] Error 2
| make[2]: Leaving directory `/home/nitin/builds/build0/tmp/work/i586-poky-linux/grub-1.99-r3/grub-1.99/grub-core&apos;
| make[1]: *** [all-recursive] Error 1
| make[1]: Leaving directory `/home/nitin/builds/build0/tmp/work/i586-poky-linux/grub-1.99-r3/grub-1.99&apos;
| make: *** [all] Error 2
| ERROR: oe_runmake failed
NOTE: package grub-1.99-r3: task do_compile: Failed
ERROR: Task 7 (/home/nitin/prj/poky.git/meta/recipes-bsp/grub/grub_1.99.bb, do_compile) failed with exit code &apos;1&apos;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20332</commentid>
    <comment_count>2</comment_count>
    <who name="Nitin Kamble">nitin.a.kamble</who>
    <bug_when>2012-04-13 18:11:46 +0000</bug_when>
    <thetext>Also noticed that target grub is built with distro gcc rather than target gcc. Hence this issue is present on fedora 17.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20342</commentid>
    <comment_count>3</comment_count>
    <who name="Nitin Kamble">nitin.a.kamble</who>
    <bug_when>2012-04-13 19:24:05 +0000</bug_when>
    <thetext>By using the gcc-cross rather than distro gcc, the problem gets fixed. I will post the commit to mailing list soon.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20353</commentid>
    <comment_count>4</comment_count>
    <who name="Nitin Kamble">nitin.a.kamble</who>
    <bug_when>2012-04-14 07:22:08 +0000</bug_when>
    <thetext>Now I am trying with this commit to fix the issue: but it is giving me these autoconf errors now.


| acinclude.m4:363: grub_CHECK_STACK_ARG_PROBE is expanded from...
| configure.ac:532: the top level
| conf/Makefile.common:43: subst $(srcdir: non-POSIX variable name
| conf/Makefile.common:43: (probably a GNU make extension)
| grub-core/Makefile.am:5:   `conf/Makefile.common&apos; included from here
| conf/Makefile.common:150: `pkglibdir&apos; is not a legitimate directory for `SCRIPTS&apos;
| grub-core/Makefile.am:5:   `conf/Makefile.common&apos; included from here
| conf/Makefile.common:140: `pkglibdir&apos; is not a legitimate directory for `DATA&apos;
| grub-core/Makefile.am:5:   `conf/Makefile.common&apos; included from here
| conf/Makefile.common:43: subst $(srcdir: non-POSIX variable name
| conf/Makefile.common:43: (probably a GNU make extension)
| Makefile.am:6:   `conf/Makefile.common&apos; included from here
| conf/Makefile.extra-dist:29: shell find $(top_srcdir: non-POSIX variable name
| conf/Makefile.extra-dist:29: (probably a GNU make extension)
| Makefile.am:7:   `conf/Makefile.extra-dist&apos; included from here
| conf/Makefile.extra-dist:30: shell find $(top_srcdir: non-POSIX variable name
| conf/Makefile.extra-dist:30: (probably a GNU make extension)
| Makefile.am:7:   `conf/Makefile.extra-dist&apos; included from here
| conf/Makefile.extra-dist:31: shell find $(top_srcdir: non-POSIX variable name
| conf/Makefile.extra-dist:31: (probably a GNU make extension)
| Makefile.am:7:   `conf/Makefile.extra-dist&apos; included from here
| conf/Makefile.extra-dist:32: shell find $(top_srcdir: non-POSIX variable name
| conf/Makefile.extra-dist:32: (probably a GNU make extension)
| Makefile.am:7:   `conf/Makefile.extra-dist&apos; included from here
| conf/Makefile.common:150: `pkglibdir&apos; is not a legitimate directory for `SCRIPTS&apos;
| Makefile.am:6:   `conf/Makefile.common&apos; included from here
| conf/Makefile.common:140: `pkglibdir&apos; is not a legitimate directory for `DATA&apos;
| Makefile.am:6:   `conf/Makefile.common&apos; included from here</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20372</commentid>
    <comment_count>5</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2012-04-14 13:31:47 +0000</bug_when>
    <thetext>Merged in master:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=53d629496f344d07e7ab261d789918cd80308b45</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20373</commentid>
    <comment_count>6</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2012-04-14 13:32:29 +0000</bug_when>
    <thetext>Merged in master:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=53d629496f344d07e7ab261d789918cd80308b45</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>