Error bitbake sdk

Hi, i got an error when I´m trying to cook the sdk, someone know whay can I do to solve it?

$ bitbake -c populate_sdk tdx-reference-minimal-image
Loading cache: 100% |#################################################################################################################################################################| Time: 0:00:02
Loaded 3886 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION           = "1.46.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "arm-tdx-linux-gnueabi"
MACHINE              = "colibri-imx6ull"
DISTRO               = "tdx-x11"
DISTRO_VERSION       = "5.0.0-devel-20200826205205+build.0"
TUNE_FEATURES        = "arm armv7a vfp thumb neon callconvention-hard"
TARGET_FPU           = "hard"
meta-toradex-nxp     = "HEAD:8a2e5df0404ac59a5f1e74638a4220274afb4867"
meta-freescale       = "HEAD:6bc3d8825c20d21528e24a7237ff7392e01a81bd"
meta-freescale-3rdparty = "HEAD:9000d8b388de98a13d6db2a98cd21602e0a7b715"
meta-toradex-tegra   = "HEAD:a275ddac7fd5bda9602a3fe365da2b845ce22e3e"
meta-toradex-bsp-common = "HEAD:cdcf6c6c538f4458e798530762d9d1b0db510f7a"
meta-oe              
meta-filesystems     
meta-gnome           
meta-xfce            
meta-initramfs       
meta-networking      
meta-multimedia      
meta-python          = "HEAD:cc6fc6b1641ab23089c1e3bba11e0c6394f0867c"
meta-freescale-distro = "HEAD:a1821b36af7bba4f6628e4244df7fc9a038d0f34"
meta-toradex-demos   = "HEAD:bdfeb84dbe21cb614fb5db4347335ab26d81244b"
meta-qt5             = "HEAD:0e7015f7a86dda995a39662edbb5c26da647c496"
meta-toradex-distro  = "HEAD:950ad2a54b87d56d938e615634c2e4079b386fca"
meta-poky            = "HEAD:432b365f48f58ec0d9692a93607b65edd098ca1a"
meta                 = "HEAD:7ce425fa1295a9dca48f8474be58db3ac8aa540d"
meta-webserver       = "HEAD:cc6fc6b1641ab23089c1e3bba11e0c6394f0867c"

WARNING: /home/boherdi/Escritorio/toradex/build/../layers/meta-toradex-nxp/recipes-kernel/linux/linux-toradex_4.14-2.3.x.bb:do_kernel_configme is tainted from a forced run           | ETA:  0:00:06
WARNING: /home/boherdi/Escritorio/toradex/build/../layers/meta-toradex-nxp/recipes-kernel/linux/linux-toradex_4.14-2.3.x.bb:do_compile is tainted from a forced run
Initialising tasks: 100% |############################################################################################################################################################| Time: 0:00:08
Sstate summary: Wanted 321 Found 321 Missed 0 Current 1845 (100% match, 100% complete)
NOTE: Executing Tasks
ERROR: tdx-reference-minimal-image-1.0-r0 do_populate_sdk: Error executing a python function in exec_python_func() autogenerated:

The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function: 
     0001:
 *** 0002:do_populate_sdk(d)
     0003:
File: '/home/boherdi/Escritorio/toradex/build/../layers/openembedded-core/meta/classes/populate_sdk_base.bbclass', lineno: 172, function: do_populate_sdk
     0168:
     0169:    populate_sdk(d)
     0170:
     0171:fakeroot python do_populate_sdk() {
 *** 0172:    populate_sdk_common(d)
     0173:}
     0174:SSTATETASKS += "do_populate_sdk"
     0175:SSTATE_SKIP_CREATION_task-populate-sdk = '1'
     0176:do_populate_sdk[cleandirs] = "${SDKDEPLOYDIR}"
File: '/home/boherdi/Escritorio/toradex/build/../layers/openembedded-core/meta/classes/populate_sdk_base.bbclass', lineno: 169, function: populate_sdk_common
     0165:                    manifest_type=Manifest.MANIFEST_TYPE_SDK_HOST)
     0166:    create_manifest(d, manifest_dir=d.getVar('SDK_DIR'),
     0167:                    manifest_type=Manifest.MANIFEST_TYPE_SDK_TARGET)
     0168:
 *** 0169:    populate_sdk(d)
     0170:
     0171:fakeroot python do_populate_sdk() {
     0172:    populate_sdk_common(d)
     0173:}
File: '/home/boherdi/Escritorio/toradex/build/../layers/openembedded-core/meta/lib/oe/sdk.py', lineno: 415, function: populate_sdk
     0411:    img_type = d.getVar('IMAGE_PKGTYPE')
     0412:    if img_type == "rpm":
     0413:        RpmSdk(d, manifest_dir).populate()
     0414:    elif img_type == "ipk":
 *** 0415:        OpkgSdk(d, manifest_dir).populate()
     0416:    elif img_type == "deb":
     0417:        DpkgSdk(d, manifest_dir).populate()
     0418:
     0419:    os.environ.clear()
File: '/home/boherdi/Escritorio/toradex/build/../layers/openembedded-core/meta/lib/oe/sdk.py', lineno: 42, function: populate
     0038:    def populate(self):
     0039:        self.mkdirhier(self.sdk_output)
     0040:
     0041:        # call backend dependent implementation
 *** 0042:        self._populate()
     0043:
     0044:        # Don't ship any libGL in the SDK
     0045:        self.remove(os.path.join(self.sdk_output, self.sdk_native_path,
     0046:                         self.d.getVar('libdir_nativesdk').strip('/'),
File: '/home/boherdi/Escritorio/toradex/build/../layers/openembedded-core/meta/lib/oe/sdk.py', lineno: 272, function: _populate
     0268:            self.target_pm.remove_packaging_data()
     0269:
     0270:        bb.note("Installing NATIVESDK packages")
     0271:        self._populate_sysroot(self.host_pm, self.host_manifest)
 *** 0272:        self.install_locales(self.host_pm)
     0273:
     0274:        self.host_pm.run_intercepts(populate_sdk='host')
     0275:
     0276:        execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_HOST_COMMAND"))
File: '/home/boherdi/Escritorio/toradex/build/../layers/openembedded-core/meta/lib/oe/sdk.py', lineno: 104, function: install_locales
     0100:            # Generate a locale archive of them
     0101:            target_arch = self.d.getVar('SDK_ARCH')
     0102:            rootfs = oe.path.join(self.sdk_host_sysroot, self.sdk_native_path)
     0103:            localedir = oe.path.join(rootfs, self.d.getVar("libdir_nativesdk"), "locale")
 *** 0104:            generate_locale_archive(self.d, rootfs, target_arch, localedir)
     0105:            # And now delete the binary locales
     0106:            pkgs = fnmatch.filter(pm.list_installed(), "nativesdk-glibc-binary-localedata-*.utf-8")
     0107:            pm.remove(pkgs)
     0108:        else:
File: '/home/boherdi/Escritorio/toradex/build/../layers/openembedded-core/meta/lib/oe/package_manager.py', lineno: 135, function: generate_locale_archive
     0131:    # Need to set this so cross-localedef knows where the archive is
     0132:    env = dict(os.environ)
     0133:    env["LOCALEARCHIVE"] = oe.path.join(localedir, "locale-archive")
     0134:
 *** 0135:    for name in sorted(os.listdir(localedir)):
     0136:        path = os.path.join(localedir, name)
     0137:        if os.path.isdir(path):
     0138:            cmd = ["cross-localedef", "--verbose"]
     0139:            cmd += arch_options
Exception: FileNotFoundError: [Errno 2] No such file or directory: '/home/boherdi/Escritorio/toradex/build/tmp/work/colibri_imx6ull-tdx-linux-gnueabi/tdx-reference-minimal-image/1.0-r0/sdk/image/opt/tdx-x11/5.0.0-devel-20200826205205+build.0/sysroots/x86_64-tdxsdk-linux/usr/lib/locale'

ERROR: Logfile of failure stored in: /home/boherdi/Escritorio/toradex/build/tmp/work/colibri_imx6ull-tdx-linux-gnueabi/tdx-reference-minimal-image/1.0-r0/temp/log.do_populate_sdk.31874
ERROR: Task (/home/boherdi/Escritorio/toradex/build/../layers/meta-toradex-demos/recipes-images/images/tdx-reference-minimal-image.bb:do_populate_sdk) failed with exit code '1'
NOTE: Tasks Summary: Attempted 6239 tasks of which 6238 didn't need to be rerun and 1 failed.
NOTE: Writing buildhistory
NOTE: Writing buildhistory took: 6 seconds

Summary: 1 task failed:
  /home/boherdi/Escritorio/toradex/build/../layers/meta-toradex-demos/recipes-images/images/tdx-reference-minimal-image.bb:do_populate_sdk
Summary: There were 2 WARNING messages shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.

thanks

in short I think the error is :

"Exception: FileNotFoundError: [Errno
2] No such file or directory: 
'/.../build/tmp/work/colibri_imx6ull-tdx-linux-gnueabi/core-image-minimal/1.0-r0/sdk/image/opt/tdx-x11/5.0.0-devel-20200826231339+build.0/sysroots/x86_64-tdxsdk-linux/usr/lib/locale'"

I already achieved it, I started in a new folder from 0 following the guide Build a Reference Image with Yocto Project/OpenEmbedded | Toradex Developer Center and I was able to compile the sdk, I am going to add the modifications in local.conf one by one to see which is the one that was generating the problem

Hi

Please note that 5.0.0 is work in progress. You should expect that it does not build or has issues at runtime. Also expect disruptive changes in versions.

Having said that, I think I found the root cause for what you see in the SDK build. I’m confident that this commit fixes the build.

Deleting all build output and building from scratch in one bitbake invocation as you did makes the problem not appear in the first place, doing the build in several bitbake invocations will likely fail again.

Max

Well it sounds perfect, since today I added apache2 to local.conf and it failed again, I am going to add everything I need and do a clean compilation, thanks for the answer, I did not warn the error as a complaint but as feedback in case you didn’t know what was happening

regards

Facundo