<?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>6410</bug_id>
          
          <creation_ts>2014-06-06 12:27:42 +0000</creation_ts>
          <short_desc>puzzles: do_compile failed when DEBUG_BUILD</short_desc>
          <delta_ts>2014-08-24 04:44:20 +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.7</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></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.7 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Robert Yang">liezhi.yang</reporter>
          <assigned_to name="Hongxu Jia">hongxu.jia</assigned_to>
          <cc>mark.hatle</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>richard.purdie</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>43807</commentid>
    <comment_count>0</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2014-06-06 12:27:42 +0000</bug_when>
    <thetext>Add:
MACHINE = &quot;qemux86-64&quot;
DEBUG_BUILD = &quot;1&quot; to conf/local.conf

And (optionally) add:
require conf/multilib.conf
MULTILIBS = &quot;multilib:lib32&quot;
DEFAULTTUNE_virtclass-multilib-lib32 = &quot;x86&quot;
 to local.conf

$ bitbake puzzles


TARNAME=\&quot;puzzles\&quot; -DPACKAGE_VERSION=\&quot;rNNNN\&quot; -DPACKAGE_STRING=\&quot;puzzles\ rNNNN\&quot; -DPACKAGE_BUGREPORT=\&quot;anakin@pobox.com\&quot; -DPACKAGE_URL=\&quot;\&quot; -DPACKAGE=\&quot;puzzles\&quot; -DVERSION=\&quot;rNNNN\&quot; -I.  -I././ -I./icons/   -pthread -I/buildarea/lyang1/testdebug/tmp/sysroots/qemux86-64/usr/include/gtk-2.0 -I/buildarea/lyang1/testdebug/tmp/sysroots/qemux86-64/usr/lib64/gtk-2.0/include -I/buildarea/lyang1/testdebug/tmp/sysroots/qemux86-64/usr/include/pango-1.0 -I/buildarea/lyang1/testdebug/tmp/sysroots/qemux86-64/usr/include/atk-1.0 -I/buildarea/lyang1/testdebug/tmp/sysroots/qemux86-64/usr/include/cairo -I/buildarea/lyang1/testdebug/tmp/sysroots/qemux86-64/usr/include/pixman-1 -I/buildarea/lyang1/testdebug/tmp/sysroots/qemux86-64/usr/include/libpng16 -I/buildarea/lyang1/testdebug/tmp/sysroots/qemux86-64/usr/include/gdk-pixbuf-2.0 -I/buildarea/lyang1/testdebug/tmp/sysroots/qemux86-64/usr/include/libpng16 -I/buildarea/lyang1/testdebug/tmp/sysroots/qemux86-64/usr/include/pango-1.0 -I/buildarea/lyang1/testdebug/tmp/sysroots/qemux86-64/usr/include/harfbuzz -I/buildarea/lyang1/testdebug/tmp/sysroots/qemux86-64/usr/include/pango-1.0 -I/buildarea/lyang1/testdebug/tmp/sysroots/qemux86-64/usr/include/glib-2.0 -I/buildarea/lyang1/testdebug/tmp/sysroots/qemux86-64/usr/lib64/glib-2.0/include -I/buildarea/lyang1/testdebug/tmp/sysroots/qemux86-64/buildarea/lyang1/testdebug/tmp/sysroots/qemux86-64/usr/include/freetype2 -I/buildarea/lyang1/testdebug/tmp/sysroots/qemux86-64/usr/include/freetype2   -O -fno-omit-frame-pointer -g -feliminate-unused-debug-types -pipe -Wall -Werror -ansi -pedantic -c -o mines.o `test -f &apos;././mines.c&apos; || echo &apos;./&apos;`././mines.c
././gtk.c: In function &apos;configure_area&apos;:
././gtk.c:397:2: error: &apos;cr&apos; may be used uninitialized in this function [-Werror=maybe-uninitialized]
  cairo_set_source_rgb(cr,
  ^
././gtk.c:384:14: note: &apos;cr&apos; was declared here
     cairo_t *cr;

Note, it works well without debug build.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45231</commentid>
    <comment_count>1</comment_count>
    <who name="Hongxu Jia">hongxu.jia</who>
    <bug_when>2014-08-24 04:44:20 +0000</bug_when>
    <thetext>Merged into master:

commit ffb4933475e3214f103d9db98f6a71b60640b215
Author: Hongxu Jia &lt;hongxu.jia@windriver.com&gt;
Date:   Mon Aug 11 12:39:53 2014 +0800

    puzzles: fix do_compile failed when DEBUG_BUILD
    
    There were compiling failure with option -g -O
    ...
    ././gtk.c: In function &apos;configure_area&apos;:
    ././gtk.c:397:2: error: &apos;cr&apos; may be used uninitialized in this function [-Werror=maybe-uninitialized]
      cairo_set_source_rgb(cr,
      ^
    ././gtk.c:384:14: note: &apos;cr&apos; was declared here
         cairo_t *cr;
                  ^
    ././gtk.c: In function &apos;main&apos;:
    ././gtk.c:2911:6: error: &apos;error&apos; may be used uninitialized in this function [-Werror=maybe-uninitialized]
          fprintf(stderr, &quot;%s: %s\n&quot;, pname, error);
          ^
    cc1: all warnings being treated as errors
    ...
    
    Initialized the pointers &apos;cr&apos; and &apos;error&apos; with NULL
    
    [YOCTO #6410]
    
    (From OE-Core rev: 2281180499cf3bec5c7e75cb596725dab190f72c)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>