Skip to contentSkip to conversation

do_populate_sdk_ext failed

DISCUSSION [email protected] 5 participants 12 messages Dec 14, 2023 – Dec 22, 2023

lore
Share & tools
lore
#0 lore raw

Hi all, recently I encountered a problem about some environment params that we exported not being recognised and parsed properly when runnning the command " *bitbake -c populate_sdk_ext ipcam-image* ".  For comparison, " bitbake -c populate_sdk 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 do_populate_sdk_ext: Failed to generate filtered task list for extensible SDK:
### Shell environment set up for builds. ###
You can now run 'bitbake <target>'
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/yocto_out/cv2_chestnut/tmp/work/cv2x-poky-linux/ipcam-image/1.0-r0/sdk-ext/image/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 printing informations* in " meta/classes/externalsrc.bbclass " *to* print the value of externalsrc after error messages *.
Then I found that some environment variables can be parsed but others cannot.*
Parsing recipes...ERROR: /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/layers/meta-ambalib/recipes-sensor/OMC/omc-ov2778-datas/omc-ov2778-datas_1.0.0.bb: *EXTERNALSRC must be an absolute path* : ${ENV_TOP_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 = " ${ENV_TOP_DIR} /packages/idsp/data/ img_${AMBA_IMG_ARCH} /OMC/ov2778"
EXTERNALSRC_BUILD = "${ENV_TOP_DIR}/packages/idsp/data/img_${AMBA_IMG_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. 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:    check_sstate_task_list(). In this function, it runs *bb.process.run(cmd, stderr=subprocess.STDOUT, env=env, cwd=cwd, executable='/bin/bash')* , the *cmd* here is ". layers/poky/oe-init-build-env . ;PYTHONDONTWRITEBYTECODE=1 BB_SETSCENE_ENFORCE=1 PSEUDO_DISABLED=1 oe-check-sstate ipcam-image meta-extsdk-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/yocto_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 *output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, env=env)* , the *cmd* here is " ['bitbake', '--dry-run', '--runall=build', '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-env . " and " bitbake --dty-run --runall=build ipcam-image ", I can reproduce this issue. If I don't rerun ". layers/poky/oe-init-build-env . " but just run " bitbake --dty-run --runall=build ipcam-image ", it can pass. *

*

#1 lore raw

You should probably file a bug that eSDK creation doesn’t work with externalsrc enabled.

A workaround would be to simply not use externalsrc, that’s meant for local development purposes and not something you’d use globally.

Ross

Quoted 56 lines · sjhan via lists.yoctoproject.org

Hi all, recently I encountered a problem about some environment params that we exported not being recognised and parsed properly when runnning the command "bitbake -c populate_sdk_ext ipcam-image". For comparison, "bitbake -c populate_sdk 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 do_populate_sdk_ext: Failed to generate filtered task list for extensible SDK:
### Shell environment set up for builds. ###
You can now run 'bitbake <target>'
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/yocto_out/cv2_chestnut/tmp/work/cv2x-poky-linux/ipcam-image/1.0-r0/sdk-ext/image/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 printing informations in "meta/classes/externalsrc.bbclass" to print the value of externalsrc after error messages.
Then I found that some environment variables can be parsed but others cannot.
Parsing recipes...ERROR: /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/layers/meta-ambalib/recipes-sensor/OMC/omc-ov2778-datas/omc-ov2778-datas_1.0.0.bb: EXTERNALSRC must be an absolute path: ${ENV_TOP_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 = "${ENV_TOP_DIR}/packages/idsp/data/img_${AMBA_IMG_ARCH}/OMC/ov2778"
EXTERNALSRC_BUILD = "${ENV_TOP_DIR}/packages/idsp/data/img_${AMBA_IMG_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. 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: check_sstate_task_list().In this function, it runs bb.process.run(cmd, stderr=subprocess.STDOUT, env=env, cwd=cwd, executable='/bin/bash'), the cmd here is ". layers/poky/oe-init-build-env .;PYTHONDONTWRITEBYTECODE=1 BB_SETSCENE_ENFORCE=1 PSEUDO_DISABLED=1 oe-check-sstate ipcam-image meta-extsdk-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/yocto_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 output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, env=env), the cmd here is "['bitbake', '--dry-run', '--runall=build', '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-env ." and "bitbake --dty-run --runall=build ipcam-image", I can reproduce this issue. If I don't rerun ". layers/poky/oe-init-build-env ." but just run "bitbake --dty-run --runall=build ipcam-image", it can pass.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#61886): https://lists.yoctoproject.org/g/yocto/message/61886
Mute This Topic: https://lists.yoctoproject.org/mt/103167520/6875888
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#2 lore raw

Hi, Ross.
Thanks for your tips. However, this way is not suitable for our situation. Is there any other possible solutions?

#3 lore raw
Quoted 1 line · On 14 Dec 2023, at 11:11, [email protected] wrote:

Thanks for your tips. However, this way is not suitable for our situation. Is there any other possible solutions?

If your recipes _require_ externalsrc then you should fix your recipes.

The immediate solutions would be:
1) report a bug and hope someone can fix it
2) debug and fix the problem yourself
3) pay someone to do (2)

Personally I don’t know enough about eSDK construction to offer any further advice.

Ross

#5 lore raw
In reply to Ross Burton

Hi Ross:

Nice to meet you and thanks for your support!

Song-Jun and myself are in the same team. We spent some efforts to make it happen for " do_populate_sdk_ext" finally by fixing some issue in Poky(we're using latest Kirkstone 4.0). But as you mentioned, when we tried the generated eSDK, we found that it still can't go with externalsrc enabled. :( We're wondering whether this limitation/issue will be resolved in your next LTS Scarthgap (5.0). Or it is still waiting to be fixed in future. If it is the later, we will file a bug for eSDK.


Best Regards!
Ming Wen (闻明)
SDK Team | Ambarella Shanghai

-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Ross Burton
Sent: Thursday, December 14, 2023 7:18 PM
To: Song-Jun Han <[email protected]>
Cc: [email protected]
Subject: [EXT] Re: [yocto] do_populate_sdk_ext failed

Quoted 1 line · On 14 Dec 2023, at 11:11, [email protected] wrote:

Thanks for your tips. However, this way is not suitable for our situation. Is there any other possible solutions?

If your recipes _require_ externalsrc then you should fix your recipes.

The immediate solutions would be:
1) report a bug and hope someone can fix it
2) debug and fix the problem yourself
3) pay someone to do (2)

Personally I don’t know enough about eSDK construction to offer any further advice.

Ross

######################################################################
This EXTERNAL email has been scanned by Proofpoint Email Protect service.

**********************************************************************
This email and attachments contain Ambarella Proprietary and/or Confidential Information and is intended solely for the use of the individual(s) to whom it is addressed. Any unauthorized review, use, disclosure, distribute, copy, or print is prohibited. If you are not an intended recipient, please contact the sender by reply email and destroy all copies of the original message. Thank you.

#6 lore raw
Quoted 2 lines · Ming Wen

Song-Jun and myself are in the same team. We spent some efforts to make it happen for " do_populate_sdk_ext" finally by fixing some issue in Poky(we're using latest Kirkstone 4.0). But as you mentioned, when we tried the generated eSDK, we found that it still can't go with externalsrc enabled. :( We're wondering whether this limitation/issue will be resolved in your next LTS Scarthgap (5.0). Or it is still waiting to be fixed in future. If it is the later, we will file a bug for eSDK.

Hello Ming,

I have to stress that Yocto is a community open source project, and not your commercial supplier. Nobody owes you a fix. If things do not work for you, it is your responsibility to find out what solutions can be, and implement them with code. You can of course file a bug as a way to document the problem, but it doesn't mean the bug is going to be worked on by someone within reasonable time. That only happens for high priority issues that affect many people, and this one isn't such.

Thanks,
Alex

#7 lore raw

Hi Alex:

Nice to meet you and thanks for the comments. Fully understand!

We're not trying to push you for the fix(definitely not). Instead, we always appreciate your efforts on bringing Yocto to us. Really so many R&Ds love it. It is even much more than our expectation when we tried to welcome Yocto to our SDK years ago. Here, we just seek for your help to see if this issue has been fixed in your later LTS poky. If not, then to see if it can have a chance to be fixed in future when you have enough resource.

Thanks again for you and Yocto!

Best Regards!
Ming Wen (闻明)
SDK Team | Ambarella Shanghai

-----Original Message-----
From: Alexander Kanavin <[email protected]>
Sent: Thursday, December 21, 2023 4:40 AM
To: [email protected]; Ming Wen <[email protected]>
Cc: [email protected]; Song-Jun Han <[email protected]>; Jian Tang <[email protected]>
Subject: [EXT] Re: [yocto] do_populate_sdk_ext failed

Quoted 2 lines · Ming Wen

Song-Jun and myself are in the same team. We spent some efforts to
make it happen for " do_populate_sdk_ext" finally by fixing some issue in Poky(we're using latest Kirkstone 4.0). But as you mentioned, when we tried the generated eSDK, we found that it still can't go with externalsrc enabled. :( We're wondering whether this limitation/issue will be resolved in your next LTS Scarthgap (5.0). Or it is still waiting to be fixed in future. If it is the later, we will file a bug for eSDK.

Hello Ming,

I have to stress that Yocto is a community open source project, and not your commercial supplier. Nobody owes you a fix. If things do not work for you, it is your responsibility to find out what solutions can be, and implement them with code. You can of course file a bug as a way to document the problem, but it doesn't mean the bug is going to be worked on by someone within reasonable time. That only happens for high priority issues that affect many people, and this one isn't such.

Thanks,
Alex

######################################################################
This EXTERNAL email has been scanned by Proofpoint Email Protect service.

**********************************************************************
This email and attachments contain Ambarella Proprietary and/or Confidential Information and is intended solely for the use of the individual(s) to whom it is addressed. Any unauthorized review, use, disclosure, distribute, copy, or print is prohibited. If you are not an intended recipient, please contact the sender by reply email and destroy all copies of the original message. Thank you.

#8 lore raw

Hello Ming,

I'm happy to hear that you're overall satisfied with the project, but I need to clarify the 'terms and conditions' of open source further:
not only no one owes you a fix, no one owes you an investigation of a possible issue either, especially if the issue looks difficult or time-consuming to replicate (and in this case it is). So it's not likely there will be a definitive answer to the question of whether it's been fixed (or even whether it's a real issue in poky, or simply something specific to your configuration).

On the other hand, Yocto is open source. All development happens in the open, and obtaining the latest source tree is a single 'git clone' command. You're welcome to join the ongoing development rather than just use the release deliveries, and obtain the answers that way.

What I'm specifically suggesting is: get the latest poky master revision, set up a minimal configuration where the issue can be observed, and then see if you, the team most affected by it, can first find out where things go wrong, and second how they could be fixed. It may also well be that the issue is indeed fixed in latest master. The community can assist in that investigation if you run into problems or are unsure how to proceed, but doing the investigation is on you.

Once you establish those facts, we can help towards making fixes and backporting them to LTS.

Alex

Quoted 37 lines · Ming Wen

Hi Alex:

Nice to meet you and thanks for the comments. Fully understand!

We're not trying to push you for the fix(definitely not). Instead, we always appreciate your efforts on bringing Yocto to us. Really so many R&Ds love it. It is even much more than our expectation when we tried to welcome Yocto to our SDK years ago. Here, we just seek for your help to see if this issue has been fixed in your later LTS poky. If not, then to see if it can have a chance to be fixed in future when you have enough resource.

Thanks again for you and Yocto!

Best Regards!
Ming Wen (闻明)
SDK Team | Ambarella Shanghai

-----Original Message-----
From: Alexander Kanavin <[email protected]>
Sent: Thursday, December 21, 2023 4:40 AM
To: [email protected]; Ming Wen <[email protected]>
Cc: [email protected]; Song-Jun Han <[email protected]>; Jian Tang <[email protected]>
Subject: [EXT] Re: [yocto] do_populate_sdk_ext failed

Quoted 2 lines · Ming Wen

Song-Jun and myself are in the same team. We spent some efforts to
make it happen for " do_populate_sdk_ext" finally by fixing some issue in Poky(we're using latest Kirkstone 4.0). But as you mentioned, when we tried the generated eSDK, we found that it still can't go with externalsrc enabled. :( We're wondering whether this limitation/issue will be resolved in your next LTS Scarthgap (5.0). Or it is still waiting to be fixed in future. If it is the later, we will file a bug for eSDK.

Hello Ming,

I have to stress that Yocto is a community open source project, and not your commercial supplier. Nobody owes you a fix. If things do not work for you, it is your responsibility to find out what solutions can be, and implement them with code. You can of course file a bug as a way to document the problem, but it doesn't mean the bug is going to be worked on by someone within reasonable time. That only happens for high priority issues that affect many people, and this one isn't such.

Thanks,
Alex

######################################################################
This EXTERNAL email has been scanned by Proofpoint Email Protect service.

**********************************************************************
This email and attachments contain Ambarella Proprietary and/or Confidential Information and is intended solely for the use of the individual(s) to whom it is addressed. Any unauthorized review, use, disclosure, distribute, copy, or print is prohibited. If you are not an intended recipient, please contact the sender by reply email and destroy all copies of the original message. Thank you.

#9 lore raw

Hi Alex:

Thanks for the suggestions. Yeah, we can work on this direction by trying again with the latest Poky master branch. Will find your help later if we have new findings there.

Best Regards!
Ming Wen (闻明)
SDK Team | Ambarella Shanghai

-----Original Message-----
From: Alexander Kanavin <[email protected]>
Sent: Thursday, December 21, 2023 5:42 PM
To: Ming Wen <[email protected]>
Cc: [email protected]; [email protected]; Song-Jun Han <[email protected]>; Jian Tang <[email protected]>
Subject: Re: [EXT] Re: [yocto] do_populate_sdk_ext failed

Hello Ming,

I'm happy to hear that you're overall satisfied with the project, but I need to clarify the 'terms and conditions' of open source further:
not only no one owes you a fix, no one owes you an investigation of a possible issue either, especially if the issue looks difficult or time-consuming to replicate (and in this case it is). So it's not likely there will be a definitive answer to the question of whether it's been fixed (or even whether it's a real issue in poky, or simply something specific to your configuration).

On the other hand, Yocto is open source. All development happens in the open, and obtaining the latest source tree is a single 'git clone' command. You're welcome to join the ongoing development rather than just use the release deliveries, and obtain the answers that way.

What I'm specifically suggesting is: get the latest poky master revision, set up a minimal configuration where the issue can be observed, and then see if you, the team most affected by it, can first find out where things go wrong, and second how they could be fixed. It may also well be that the issue is indeed fixed in latest master. The community can assist in that investigation if you run into problems or are unsure how to proceed, but doing the investigation is on you.

Once you establish those facts, we can help towards making fixes and backporting them to LTS.

Alex

Quoted 38 lines · Ming Wen

Hi Alex:

Nice to meet you and thanks for the comments. Fully understand!

We're not trying to push you for the fix(definitely not). Instead, we always appreciate your efforts on bringing Yocto to us. Really so many R&Ds love it. It is even much more than our expectation when we tried to welcome Yocto to our SDK years ago. Here, we just seek for your help to see if this issue has been fixed in your later LTS poky. If not, then to see if it can have a chance to be fixed in future when you have enough resource.

Thanks again for you and Yocto!

Best Regards!
Ming Wen (闻明)
SDK Team | Ambarella Shanghai

-----Original Message-----
From: Alexander Kanavin <[email protected]>
Sent: Thursday, December 21, 2023 4:40 AM
To: [email protected]; Ming Wen <[email protected]>
Cc: [email protected]; Song-Jun Han <[email protected]>; Jian Tang <[email protected]>
Subject: [EXT] Re: [yocto] do_populate_sdk_ext failed

Quoted 2 lines · Ming Wen

Song-Jun and myself are in the same team. We spent some efforts to
make it happen for " do_populate_sdk_ext" finally by fixing some issue in Poky(we're using latest Kirkstone 4.0). But as you mentioned, when we tried the generated eSDK, we found that it still can't go with externalsrc enabled. :( We're wondering whether this limitation/issue will be resolved in your next LTS Scarthgap (5.0). Or it is still waiting to be fixed in future. If it is the later, we will file a bug for eSDK.

Hello Ming,

I have to stress that Yocto is a community open source project, and not your commercial supplier. Nobody owes you a fix. If things do not work for you, it is your responsibility to find out what solutions can be, and implement them with code. You can of course file a bug as a way to document the problem, but it doesn't mean the bug is going to be worked on by someone within reasonable time. That only happens for high priority issues that affect many people, and this one isn't such.

Thanks,
Alex

######################################################################
This EXTERNAL email has been scanned by Proofpoint Email Protect service.

**********************************************************************
This email and attachments contain Ambarella Proprietary and/or Confidential Information and is intended solely for the use of the individual(s) to whom it is addressed. Any unauthorized review, use, disclosure, distribute, copy, or print is prohibited. If you are not an intended recipient, please contact the sender by reply email and destroy all copies of the original message. Thank you.