[OE-core] Robert Yang : perf: fix for rebuilding

Martin Jansa martin.jansa at gmail.com
Thu Sep 10 16:05:57 UTC 2015


On Wed, Sep 02, 2015 at 06:00:35PM +0200, Martin Jansa wrote:
> I'm still seeing issues when perf is rebuilt
> 
> The original issue was:
> OSError: [Errno 2] No such file or directory: 'BUILD/work/qemux86-webos-linux/perf/1.0-r9/perf-1.0'
> 
> as described here:
> http://patches.openembedded.org/patch/94719/
> 
> First part of fix is now backported to dizzy:
> commit 40aeb23c427e0c56f7073fc54ea63bf0eabbe092
> Author: Robert Yang <liezhi.yang at windriver.com>
> Date:   Wed Mar 11 01:35:38 2015 -0700
> 
>     license.bbclass: set dirs for do_populate_lic_setscene
> 
> but perf is still failing in some builds with the same error when
> do_configure and do_populate_lic are executed at the same time:
> 
> NOTE: recipe perf-1.0-r9: task do_configure: Started
> NOTE: recipe perf-1.0-r9: task do_populate_lic: Started
> ERROR: Build of do_populate_lic failed
> ERROR: Traceback (most recent call last):
>   File "bitbake/lib/bb/build.py", line 497, in exec_task
>     return _exec_task(fn, task, d, quieterr)
>   File "bitbake/lib/bb/build.py", line 440, in _exec_task
>     exec_func(func, localdata)
>   File "bitbake/lib/bb/build.py", line 212, in exec_func
>     exec_func_python(func, d, runfile, cwd=adir)
>   File "bitbake/lib/bb/build.py", line 237, in exec_func_python
>     os.chdir(cwd)
> OSError: [Errno 2] No such file or directory: '....../perf/1.0-r9/perf-1.0'
> 
> NOTE: recipe perf-1.0-r9: task do_populate_lic: Failed
> ERROR: Task 3826 (../oe-core/meta/recipes-kernel/perf/perf.bb, do_populate_lic) failed with exit code '1'
> NOTE: recipe perf-1.0-r9: task do_configure: Succeeded
> 
> So is there some 2nd/3rd part of this fix or is it broken in master?
> 
> I haven't found any other commit related to this perf configure or
> populate_lic in master and fido.

It's still broken in master.

Easy way to reproduce this is:
OE qemux86@ ~/build/oe-core $ for i in `seq -w 1 100`; do bitbake -c cleansstate perf; bitbake -c build perf | tee log.perf.$i; done

On slow machine I got first failure on 60th iteration, on
much faster machine I got 4 failures in first 20 iterations.

NOTE: recipe perf-1.0-r9: task do_configure: Started
NOTE: recipe perf-1.0-r9: task do_populate_lic: Started
ERROR: Function failed: do_configure (log file is located at /OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/perf/1.0-r9/temp/log.do_configure.10700)
ERROR: Logfile of failure stored in: /OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/perf/1.0-r9/temp/log.do_configure.10700
Log data follows:
| DEBUG: Executing python function sysroot_cleansstate
| DEBUG: Python function sysroot_cleansstate finished
| DEBUG: Executing shell function do_configure
| mkdir: cannot create directory '/OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/perf/1.0-r9/perf-1.0/': File exists
| WARNING: /OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/perf/1.0-r9/temp/run.do_configure.10700:1 exit 1 from
|   mkdir /OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/perf/1.0-r9/perf-1.0/
| ERROR: Function failed: do_configure (log file is located at /OE/build/oe-core/tmp-glibc/work/qemux86-oe-linux/perf/1.0-r9/temp/log.do_configure.10700)
NOTE: recipe perf-1.0-r9: task do_configure: Failed
ERROR: Task 5 (/OE/build/oe-core/openembedded-core/meta/recipes-kernel/perf/perf.bb, do_configure) failed with exit code '1'
NOTE: recipe perf-1.0-r9: task do_populate_lic: Succeeded
NOTE: Tasks Summary: Attempted 833 tasks of which 828 didn't need to be rerun and 1 failed.

Can you please fix it properly instead of removing whole ${B}?

do_configure_prepend () {
    # Fix for rebuilding
    rm -rf ${B}/
    mkdir ${B}/
...

I wish there is easier way to undo this commit in .bbappend, we very
rarely rebuild perf in the same build directory, but too often we see
normal clean builds failing in perf do_configure or do_populate_lic tasks :/.

Regards and thanks for feedback (it's broken for 8 months and no reply
after it was reported 3 months ago).

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20150910/0a30e13b/attachment-0002.sig>


More information about the Openembedded-core mailing list