Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5A128C4332F for ; Thu, 14 Dec 2023 10:37:07 +0000 (UTC) Subject: do_populate_sdk_ext failed To: yocto@lists.yoctoproject.org From: sjhan@ambarella.com X-Originating-Location: Shanghai, CN (180.169.129.130) X-Originating-Platform: Windows Chrome 120 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Thu, 14 Dec 2023 02:36:57 -0800 Message-ID: Content-Type: multipart/alternative; boundary="cMC5oXV4jGm6unBEotrI" List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 14 Dec 2023 10:37:07 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto/message/61886 --cMC5oXV4jGm6unBEotrI Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi all, recently I=C2=A0encountered a problem about some environment params= that we exported not being recognised and parsed properly when runnning th= e command " *bitbake -c populate_sdk_ext ipcam-image* ".=C2=A0 For comparis= on, " bitbake -c populate_sdk ipcam-image " can work perfectly. Currently, I don't know how to dig out the root cause and resolve it accord= ingly. Any help from here is appreciated. *1. The error messages are as following:* ERROR: ipcam-image-1.0-r0 do_populate_sdk_ext: Failed to generate filtered = task list for extensible SDK: ### Shell environment set up for builds. ### You can now run 'bitbake ' Common targets are: core-image-minimal core-image-full-cmdline core-image-sato core-image-weston meta-toolchain meta-ide-support You can also run generated qemu images with a command like 'runqemu qemux86= -64'. Other commonly useful commands are: - 'devtool' and 'recipetool' handle common recipe tasks - 'bitbake-layers' handles common layer tasks - 'oe-pkgdata-util' handles common target package tasks ERROR: bitbake failed: Loading cache...done. Loaded 0 entries from dependency cache. Parsing recipes...ERROR: /yocto/system/sjhan/re_sdk/sdk_1.5/topdir/out/yoct= o_out/cv2_chestnut/tmp/work/cv2x-poky-linux/ipcam-image/1.0-r0/sdk-ext/imag= e/tmp-renamed-sdk/layers/meta-ambalib/recipes-sensor/OMC/omc-ov2778-datas/ = omc-ov2778-datas_1.0.0.bb : EXTERNALSRC must be an absolute path * *........................... *2. Take one recipe as example.* *Because of the "EXTERNALSRC" in our recipes contain the environment params= , so I added some=C2=A0printing informations* in " meta/classes/externalsrc= .bbclass " *to* print the value of externalsrc after error messages *. Then I found that some=C2=A0environment variables can be parsed but others = cannot.* Parsing recipes...ERROR: /yocto/system/sjhan/re_sdk/sdk_1.5/topdir/out/yoct= o_out/cv2_chestnut/tmp/work/cv2x-poky-linux/ipcam-image/1.0-r0/sdk-ext/imag= e/tmp-renamed-sdk/layers/meta-ambalib/recipes-sensor/OMC/omc-ov2778-datas/o= mc-ov2778-datas_1.0.0.bb: *EXTERNALSRC must be an absolute path* : ${ENV_TO= P_DIR} /packages/idsp/data/ img_cv2x /OMC/ov2778 These are the content of this recipe: omc-ov2778-datas_1.0.0.bbappend. inherit externalsrc EXTERNALSRC =3D " ${ENV_TOP_DIR} /packages/idsp/data/ img_${AMBA_IMG_ARCH} = /OMC/ov2778" EXTERNALSRC_BUILD =3D "${ENV_TOP_DIR}/packages/idsp/data/img_${AMBA_IMG_ARC= H}/OMC/ov2778" The environment params here are exported in ambaenv.bbclass. And we inherit= this bbclass in omc-ov2778-datas_1.0.0.bb. *3. Continue tracking. I tried to trace the poky source code. The code execution flow is as below.= I also put the code piece here about where the error occurred.* * poky/meta/lib/oe/copy_buildsystem.py:=C2=A0 =C2=A0=C2=A0check_sstate_task= _list(). In this function, it runs *bb.process.run(cmd, stderr=3Dsubprocess= .STDOUT, env=3Denv, cwd=3Dcwd, executable=3D'/bin/bash')* , the *cmd* here = is ". layers/poky/oe-init-build-env . ;PYTHONDONTWRITEBYTECODE=3D1 BB_SETSC= ENE_ENFORCE=3D1 PSEUDO_DISABLED=3D1 oe-check-sstate ipcam-image meta-extsdk= -toolchain:do_populate_sysroot -s -o /yocto/system/sjhan/re_sdk/sdk_1.5/amb= arella/out/yocto_out/cv2_chestnut/tmp/work/cv2x-poky-linux/ipcam-image/1.0-= r0/tasklist.txt -l /yocto/system/sjhan/re_sdk/sdk_1.5/ambarella/out/yocto_o= ut/cv2_chestnut/tmp/work/cv2x-poky-linux/ipcam-image/1.0-r0/tasklist_bb_log= .txt ". * poky/scripts/oe-check-sstate:=C2=A0 =C2=A0 check(). In this function, it = runs *output =3D subprocess.check_output(cmd, stderr=3Dsubprocess.STDOUT, e= nv=3Denv)* , the *cmd* here is " ['bitbake', '--dry-run', '--runall=3Dbuild= ', 'ipcam-image', 'meta-extsdk-toolchain:do_populate_sysroot'] " *Then, the error occured. 4. Other informations maybe help. * I enter the directory tmp/work/cv2x-poky-linux/ipcam-image/1.0-r0/sdk-ext= /image/tmp-renamed-sdk and rerun the command ". layers/poky/oe-init-build-e= nv . " and " bitbake --dty-run --runall=3Dbuild ipcam-image ", I can reprod= uce this issue. If I don't rerun ". layers/poky/oe-init-build-env . " but just run " bitbak= e --dty-run --runall=3Dbuild ipcam-image ", it can pass. * * --cMC5oXV4jGm6unBEotrI Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi all, recently I encountered a problem about some environment params= that we exported not being recognised and parsed properly when runnning th= e command "bitbake -c populate_sdk_ext ipcam-image". = For comparison, "bitbake -c populate_sd= k ipcam-image" can work perfectly.
Currently, I don't know how = to dig out the root cause and resolve it accordingly. Any help from here is= appreciated.

1. The error messages are as following:
ERROR: ipcam-image-1.0-r0 d= o_populate_sdk_ext: Failed to generate filtered task list for extensible SD= K:
### Shell environment set u= p for builds. ###
You can now run 'bitbake &l= t;target>'
Common targets are:<= /div>
    core-image-mi= nimal
    core-image-fu= ll-cmdline
    core-image-sa= to
    core-image-we= ston
    meta-toolchai= n
    meta-ide-supp= ort
You can also run generated = qemu images with a command like 'runqemu qemux86-64'.
Other commonly useful comma= nds are:
 - 'devtool' and 'reci= petool' handle common recipe tasks
 - 'bitbake-layers' ha= ndles common layer tasks
 - 'oe-pkgdata-util' h= andles common target package tasks
ERROR: bitbake failed:
Loading cache...done.
Loaded 0 entries from depen= dency cache.
Parsing recipes...ERROR: /y= octo/system/sjhan/re_sdk/sdk_1.5/topdir/out/yocto_out/cv2_chestnut/tmp/work= /cv2x-poky-linux/ipcam-image/1.0-r0/sdk-ext/image/tmp-renamed-sdk/layers/me= ta-ambalib/recipes-sensor/OMC/omc-ov2778-datas/omc-ov2778-datas_1.0.0.bb: EXTERNALSRC must be an absolute path
<= /strong>...........................

2. Take one r= ecipe as example.
Because of the "EXTERNALSRC" in our recipes contain the environment= params, so I added some printing informations in "me= ta/classes/externalsrc.bbclass" to print the value of externalsrc after error messages.
Then I found that some environment variables can b= e parsed but others cannot.

Parsing recipes...ERRO= R: /yocto/system/sjhan/re_sdk/sdk_1.5/topdir/out/yocto_out/cv2_chestnut/tmp= /work/cv2x-poky-linux/ipcam-image/1.0-r0/sdk-ext/image/tmp-renamed-sdk/laye= rs/meta-ambalib/recipes-sensor/OMC/omc-ov2778-datas/omc-ov2778-datas_1.0.0.= bb: EXTERNALSRC must be = an absolute path: img_cv2x/OMC/ov2778

These are the content of this recipe:&n= bsp;omc-ov2778-datas_1.0.= 0.bbappend.
inherit externalsrc
EXTERNALSRC =3D "${ENV_TOP_= DIR}/packages/idsp/data/i= mg_${AMBA_IMG_ARCH}/OMC/ov2778"
EXTERNALSRC_BUILD =3D "${ENV_TOP_DIR}/packages/idsp/data/img_${AMBA_IM= G_ARCH}/OMC/ov2778"
The environment params here are exported in ambaenv.bbclass. And we inherit = this bbclass in omc-= ov2778-datas_1.0.0.bb. 3. Continue tracking.
I tried to trace the poky source code. T= he code execution flow is as below. I also put the code piece here about wh= ere the error occurred.

  • poky/meta/lib/oe/copy_builds= ystem.py:    check_sstate_task_list().In this functio= n, it runs bb.process.run(cmd, stderr=3Dsubprocess.STDOUT, env=3Den= v, cwd=3Dcwd, executable=3D'/bin/bash'), the cmd&= nbsp;here is ". layers/poky/oe-init-build-env .;PYTHONDON= TWRITEBYTECODE=3D1 BB_SETSCENE_ENFORCE=3D1 PSEUDO_DISABLED=3D1 oe-check-sstate ipcam-image meta-ext= sdk-toolchain:do_populate_sysroot -s -o /yocto/system/sjhan/re_sdk/sdk_1.5/= ambarella/out/yocto_out/cv2_chestnut/tmp/work/cv2x-poky-linux/ipcam-image/1= .0-r0/tasklist.txt -l /yocto/system/sjhan/re_sdk/sdk_1.5/ambarella/out/yoct= o_out/cv2_chestnut/tmp/work/cv2x-poky-linux/ipcam-image/1.0-r0/tasklist_bb_= log.txt".
  • poky/scripts/oe-check-sstate= :    check(). In this function, it runs outpu= t =3D subprocess.check_output(cmd, stderr=3Dsubprocess.STDOUT, env=3Denv), the cmd here is "['bitbake', '--dry-run', '--runall=3Dbuild', 'ipcam-image', 'met= a-extsdk-toolchain:do_populate_sysroot']"
Then, the error occured.

4. Other informations maybe hel= p.
I enter the dir= ectory tmp/work/cv2x-poky-linux/= ipcam-image/1.0-r0/sdk-ext/image/tmp-renamed-sdk and rerun the comma= nd ". layers/poky/oe-init-build-= env ." and "bitbake --dty= -run --runall=3Dbuild ipcam-image", I can reproduce this issue.
If I don't rerun ". laye= rs/poky/oe-init-build-env ." but= just run "bitbake= --dty-run --runall=3Dbuild ipcam-image", it can pass.

--cMC5oXV4jGm6unBEotrI--