Building the extensible SDK

Hi!

I have successfully built the SDK using the standard command:

bitbake -k console-tdx-image -c populate_sdk

The resulting SDK works as expected.

However, reading up on the yocto manual on kernel development, they suggest using the extensible SDK as it provides several handy tools with devtool. Building the extensible SDK as suggested in the manual with:

bitbake -k console-tdx-image -c populate_sdk_ext

results in several errors, some attached below. Before I dig too deep into this, is it expected that the extensible SDK should build correctly? For kernel development, do you rather suggest working with the standard SDK with a local checkout of the kernel?

Best,
Kristian

ERROR: uninative-tarball-1.0-r0 do_populate_sdk: The recipe uninative-tarball is trying to install files into a shared area when those files already exist. Those files and their manifest location are:
   /home/[]/yocto/oe-core/deploy/sdk/angstrom-glibc-x86_64-armv7at2hf-neon-v2016.12-toolchain.target.manifest
 Matched in b'manifest-colibri-imx7x86_64-console-tdx-image.populate_sdk'
 /home/[]/yocto/oe-core/deploy/sdk/angstrom-glibc-x86_64-armv7at2hf-neon-v2016.12-toolchain.host.manifest
 Matched in b'manifest-colibri-imx7x86_64-console-tdx-image.populate_sdk'
Please verify which recipe should provide the above files.
The build has stopped as continuing in this scenario WILL break things, if not now, possibly in the future (we've seen builds fail several months later). If the system knew how to recover from this automatically it would however there are several different scenarios which can result in this and we don't know which one this is. It may be you have switched providers of something like virtual/kernel (e.g. from linux-yocto to linux-yocto-dev), in that case you need to execute the clean task for both recipes and it will resolve this error. It may be you changed DISTRO_FEATURES from systemd to udev or vice versa. Cleaning those recipes should again resolve this error however switching DISTRO_FEATURES on an existing build directory is not supported, you should really clean out tmp and rebuild (reusing sstate should be safe). It could be the overlapping files detected are harmless in which case adding them to SSTATE_DUPWHITELIST  may be the correct solution. It could also be your build is including two different conflicting versions of things (e.g. bluez 4 and bluez 5 and the correct solution for that would be to resolve the conflict. If in doubt, please ask on the mailing list, sharing the error and filelist above.
ERROR: uninative-tarball-1.0-r0 do_populate_sdk: If the above message is too much, the simpler version is you're advised to wipe out tmp and rebuild (reusing sstate is fine). That will likely fix things in most (but not all) cases.
ERROR: uninative-tarball-1.0-r0 do_populate_sdk: Function failed: sstate_task_postfunc
ERROR: Logfile of failure stored in: /home/[]/yocto/oe-core/build/tmp-glibc/work/x86_64-nativesdk-angstromsdk-linux/uninative-tarball/1.0-r0/temp/log.do_populate_sdk.21003
ERROR: Task (/home/[]/yocto/oe-core/build/../layers/openembedded-core/meta/recipes-core/meta/uninative-tarball.bb:do_populate_sdk) failed with exit code '1'
ERROR: buildtools-tarball-1.0-r0 do_populate_sdk: The recipe buildtools-tarball is trying to install files into a shared area when those files already exist. Those files and their manifest location are:
   /home/[]/yocto/oe-core/deploy/sdk/angstrom-glibc-x86_64-armv7at2hf-neon-v2016.12-toolchain.target.manifest
 Matched in b'manifest-colibri-imx7x86_64-console-tdx-image.populate_sdk'
 /home/[]/yocto/oe-core/deploy/sdk/angstrom-glibc-x86_64-armv7at2hf-neon-v2016.12-toolchain.sh
 Matched in b'manifest-colibri-imx7x86_64-console-tdx-image.populate_sdk'
 /home/[]/yocto/oe-core/deploy/sdk/angstrom-glibc-x86_64-armv7at2hf-neon-v2016.12-toolchain.host.manifest
 Matched in b'manifest-colibri-imx7x86_64-console-tdx-image.populate_sdk'
Please verify which recipe should provide the above files.
The build has stopped as continuing in this scenario WILL break things, if not now, possibly in the future (we've seen builds fail several months later). If the system knew how to recover from this automatically it would however there are several different scenarios which can result in this and we don't know which one this is. It may be you have switched providers of something like virtual/kernel (e.g. from linux-yocto to linux-yocto-dev), in that case you need to execute the clean task for both recipes and it will resolve this error. It may be you changed DISTRO_FEATURES from systemd to udev or vice versa. Cleaning those recipes should again resolve this error however switching DISTRO_FEATURES  on an existing build directory is not supported, you should really clean out tmp and rebuild (reusing sstate should be safe). It could be the overlapping files detected are harmless in which case adding them to SSTATE_DUPWHITELIST may be the correct solution. It could also be your build is including two different conflicting versions of things (e.g. bluez 4 and bluez 5 and the correct solution for that would be to resolve the conflict. If in doubt, please ask on the mailing list, sharing the error and filelist above.
ERROR: buildtools-tarball-1.0-r0 do_populate_sdk: If the above message is too much, the simpler version is you're advised to wipe out tmp and rebuild (reusing sstate is fine). That will likely fix things in most (but not all) cases.
ERROR: buildtools-tarball-1.0-r0 do_populate_sdk: Function failed: sstate_task_postfunc
ERROR: Logfile of failure stored in: []/yocto/oe-core/build/tmp-glibc/work/x86_64-nativesdk-angstromsdk-linux/buildtools-tarball/1.0-r0/temp/log.do_populate_sdk.21006
ERROR: Task ([]/yocto/oe-core/build/../layers/openembedded-core/meta/recipes-core/meta/buildtools-tarball.bb:do_populate_sdk) failed with exit code '1'

Have you tried following the advice given in this output?

Hi,

I have tried:

  1. full clean (delete) of tmp-glibc + deploy/ipk,image,skd
  2. full clean of the uninative-tarball recipie (bitbake uninative-tarball -c cleanall -f)
  3. full clean of the image

So, it is expected that this should work? I have not tried a full new build folder, but that’s next on the list.

It almost seems to me that both uninative-tarball and console-tdx-image wants to run populate_sdk, where maybe only one of them would need to.

Before I dig too deep into this, is it expected that the extensible SDK should build correctly?

Morty is probably not the best way to start working with the extensible one.

For kernel development, do you rather suggest working with the standard SDK with a local checkout of the kernel?

Yes, as explained e.g. in the following article on our developer website.

Thanks for the input :slight_smile:

You are very welcome.