Bug 2554

Summary: autogen-native 5.12: do_compile failed on FC 17 64bit
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Robert Yang <liezhi.yang>
Component: devtools / tool chainAssignee: Robert Yang <liezhi.yang>
Status: VERIFIED FIXED QA Contact:
Severity: major    
Priority: High CC: jessica.zhang, liang.li2, meta.mr.watcher, meta.watcher, ross.burton, sgw, song.liu, zhenfeng.zhao
Version: 1.3   
Target Milestone: 1.3 M3   
Hardware: x86   
OS: Multiple   
Whiteboard: (QA testing completed) Done
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Robert Yang 2012-06-07 09:21:09 UTC
Seems a strange error on FC 17 64bit (MACHINE=qemux86):

| gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I.. -I../autoopts  -isystem/buildarea2/lyang1/testdeb2/tmp/sysroots/x86_64-linux/usr/include  -isystem/buildarea2/lyang1/testdeb2/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe -c gd.c
| ../x86_64-linux-libtool --tag=CC   --mode=link gcc -std=gnu99  -isystem/buildarea2/lyang1/testdeb2/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe  -L/buildarea2/lyang1/testdeb2/tmp/sysroots/x86_64-linux/usr/lib -L/buildarea2/lyang1/testdeb2/tmp/sysroots/x86_64-linux/lib -Wl,-rpath-link,/buildarea2/lyang1/testdeb2/tmp/sysroots/x86_64-linux/usr/lib -Wl,-rpath-link,/buildarea2/lyang1/testdeb2/tmp/sysroots/x86_64-linux/lib -Wl,-rpath,/buildarea2/lyang1/testdeb2/tmp/sysroots/x86_64-linux/usr/lib -Wl,-rpath,/buildarea2/lyang1/testdeb2/tmp/sysroots/x86_64-linux/lib -Wl,-O1 -o getdefs  gd.o ../autoopts/libopts.la -lm -ldl
| x86_64-linux-libtool: link: gcc -std=gnu99 -isystem/buildarea2/lyang1/testdeb2/tmp/sysroots/x86_64-lERROR: Function failed: do_compile (see /buildarea2/lyang1/testdeb2/tmp/work/x86_64-linux/autogen-native-5.12-r2/temp/log.do_compile.20319 for further information)
| inux/usr/include -O2 -pipe -Wl,-rpath-link -Wl,/buildarea2/lyang1/testdeb2/tmp/sysroots/x86_64-linux/usr/lib -Wl,-rpath-link -Wl,/buildarea2/lyang1/testdeb2/tmp/sysroots/x86_64-linux/lib -Wl,-rpath -Wl,/buildarea2/lyang1/testdeb2/tmp/sysroots/x86_64-linux/usr/lib -Wl,-rpath -Wl,/buildarea2/lyang1/testdeb2/tmp/sysroots/x86_64-linux/lib -Wl,-O1 -o .libs/getdefs gd.o  -L/buildarea2/lyang1/testdeb2/tmp/sysroots/x86_64-linux/usr/lib -L/buildarea2/lyang1/testdeb2/tmp/sysroots/x86_64-linux/lib ../autoopts/.libs/libopts.so -lm -ldl -Wl,-rpath -Wl,/buildarea2/lyang1/testdeb2/tmp/sysroots/x86_64-linux/usr/lib
| make[4]: Leaving directory `/buildarea2/lyang1/testdeb2/tmp/work/x86_64-linux/autogen-native-5.12-r2/autogen-5.12/getdefs'
| Re-building stamp-man
| /buildarea2/lyang1/testdeb2/tmp/work/x86_64-linux/autogen-native-5.12-r2/autogen-5.12/agen5/autogen -L/buildarea2/lyang1/testdeb2/tmp/work/x86_64-linux/autogen-native-5.12-r2/autogen-5.12/autoopts/tpl -L/buildarea2/lyang1/testdeb2/tmp/work/x86_64-linux/autogen-native-5.12-r2/autogen-5.12/autoopts/tpl -MFstamp-man -Tagman-cmd -DMAN_SECTION=1 ./opts.def
| ccache: failed to create /dev/null/.ccache (Not a directory)nbootstrap failure:  trapped exit signal
| make[3]: *** [stamp-man] Killed
| make[3]: *** Deleting file `stamp-man'
| make[3]: Leaving directory `/buildarea2/lyang1/testdeb2/tmp/work/x86_64-linux/autogen-native-5.12-r2/autogen-5.12/agen5'
| make[2]: *** [all-recursive] Error 1
| make[2]: Leaving directory `/buildarea2/lyang1/testdeb2/tmp/work/x86_64-linux/autogen-native-5.12-r2/autogen-5.12/agen5'
| make[1]: *** [all-recursive] Error 1
| make[1]: Leaving directory `/buildarea2/lyang1/testdeb2/tmp/work/x86_64-linux/autogen-native-5.12-r2/autogen-5.12'
| make: *** [all] Error 2
| ERROR: oe_runmake failed
NOTE: package autogen-native-5.12-r2: task do_compile: Failed
ERROR: Task 7 (/buildarea2/lyang1/poky/meta/recipes-devtools/autogen/autogen-native_5.12.bb, do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 160 tasks of which 155 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  /buildarea2/lyang1/poky/meta/recipes-devtools/autogen/autogen-native_5.12.bb, do_compile
Comment 1 Ross Burton 2012-06-07 16:07:50 UTC
I'm seeing this too.  The quick fix is to remove ccache from your build machine.

The problem appears to be that autogen is setting HOME=/dev/null when configuring itself (no idea why...).  ccache doesn't handle this very well, so it dramatically breaks.
Comment 3 liang li 2012-07-05 06:46:19 UTC
run "bitbake autogen-native" ,no such error:
NOTE: Running task 160 of 166 (ID: 6, /buildarea/poky.ubuntu.new/meta/recipes-devtools/autogen/autogen-native_5.12.bb, do_compile)
NOTE: package autogen-native-5.12-r2: task do_compile: Started
NOTE: package autogen-native-5.12-r2: task do_compile: Succeeded
NOTE: Running task 161 of 166 (ID: 2, /buildarea/poky.ubuntu.new/meta/recipes-devtools/autogen/autogen-native_5.12.bb, do_install)
...
NOTE: Running noexec task 166 of 166 (ID: 9, /buildarea/poky.ubuntu.new/meta/recipes-devtools/autogen/autogen-native_5.12.bb, do_build)
NOTE: Tasks Summary: Attempted 166 tasks of which 157 didn't need to be rerun and all succeeded.

test env: Fedora 17 x86_64
git info: 3051f3644496ab570f3c6fb8f5def9d5843b1508
git branch: poky/master