Bug 2693 - Yocto BSP create via JSON file fails
Summary: Yocto BSP create via JSON file fails
Status: VERIFIED FIXED
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: 1.2.1
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.3 M4
Assignee: Tom Zanussi
QA Contact:
URL:
Whiteboard:
: 2967 3079 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-07-04 15:06 UTC by Laurentiu Serban
Modified: 2012-09-20 21:20 UTC (History)
7 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments
log do patch json (1.15 KB, application/octet-stream)
2012-07-04 15:06 UTC, Laurentiu Serban
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Laurentiu Serban 2012-07-04 15:06:47 UTC
Created attachment 623 [details]
log do patch json

Creating a BSP using JSON file fails.

Steps to reproduce:

1. A test.json file with the following content was created
{"kernel_choice":"linux-yocto_3.2","use_default_kernel":"n","keyboard":"y","qemuarch":"i386","smp":"y","touchscreen":"n","need_new_kbranch":"y","new_kbranch":"standard/default/base"}
2. The following command is run yocto-bsp create myqemux86 qemu -o myqemux86 -i test.json
3. local.conf is modified and myqemux86 MACHINE is set.

4 Run bitbake core-image-sato.

The following error is displayed:


NOTE: Running task 1784 of 4652 (ID: 548, virtual:native:/home/lserban/work/yocto/meta/recipes-core/glib-2.0/glib-2.0_2.30.3.bb, do_populate_sysroot)
ERROR: Function failed: do_patch (see /home/lserban/work/yocto/build/tmp/work/myqemux86-poky-linux/linux-yocto-3.2.18+git1+49f931bc294d5b6be60502bbd448cff5aa766235_1+8b8cfaaab2b8d79ac56e8c9a85bad9ae7bca399c-r1.1/temp/log.do_patch.10463 for further information)
ERROR: Logfile of failure stored in: /home/lserban/work/yocto/build/tmp/work/myqemux86-poky-linux/linux-yocto-3.2.18+git1+49f931bc294d5b6be60502bbd448cff5aa766235_1+8b8cfaaab2b8d79ac56e8c9a85bad9ae7bca399c-r1.1/temp/log.do_patch.10463
Log data follows:
| ERROR: Function failed: do_patch (see /home/lserban/work/yocto/build/tmp/work/myqemux86-poky-linux/linux-yocto-3.2.18+git1+49f931bc294d5b6be60502bbd448cff5aa766235_1+8b8cfaaab2b8d79ac56e8c9a85bad9ae7bca399c-r1.1/temp/log.do_patch.10463 for further information)
| checkpoint is already restored, nothing to do
| error: 'refs/heads/standard/default/base' exists; cannot create 'refs/heads/standard/default/base/myqemux86'
| fatal: Failed to lock ref for update: Not a directory
| warning: could not find (or was already included): features/logbuf/size-normal.scc
| warning: could not find (or was already included): user-patches.scc
| [INFO] validating against known patches  (myqemux86-base-meta)
| error: Your local changes to the following files would be overwritten by checkout:
|       Makefile
|       drivers/tty/serial/pch_uart.c
|       drivers/usb/host/pci-quirks.c
|       fs/namei.c
|       fs/nfs/super.c
|       fs/splice.c
|       include/linux/nfs_xdr.h
|       kernel/time/ntp.c
|       net/ipv4/arp.c
|       scripts/mod/modpost.c
| Please, commit your changes or stash them before you can switch branches.
| Aborting
| ERROR: could not checkout branch base
| ERROR. could not update git tree
| ERROR. Could not modify standard/default/base/myqemux86
NOTE: package linux-yocto-3.2.18+git1+49f931bc294d5b6be60502bbd448cff5aa766235_1+8b8cfaaab2b8d79ac56e8c9a85bad9ae7bca399c-r1.1: task do_patch: Failed
ERROR: Task 606 (/home/lserban/work/yocto/meta/recipes-kernel/linux/linux-yocto_3.2.bb, do_patch) failed with exit code '1'
Waiting for 6 running tasks to finish:

Attaching log
Comment 1 Tom Zanussi 2012-07-19 20:24:01 UTC
This is happening because 'base' doesn't get removed from standard/default/base.  Replacing standard/default/base with standard/default works in this case, but that shouldn't need to be done - this test case used to pass, not sure what broke it, but will look into it.
Comment 2 Alexandru Georgescu 2012-07-23 12:20:11 UTC
Hi,
I have a similar error when trying to compile qemu for ARM:

| Traceback (most recent call last):
|   File "util/setup.py", line 6, in <module>
|     from distutils.command.build_ext   import build_ext   as _build_ext
|   File "/home/alex/git/poky/build/tmp/sysroots/x86_64-linux/usr/lib/python2.7/distutils/command/build_ext.py", line 16, in <module>
|     from distutils.sysconfig import customize_compiler, get_python_version
|   File "/home/alex/git/poky/build/tmp/sysroots/x86_64-linux/usr/lib/python2.7/distutils/sysconfig.py", line 22, in <module>
|     PREFIX = os.path.normpath(sys.prefix).replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") )
| TypeError: expected a character buffer object
| cp: cannot stat `python_ext_build/lib/peERROR: Function failed: do_compile_perf (see /home/alex/git/poky/build/tmp/work/myqemuarm-poky-linux-gnueabi/linux-yocto-3.2.11+git1+49f931bc294d5b6be60502bbd448cff5aa766235_1+f4f8ba730e7783e09413872414d0a17c142c816d-r1.1/temp/log.do_compile_perf.16178 for further information)
| rf.so': No such file or directory
| make: *** [python/perf.so] Error 1
| make: Leaving directory `/home/alex/git/poky/build/tmp/work/myqemuarm-poky-linux-gnueabi/linux-yocto-3.2.11+git1+49f931bc294d5b6be60502bbd448cff5aa766235_1+f4f8ba730e7783e09413872414d0a17c142c816d-r1.1/linux/tools/perf'
| ERROR: oe_runmake failed
NOTE: package linux-yocto-3.2.11+git1+49f931bc294d5b6be60502bbd448cff5aa766235_1+f4f8ba730e7783e09413872414d0a17c142c816d-r1.1: task do_compile_perf: Failed
ERROR: Task 614 (/home/alex/git/poky/meta/recipes-kernel/linux/linux-yocto_3.2.bb, do_compile_perf) failed with exit code '1'
Waiting for 7 running tasks to finish:
0: perl-5.14.2-r6 do_compile (pid 2907)
1: gnome-keyring-2.32.1-r6 do_configure (pid 3290)
2: libcroco-0.6.3-r3 do_compile (pid 19533)
3: libsoup-2.4-2.38.1-r0 do_compile (pid 20229)
4: neon-0.29.6-r2 do_configure (pid 20268)
5: consolekit-0.4.5-r9 do_compile (pid 22715)
6: libglade-2.6.4-r3 do_package (pid 23612)
NOTE: package libcroco-0.6.3-r3: task do_compile: Succeeded
Waiting for 6 running tasks to finish:
0: perl-5.14.2-r6 do_compile (pid 2907)
1: gnome-keyring-2.32.1-r6 do_configure (pid 3290)
2: libsoup-2.4-2.38.1-r0 do_compile (pid 20229)
3: neon-0.29.6-r2 do_configure (pid 20268)
4: consolekit-0.4.5-r9 do_compile (pid 22715)
5: libglade-2.6.4-r3 do_package (pid 23612)
NOTE: package libglade-2.6.4-r3: task do_package: Succeeded
Waiting for 5 running tasks to finish:
0: perl-5.14.2-r6 do_compile (pid 2907)
1: gnome-keyring-2.32.1-r6 do_configure (pid 3290)
2: libsoup-2.4-2.38.1-r0 do_compile (pid 20229)
3: neon-0.29.6-r2 do_configure (pid 20268)
4: consolekit-0.4.5-r9 do_compile (pid 22715)
NOTE: package consolekit-0.4.5-r9: task do_compile: Succeeded
Waiting for 4 running tasks to finish:
0: perl-5.14.2-r6 do_compile (pid 2907)
1: gnome-keyring-2.32.1-r6 do_configure (pid 3290)
2: libsoup-2.4-2.38.1-r0 do_compile (pid 20229)
3: neon-0.29.6-r2 do_configure (pid 20268)
NOTE: package gnome-keyring-2.32.1-r6: task do_configure: Succeeded
Waiting for 3 running tasks to finish:
0: perl-5.14.2-r6 do_compile (pid 2907)
1: libsoup-2.4-2.38.1-r0 do_compile (pid 20229)
2: neon-0.29.6-r2 do_configure (pid 20268)
NOTE: package libsoup-2.4-2.38.1-r0: task do_compile: Succeeded
Waiting for 2 running tasks to finish:
0: perl-5.14.2-r6 do_compile (pid 2907)
1: neon-0.29.6-r2 do_configure (pid 20268)
NOTE: package neon-0.29.6-r2: task do_configure: Succeeded
Waiting for 1 running tasks to finish:
0: perl-5.14.2-r6 do_compile (pid 2907)
NOTE: package perl-5.14.2-r6: task do_compile: Succeeded
NOTE: Tasks Summary: Attempted 3587 tasks of which 1595 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  /home/alex/git/poky/meta/recipes-kernel/linux/linux-yocto_3.2.bb, do_compile_perf
Summary: There were 14 WARNING messages shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
alex@alex-pc:~/git/poky/build$
Comment 3 Laurentiu Serban 2012-07-30 21:19:48 UTC
This blocks 2559
Comment 4 Tom Zanussi 2012-07-30 22:20:23 UTC
(In reply to comment #2)
> Hi,
> I have a similar error when trying to compile qemu for ARM:
> 
> | Traceback (most recent call last):
> |   File "util/setup.py", line 6, in <module>
> |     from distutils.command.build_ext   import build_ext   as _build_ext
> |   File
> "/home/alex/git/poky/build/tmp/sysroots/x86_64-linux/usr/lib/python2.7/
> distutils/command/build_ext.py", line 16, in <module>
> |     from distutils.sysconfig import customize_compiler, get_python_version
> |   File
> "/home/alex/git/poky/build/tmp/sysroots/x86_64-linux/usr/lib/python2.7/
> distutils/sysconfig.py", line 22, in <module>
> |     PREFIX = os.path.normpath(sys.prefix).replace( os.getenv("BUILD_SYS"),
> os.getenv("HOST_SYS") )
> | TypeError: expected a character buffer object
> | cp: cannot stat `python_ext_build/lib/peERROR: Function failed:
> do_compile_perf (see
> /home/alex/git/poky/build/tmp/work/myqemuarm-poky-linux-gnueabi/linux-yocto-
> 3.2.
> 11+git1+49f931bc294d5b6be60502bbd448cff5aa766235_1+f4f8ba730e7783e09413872414
> d0a17c142c816d-r1.1/temp/log.do_compile_perf.16178 for further information)
> | rf.so': No such file or directory
> | make: *** [python/perf.so] Error 1
> | make: Leaving directory
> `/home/alex/git/poky/build/tmp/work/myqemuarm-poky-linux-gnueabi/linux-yocto-
> 3.2.
> 11+git1+49f931bc294d5b6be60502bbd448cff5aa766235_1+f4f8ba730e7783e09413872414
> d0a17c142c816d-r1.1/linux/tools/perf'
> | ERROR: oe_runmake failed
> NOTE: package
> linux-yocto-3.2.
> 11+git1+49f931bc294d5b6be60502bbd448cff5aa766235_1+f4f8ba730e7783e09413872414
> d0a17c142c816d-r1.1: task do_compile_perf: Failed
> ERROR: Task 614
> (/home/alex/git/poky/meta/recipes-kernel/linux/linux-yocto_3.2.bb,
> do_compile_perf) failed with exit code '1'
> Waiting for 7 running tasks to finish:
> 0: perl-5.14.2-r6 do_compile (pid 2907)
> 1: gnome-keyring-2.32.1-r6 do_configure (pid 3290)
> 2: libcroco-0.6.3-r3 do_compile (pid 19533)
> 3: libsoup-2.4-2.38.1-r0 do_compile (pid 20229)
> 4: neon-0.29.6-r2 do_configure (pid 20268)
> 5: consolekit-0.4.5-r9 do_compile (pid 22715)
> 6: libglade-2.6.4-r3 do_package (pid 23612)
> NOTE: package libcroco-0.6.3-r3: task do_compile: Succeeded
> Waiting for 6 running tasks to finish:
> 0: perl-5.14.2-r6 do_compile (pid 2907)
> 1: gnome-keyring-2.32.1-r6 do_configure (pid 3290)
> 2: libsoup-2.4-2.38.1-r0 do_compile (pid 20229)
> 3: neon-0.29.6-r2 do_configure (pid 20268)
> 4: consolekit-0.4.5-r9 do_compile (pid 22715)
> 5: libglade-2.6.4-r3 do_package (pid 23612)
> NOTE: package libglade-2.6.4-r3: task do_package: Succeeded
> Waiting for 5 running tasks to finish:
> 0: perl-5.14.2-r6 do_compile (pid 2907)
> 1: gnome-keyring-2.32.1-r6 do_configure (pid 3290)
> 2: libsoup-2.4-2.38.1-r0 do_compile (pid 20229)
> 3: neon-0.29.6-r2 do_configure (pid 20268)
> 4: consolekit-0.4.5-r9 do_compile (pid 22715)
> NOTE: package consolekit-0.4.5-r9: task do_compile: Succeeded
> Waiting for 4 running tasks to finish:
> 0: perl-5.14.2-r6 do_compile (pid 2907)
> 1: gnome-keyring-2.32.1-r6 do_configure (pid 3290)
> 2: libsoup-2.4-2.38.1-r0 do_compile (pid 20229)
> 3: neon-0.29.6-r2 do_configure (pid 20268)
> NOTE: package gnome-keyring-2.32.1-r6: task do_configure: Succeeded
> Waiting for 3 running tasks to finish:
> 0: perl-5.14.2-r6 do_compile (pid 2907)
> 1: libsoup-2.4-2.38.1-r0 do_compile (pid 20229)
> 2: neon-0.29.6-r2 do_configure (pid 20268)
> NOTE: package libsoup-2.4-2.38.1-r0: task do_compile: Succeeded
> Waiting for 2 running tasks to finish:
> 0: perl-5.14.2-r6 do_compile (pid 2907)
> 1: neon-0.29.6-r2 do_configure (pid 20268)
> NOTE: package neon-0.29.6-r2: task do_configure: Succeeded
> Waiting for 1 running tasks to finish:
> 0: perl-5.14.2-r6 do_compile (pid 2907)
> NOTE: package perl-5.14.2-r6: task do_compile: Succeeded
> NOTE: Tasks Summary: Attempted 3587 tasks of which 1595 didn't need to be
> rerun and 1 failed.
> 
> Summary: 1 task failed:
>   /home/alex/git/poky/meta/recipes-kernel/linux/linux-yocto_3.2.bb,
> do_compile_perf
> Summary: There were 14 WARNING messages shown.
> Summary: There was 1 ERROR message shown, returning a non-zero exit code.
> alex@alex-pc:~/git/poky/build$

This is a different problem, and I need to know exactly what input was used in order to reproduce it.
Comment 5 Laurentiu Serban 2012-08-01 09:25:55 UTC
Hello Tom,

The json file content is the following:
{"kernel_choice":"linux-yocto_3.2","use_default_kernel":"n","keyboard":"y","qemuarch":"i386","smp":"y","touchscreen":"n","need_new_kbranch":"y","new_kbranch":"standard/default/base"}
Comment 7 Tom Zanussi 2012-08-08 21:04:58 UTC
Patches for this bug have been submitted as part of this patchset [for master]:

http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=tzanussi/yocto-bsp-master-update

Patches for this bug have been submitted as part of this patchset [for denzil]:

http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=tzanussi/yocto-bsp-denzil-update

The perf failure shown is actually not a yocto-bsp problem but a problem with the kernel tools, which Bruce Ashfield will be posting a patch for.  The following preliminary patch for this can be found here:

http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=tzanussi/kern-tools-denzil-update-from-bruce
Comment 8 Tom Zanussi 2012-08-21 17:52:50 UTC
*** Bug 2967 has been marked as a duplicate of this bug. ***
Comment 9 Laurentiu Serban 2012-08-29 10:50:29 UTC
Hello Tom,
Related to Yocto BSP creating now there is another failure:

ERROR: Function failed: do_patch (see /home/lserban/work/master/build/tmp/work/myqemux86-poky-linux/linux-yocto-3.2.18+git1+486f7aec824b4127e91ef53228823e996b3696f0_1+7cc31a952f78b8f8e8469eed93c23e9675a8eeb5-r4.0.1/temp/log.do_patch.14566 for further information)
ERROR: Logfile of failure stored in: /home/lserban/work/master/build/tmp/work/myqemux86-poky-linux/linux-yocto-3.2.18+git1+486f7aec824b4127e91ef53228823e996b3696f0_1+7cc31a952f78b8f8e8469eed93c23e9675a8eeb5-r4.0.1/temp/log.do_patch.14566
Log data follows:
| DEBUG: Executing shell function do_patch
| [INFO]: checkpoint is already restored, nothing to do
| warning: could not find (or was already included): features/logbuf/size-normal.scc (/home/lserban/work/master/build/tmp/work/myqemux86-poky-linux/linux-yocto-3.2.18+git1+486f7aec824b4127e91ef53228823e996b3696f0_1+7cc31a952f78b8f8e8469eed93c23e9675a8eeb5-r4.0.1/linux/meta/cfg/scratch/obj/home/lserban/work/master/myjson/recipes-kernel/linux/files)
| [INFO] validating against known patches  (myqemux86-standard-meta)
error: pathspec 'standard/default/base/myqemux86' did not match any file(s) known to git.
| ERROR: could not complete git cmd "git checkout standard/default/base/myqemux86"
| ERROR. could not update git tree
| ERROR. Could not apply updates for myqemux86
| ERROR: Function failed: do_patch (see /home/lserban/work/master/build/tmp/work/myqemux86-poky-linux/linux-yocto-3.2.18+git1+486f7aec824b4127e91ef53228823e996b3696f0_1+7cc31a952f78b8f8e8469eed93c23e9675a8eeb5-r4.0.1/temp/log.do_patch.14566 for further information)
ERROR: Task 800 (/home/lserban/work/master/meta/recipes-kernel/linux/linux-yocto_3.2.bb, do_patch) failed with exit code '1'
NOTE: Tasks Summary: Attempted 4435 tasks of which 4373 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  /home/lserban/work/master/meta/recipes-kernel/linux/linux-yocto_3.2.bb, do_patch

cat /home/lserban/work/master/build/tmp/work/myqemux86-poky-linux/linux-yocto-3.2.18+git1+486f7aec824b4127e91ef53228823e996b3696f0_1+7cc31a952f78b8f8e8469eed93c23e9675a8eeb5-r4.0.1/temp/log.do_patch.28603

ERROR: Function failed: do_patch (see /home/lserban/work/master/build/tmp/work/myqemux86-poky-linux/linux-yocto-3.2.18+git1+486f7aec824b4127e91ef53228823e996b3696f0_1+7cc31a952f78b8f8e8469eed93c23e9675a8eeb5-r4.0.1/temp/log.do_patch.14566 for further information)
ERROR: Logfile of failure stored in: /home/lserban/work/master/build/tmp/work/myqemux86-poky-linux/linux-yocto-3.2.18+git1+486f7aec824b4127e91ef53228823e996b3696f0_1+7cc31a952f78b8f8e8469eed93c23e9675a8eeb5-r4.0.1/temp/log.do_patch.14566
Log data follows:
| DEBUG: Executing shell function do_patch
| [INFO]: checkpoint is already restored, nothing to do
| warning: could not find (or was already included): features/logbuf/size-normal.scc (/home/lserban/work/master/build/tmp/work/myqemux86-poky-linux/linux-yocto-3.2.18+git1+486f7aec824b4127e91ef53228823e996b3696f0_1+7cc31a952f78b8f8e8469eed93c23e9675a8eeb5-r4.0.1/linux/meta/cfg/scratch/obj/home/lserban/work/master/myjson/recipes-kernel/linux/files)
| [INFO] validating against known patches  (myqemux86-standard-meta)
error: pathspec 'standard/default/base/myqemux86' did not match any file(s) known to git.
| ERROR: could not complete git cmd "git checkout standard/default/base/myqemux86"
| ERROR. could not update git tree
| ERROR. Could not apply updates for myqemux86
| ERROR: Function failed: do_patch (see /home/lserban/work/master/build/tmp/work/myqemux86-poky-linux/linux-yocto-3.2.18+git1+486f7aec824b4127e91ef53228823e996b3696f0_1+7cc31a952f78b8f8e8469eed93c23e9675a8eeb5-r4.0.1/temp/log.do_patch.14566 for further information)
ERROR: Task 800 (/home/lserban/work/master/meta/recipes-kernel/linux/linux-yocto_3.2.bb, do_patch) failed with exit code '1'
NOTE: Tasks Summary: Attempted 4435 tasks of which 4373 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  /home/lserban/work/master/meta/recipes-kernel/linux/linux-yocto_3.2.bb, do_patch
Comment 10 Tom Zanussi 2012-08-29 13:23:12 UTC
The patches have been submitted, but not yet pulled in, so there wouldn't be any change.  And actually this last problem you mention is covered by an existing bug.

Please wait until the patches have been pulled in and this bug marked as 'RESOLVED' before retesting.
Comment 11 Tom Zanussi 2012-09-02 15:37:28 UTC
Fixed in poky/master: ba463277ff342a8dc77d9a59c6e879e06a855298
Comment 12 Tom Zanussi 2012-09-12 18:26:49 UTC
*** Bug 3079 has been marked as a duplicate of this bug. ***
Comment 13 Laurentiu Serban 2012-09-20 21:20:58 UTC
Verified in 1.3 M4 RC4. This issue is not reproducible anymore