Bug 6410 - puzzles: do_compile failed when DEBUG_BUILD
Summary: puzzles: do_compile failed when DEBUG_BUILD
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 1.7
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.7 M3
Assignee: Hongxu Jia
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2014-06-06 12:27 UTC by Robert Yang
Modified: 2014-08-24 04:44 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Yang 2014-06-06 12:27:42 UTC
Add:
MACHINE = "qemux86-64"
DEBUG_BUILD = "1" to conf/local.conf

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

$ bitbake puzzles


TARNAME=\"puzzles\" -DPACKAGE_VERSION=\"rNNNN\" -DPACKAGE_STRING=\"puzzles\ rNNNN\" -DPACKAGE_BUGREPORT=\"anakin@pobox.com\" -DPACKAGE_URL=\"\" -DPACKAGE=\"puzzles\" -DVERSION=\"rNNNN\" -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 '././mines.c' || echo './'`././mines.c
././gtk.c: In function 'configure_area':
././gtk.c:397:2: error: 'cr' may be used uninitialized in this function [-Werror=maybe-uninitialized]
  cairo_set_source_rgb(cr,
  ^
././gtk.c:384:14: note: 'cr' was declared here
     cairo_t *cr;

Note, it works well without debug build.
Comment 1 Hongxu Jia 2014-08-24 04:44:20 UTC
Merged into master:

commit ffb4933475e3214f103d9db98f6a71b60640b215
Author: Hongxu Jia <hongxu.jia@windriver.com>
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 'configure_area':
    ././gtk.c:397:2: error: 'cr' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      cairo_set_source_rgb(cr,
      ^
    ././gtk.c:384:14: note: 'cr' was declared here
         cairo_t *cr;
                  ^
    ././gtk.c: In function 'main':
    ././gtk.c:2911:6: error: 'error' may be used uninitialized in this function [-Werror=maybe-uninitialized]
          fprintf(stderr, "%s: %s\n", pname, error);
          ^
    cc1: all warnings being treated as errors
    ...
    
    Initialized the pointers 'cr' and 'error' with NULL
    
    [YOCTO #6410]
    
    (From OE-Core rev: 2281180499cf3bec5c7e75cb596725dab190f72c)