Bug 6411

Summary: guile: do_compile failed when DEBUG_BUILD (ICE)
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Robert Yang <liezhi.yang>
Component: coreAssignee: Hongxu Jia <hongxu.jia>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: mark.hatle, meta.mr.watcher, meta.watcher, richard.purdie
Version: 1.7   
Target Milestone: 1.7 M3   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Robert Yang 2014-06-06 12:50:19 UTC
Add:
MACHINE = "qemux86-64"
DEBUG_BUILD = "1"

to local.conf, and optionally add:

require conf/multilib.conf
MULTILIBS = "multilib:lib32"
DEFAULTTUNE_virtclass-multilib-lib32 = "x86"

$ bitbake guile

../x86_64-poky-linux-libtool  --tag=CC   --mode=compile x86_64-poky-linux-gcc  -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse --sysroot=/buildarea/lyang1/testdebug/tmp/sysroots/qemux86-64 -DHAVE_CONFIG_H   -DBUILDING_LIBGUILE=1 -I/buildarea/lyang1/testdebug/tmp/work/core2-64-poky-linux/guile/2.0.11-r0/guile-2.0.11 -I.. -I/buildarea/lyang1/testdebug/tmp/work/core2-64-poky-linux/guile/2.0.11-r0/guile-2.0.11/lib -I../lib -I/buildarea/lyang1/testdebug/tmp/sysroots/qemux86-64/usr/lib64/libffi-3.1/include  -I/buildarea/lyang1/testdebug/tmp/work/core2-64-poky-linux/guile/2.0.11-r0/guile-2.0.11  -pthread -Wall -Wmissing-prototypes -Wdeclaration-after-statement -Wpointer-arith -Wswitch-enum -fno-strict-aliasing -fwrapv -fvisibility=hidden -O -fno-omit-frame-pointer -g -feliminate-unused-debug-types -pipe -c -o libguile_2.0_la-vm.lo `test -f 'vm.c' || echo '/buildarea/lyang1/testdebug/tmp/work/core2-64-poky-linux/guile/2.0.11-r0/guile-2.0.11/libguile/'`vm.c
x86_64-poky-linux-libtool: compile:  x86_64-poky-linux-gcc -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse --sysroot=/buildarea/lyang1/testdebug/tmp/sysroots/qemux86-64 -DHAVE_CONFIG_H -DBUILDING_LIBGUILE=1 -I/buildarea/lyang1/testdebug/tmp/work/core2-64-poky-linux/guile/2.0.11-r0/guile-2.0.11 -I.. -I/buildarea/lyang1/testdebug/tmp/work/core2-64-poky-linux/guile/2.0.11-r0/guile-2.0.11/lib -I../lib -I/buildarea/lyang1/testdebug/tmp/sysroots/qemux86-64/usr/lib64/libffi-3.1/include -I/buildarea/lyang1/testdebug/tmp/work/core2-64-poky-linux/guile/2.0.11-r0/guile-2.0.11 -pthread -Wall -Wmissing-prototypes -Wdeclaration-after-statement -Wpointer-arith -Wswitch-enum -fno-strict-aliasing -fwrapv -fvisibility=hidden -O -fno-omit-frame-pointer -g -feliminate-unused-debug-types -pipe -c /buildarea/lyang1/testdebug/tmp/work/core2-64-poky-linux/guile/2.0.11-r0/guile-2.0.11/libguile/vm.c  -fPIC -DPIC -o .libs/libguile_2.0_la-vm.o

Unable to coalesce ssa_names 48 and 3476 which are marked as MUST COALESCE.
sp_48(ab) and  sp_3476(ab)
/buildarea/lyang1/testdebug/tmp/work/core2-64-poky-linux/guile/2.0.11-r0/guile-2.0.11/libguile/vm-engine.c: In function 'vm_debug_engine':
/buildarea/lyang1/testdebug/tmp/work/core2-64-poky-linux/guile/2.0.11-r0/guile-2.0.11/libguile/vm.c:673:19: internal compiler error: SSA corruption
 #define VM_NAME   vm_debug_engine
                   ^
/buildarea/lyang1/testdebug/tmp/work/core2-64-poky-linux/guile/2.0.11-r0/guile-2.0.11/libguile/vm-engine.c:39:1: note: in expansion of macro 'VM_NAME'
 VM_NAME (SCM vm, SCM program, SCM *argv, int nargs)
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
Comment 1 Hongxu Jia 2014-08-24 04:42:56 UTC
Merged into master:

commit cf385a55873b0ef0935911dfa224694e08b4f559
Author: Hongxu Jia <hongxu.jia@windriver.com>
Date:   Mon Aug 11 10:23:46 2014 +0800

    guile: workaround ice ssa corruption while DEBUG_BUILD
    
    Add:
    MACHINE = "qemux86-64"
    DEBUG_BUILD = "1"
    to local.conf and there was a ssa corruption to build guile:
    ..
    Unable to coalesce ssa_names 48 and 3476 which are marked as MUST COALESCE.
    sp_48(ab) and  sp_3476(ab)
    guile-2.0.11/libguile/vm-engine.c: In function 'vm_debug_engine':
    guile-2.0.11/libguile/vm.c:673:19: internal compiler error: SSA corruption
     #define VM_NAME   vm_debug_engine
                       ^
    guile-2.0.11/libguile/vm-engine.c:39:1: note: in expansion of macro 'VM_NAME'
     VM_NAME (SCM vm, SCM program, SCM *argv, int nargs)
     ^
    Please submit a full bug report,
    with preprocessed source if appropriate.
    See <http://gcc.gnu.org/bugs.html> for instructions.
    ...
    
    Tweak libguile/vm-i-system.c to check the value of nshuf to workaround it.
    The tweak didn't change previous logic.
    
    [YOCTO #6411]
    
    (From OE-Core rev: 3470bbf4ae178479bd090d7191d6f0469f154b0d)