Skip to contentSkip to conversation

do_package error after building meta-tensorflow and libcamera-apps does not detect tensorflow-lite

DISCUSSION ashish shrikhande6 4 participants 10 messages Sep 13, 2025 – Sep 15, 2025 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

I am facing two issues in building meta-tensorflow. I am trying to build tensorflow-lite in latest Yocto whinlatter for Raspberrypi5 target. When I get try to build tensorflow-lite
I get below error:

***********************************************************************************************************************************************

ERROR: tensorflow-lite-2.19.0-r0 do_package: Error executing a python function in exec_func_python() autogenerated:
The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_func_python() autogenerated', lineno: 2, function: <module>
0001:
*** 0002:sstate_report_unihash(d)
0003:
File: '/home/ashish/raspberrypi5_whinlater/poky/meta/classes-global/sstate.bbclass', lineno: 917, function: sstate_report_unihash
0913:    report_unihash = getattr(bb.parse.siggen, 'report_unihash', None)
0914:
0915:    if report_unihash:
0916:        ss = sstate_state_fromvars(d)
*** 0917:        report_unihash(os.getcwd(), ss['task'], d)
0918:}
0919:
0920:#
0921:# Shell function to decompress and prepare a package for installation
File: '/home/ashish/raspberrypi5_whinlater/poky/bitbake/lib/bb/siggen.py', lineno: 784, function: report_unihash
0780:
0781:            if "." in self.method:
0782:                (module, method) = self.method.rsplit('.', 1)
0783:                locs['method'] = getattr(importlib.import_module(module), method)
*** 0784:                outhash = bb.utils.better_eval('method(path, sigfile, task, d)', locs)
0785:            else:
0786:                outhash = bb.utils.better_eval(self.method + '(path, sigfile, task, d)', locs)
0787:
0788:            try:
File: '/home/ashish/raspberrypi5_whinlater/poky/bitbake/lib/bb/utils.py', lineno: 487, function: better_eval
0483:    if extraglobals:
0484:        ctx = copy.copy(ctx)
0485:        for g in extraglobals:
0486:            ctx[g] = extraglobals[g]
*** 0487:    return eval(source, ctx, locals)
0488:
0489:@contextmanager
0490:def fileslocked(files, *args, **kwargs):
0491:    """Context manager for locking and unlocking file locks. Uses
File: '<string>', lineno: 1, function: <module>
File "<string>", line 1, in <module>
File: '/home/ashish/raspberrypi5_whinlater/poky/meta/lib/oe/sstatesig.py', lineno: 722, function: OEOuthashBasic
0718:                update_hash("\n")
0719:
0720:            # Process this directory and all its child files
0721:            if include_root or root != ".":
*** 0722:                process(root)
0723:            for f in files:
0724:                if f == 'fixmepath':
0725:                    continue
0726:                process(os.path.join(root, f))
File: '/home/ashish/raspberrypi5_whinlater/poky/meta/lib/oe/sstatesig.py', lineno: 661, function: process
0657:                    except KeyError as e:
0658:                        msg = ("KeyError: %s\nPath %s is owned by uid %d, gid %d, which doesn't match "
0659:                            "any user/group on target. This may be due to host contamination." %
0660:                            (e, os.path.abspath(path), s.st_uid, s.st_gid))
*** 0661:                        raise Exception(msg).with_traceback(e.__traceback__)
0662:
0663:                if include_timestamps:
0664:                    # Need to clamp to SOURCE_DATE_EPOCH
0665:                    if s.st_mtime > source_date_epoch:
File: '/home/ashish/raspberrypi5_whinlater/poky/meta/lib/oe/sstatesig.py', lineno: 655, function: process
0651:                    else:
0652:                        add_perm(stat.S_IXOTH, 'x')
0653:
0654:                    try:
*** 0655:                        update_hash(" %10s" % pwd.getpwuid(s.st_uid).pw_name)
0656:                        update_hash(" %10s" % grp.getgrgid(s.st_gid).gr_name)
0657:                    except KeyError as e:
0658:                        msg = ("KeyError: %s\nPath %s is owned by uid %d, gid %d, which doesn't match "
0659:                            "any user/group on target. This may be due to host contamination." %
Exception: Exception: KeyError: 'getpwuid(): uid not found: 1000'
Path /home/ashish/raspberrypi5_whinlater/poky/build/tmp/work/cortexa76-poky-linux/tensorflow-lite/2.19.0/sstate-build-package/package/usr/lib/python3.13/site-packages/tflite_runtime is owned by uid 1000, gid 1000, which doesn't match any user/group on target. This may be due to host contamination.

ERROR: Logfile of failure stored in: /home/ashish/raspberrypi5_whinlater/poky/build/tmp/work/cortexa76-poky-linux/tensorflow-lite/2.19.0/temp/log.do_package.4189490
NOTE: recipe tensorflow-lite-2.19.0-r0: task do_package: Failed

********************************************************************************************************************************************************************************************************

After I comment below part from recipe it successfully build it:

${STAGING_BINDIR_NATIVE}/pip3 install --disable-pip-version-check -v \
-t ${D}/${PYTHON_SITEPACKAGES_DIR} --no-cache-dir --no-deps \
${S}/tensorflow/lite/tools/pip_package/gen/tflite_pip/python3/dist/tflite_runtime-${PV}*cp313*.whl rm -rf ${D}${PYTHON_SITEPACKAGES_DIR}/tflite_runtime-${PV}.dist-info

Since I wanted to build rpicam-apps (libcamera-apps)  with tensorflow-lite support I commented above part as wheel is not required.

When I build  libcamera-apps, since meta-tensorflow uses bazel to build, it does not generate libtensorflowlite.pc for libcamera-apps to integrate.

How to solve these issues? I am new to Yocto and looking for some help?

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

There are cp commands in do_install() task I think it could be causing the ownership clash. Change them to preserve ownership or use install cmd to install them
might help fixing this.

Quoted 12 lines · On Fri, Sep 12, 2025 at 9:02 PM ashish shrikhande6 via lists.yoctoproject.org…

I have attached a detailed build log

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
You automatically follow any topics you start or reply to. View/Reply Online (#65830): https://lists.yoctoproject.org/g/yocto/message/65830
Mute This Topic: https://lists.yoctoproject.org/mt/115218449/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#3 lore raw

the cmd here in install is trying to install a python wheel:

${STAGING_BINDIR_NATIVE}/pip3 install  --root-user-action=ignore  --disable-pip-version-check -v \
-t ${D}/${PYTHON_SITEPACKAGES_DIR} --no-cache-dir --no-deps \
${S}/tensorflow/lite/tools/pip_package/gen/tflite_pip/python3/dist/tflite_runtime-${PV}*cp313*.whl

which is causing this issue. How to change the ownership in such a case?

#4 lore raw

ok I was able to solve the issue by replacing

install -d ${D}/${PYTHON_SITEPACKAGES_DIR}
${STAGING_BINDIR_NATIVE}/pip3 install --disable-pip-version-check -v \
-t ${D}/${PYTHON_SITEPACKAGES_DIR} --no-cache-dir --no-deps \
${S}/tensorflow/lite/tools/pip_package/gen/tflite_pip/python3/dist/tflite_runtime-${PV}*cp313*.whl

with

install -d ${D}/${PYTHON_SITEPACKAGES_DIR}
${STAGING_BINDIR_NATIVE}/pip3 install --disable-pip-version-check -v \
--user --no-cache-dir --no-deps \
${S}/tensorflow/lite/tools/pip_package/gen/tflite_pip/python3/dist/tflite_runtime-${PV}*cp313*.whl

I removed -t and replaced it with --user. Is this correct way?

Also now libcamera-apps does not detect tflite?

#5 lore raw
Quoted 11 lines · On 9/13/25 09:03, ashish shrikhande6 via lists.yoctoproject.org wrote:

ok I was able to solve the issue by replacing

    install -d ${D}/${PYTHON_SITEPACKAGES_DIR}
    ${STAGING_BINDIR_NATIVE}/pip3 install --disable-pip-version-check -v \
        -t ${D}/${PYTHON_SITEPACKAGES_DIR} --no-cache-dir --no-deps \
${S}/tensorflow/lite/tools/pip_package/gen/tflite_pip/python3/dist/tflite_runtime-${PV}*cp313*.whl

with

Quoted 8 lines

    install -d ${D}/${PYTHON_SITEPACKAGES_DIR}
    ${STAGING_BINDIR_NATIVE}/pip3 install --disable-pip-version-check -v \
        --user --no-cache-dir --no-deps \
${S}/tensorflow/lite/tools/pip_package/gen/tflite_pip/python3/dist/tflite_runtime-${PV}*cp313*.whl

I removed -t and replaced it with --user. Is this correct way?

I have just tried compiling tensorflow-lite from master, and it was successful. Before digging any further, have you tried a "bitbake -c cleanall tensorflow-lite" and then try to build again, without changing the recipe?

Quoted 3 lines


Also now libcamera-apps does not detect tflite?

Regarding libcamera-apps, that's a bit more involved. Meson is trying to find tflite by cmake and pkg-config, but the tflite recipe has neither. As a good news, libcamera-apps devs have added an option to find tflite without cmake and pkg-config file just lately, however...

1. It needs to be added to meta-rpi. This feature was added in 1.9.0, but the layer ships 1.4.2-ish. PR: [1]
2. Updated libcamera-apps need a newer libcamera, which needs to be updated in meta-oe. Patch: [2]
3. Beside the above, it looks like that tensorflow-lite recipe doesn't package headers. Patch: [3]
4. libcamera-apps is looking for "libtensorflow-lite.so", but meta-tensorflow installs "libtensorflowlite.so" (without a hyphen). This needs some investigation who is right, who is wrong - maybe no one is wrong, but I have no idea at this moment. As an quick and ugly "just make it hekin' work" solution you can work around it locally by adding a bbappend to tflite, with the following content:

do_install:append(){
  ln -s libtensorflowlite.so ${D}${libdir}/libtensorflow-lite.so }

If you apply the linked patches, I believe you should be able to compile libcamera-apps with tensorflow lite. Though before working on libcamera-apps, you should get to the bottom of your issue with tensorflow-lite itself.

HTH.

[1]: https://github.com/agherzan/meta-raspberrypi/pull/1522
[2]:
https://patchwork.yoctoproject.org/project/oe/patch/[email protected]/
[3]:
https://patchwork.yoctoproject.org/project/yocto/patch/[email protected]/

#6 lore raw

I tried bitbake -c cleanall but the issue remains the same.

Regarding libcamera-apps, I will apply patches and recommended changes and let you know. Thanks

#7 lore raw
Quoted 1 line · On 9/14/25 04:35, ashish shrikhande6 via Lists.Yoctoproject.Org wrote:

I tried bitbake -c cleanall but the issue remains the same.

Random thought: I wonder if this could be because of some pip config seeping into the build environment. After some tests it looks that pip tries read some config files outside of the build env.

Not sure what option can affect this (if any at all), but you could try going through the config file list[1] used by pip. If you find any of these files on your machine, try to rename it temporarily to prevent it from loading, then try to clean and rebuild tflite. (After the test rename it back) If one of these configs is the reason for the failure, than it should be mitigated from the layer side most likely.

[1]: https://pip.pypa.io/en/stable/topics/configuration/ - the global and user config files are relevant. Site config not that much.

Quoted 4 lines


Regarding libcamera-apps, I will apply patches and recommended changes and let you know.
 Thanks

#8 lore raw
In reply to Gyorgy Sarvari

After Integrating tflite with libcamera I am getting some compilation errors:
1.

| In file included from ../sources/libcamera-apps-1.9.0+git/post_processing_stages/tf_stage.cpp:7:
| ../sources/libcamera-apps-1.9.0+git/post_processing_stages/tf_stage.hpp:16:10: fatal error: tensorflow/lite/builtin_op_data.h: No such file or directory
|    16 | #include "tensorflow/lite/builtin_op_data.h"
|       |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| compilation terminated.

2.

| In file included from ../sources/libcamera-apps-1.9.0+git/post_processing_stages/tensorflow/lite/schema/schema_generated.h:18,
|                  from ../sources/libcamera-apps-1.9.0+git/post_processing_stages/tensorflow/lite/core/api/op_resolver.h:29,
|                  from ../sources/libcamera-apps-1.9.0+git/post_processing_stages/tensorflow/lite/core/subgraph.h:36,
|                  from ../sources/libcamera-apps-1.9.0+git/post_processing_stages/tensorflow/lite/core/async/async_subgraph.h:27,
|                  from ../sources/libcamera-apps-1.9.0+git/post_processing_stages/tensorflow/lite/core/async/async_signature_runner.h:24,
|                  from ../sources/libcamera-apps-1.9.0+git/post_processing_stages/tensorflow/lite/core/interpreter.h:48,
|                  from ../sources/libcamera-apps-1.9.0+git/post_processing_stages/tensorflow/lite/interpreter.h:21,
|                  from ../sources/libcamera-apps-1.9.0+git/post_processing_stages/tf_stage.hpp:18,
|                  from ../sources/libcamera-apps-1.9.0+git/post_processing_stages/object_classify_tf_stage.cpp:8:
| ../sources/libcamera-apps-1.9.0+git/post_processing_stages/tensorflow/compiler/mlir/lite/schema/schema_generated.h:21:10: fatal error: flatbuffers/flatbuffers.h: No such file or directory
|    21 | #include "flatbuffers/flatbuffers.h"
|       |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
| compilation terminated.

3.

| In file included from ../sources/libcamera-apps-1.9.0+git/post_processing_stages/segmentation_tf_stage.cpp:8:
| ../sources/libcamera-apps-1.9.0+git/post_processing_stages/segmentation.hpp:15:82: error: 'uint8_t' was not declared in this scope
|    15 |         Segmentation(int w, int h, std::vector<std::string> l, const std::vector<uint8_t> &s)
|       |                                                                                  ^~~~~~~
| ../sources/libcamera-apps-1.9.0+git/post_processing_stages/segmentation.hpp:12:1: note: 'uint8_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'

4.

| In file included from ../sources/libcamera-apps-1.9.0+git/post_processing_stages/tensorflow/lite/core/c/builtin_op_data.h:24,
|                  from ../sources/libcamera-apps-1.9.0+git/post_processing_stages/tensorflow/lite/builtin_op_data.h:20,
|                  from ../sources/libcamera-apps-1.9.0+git/post_processing_stages/tf_stage.hpp:16,
|                  from ../sources/libcamera-apps-1.9.0+git/post_processing_stages/object_detect_tf_stage.cpp:9:
| ../sources/libcamera-apps-1.9.0+git/post_processing_stages/tensorflow/lite/core/c/common.h:125:7: error: ISO C++ forbids flexible array member 'data' [-Werror=pedantic]
|   125 |   int data[];
|       |       ^~~~
| ../sources/libcamera-apps-1.9.0+git/post_processing_stages/tensorflow/lite/core/c/common.h:169:9: error: ISO C++ forbids flexible array member 'data' [-Werror=pedantic]
|   169 |   float data[];
|       |         ^~~~
| cc1plus: all warnings being treated as errors
#9 lore raw

Have you applied all the mentioned changes? The first 2 should be fixed by the tflite patch[1] (which packages these missing headers). For the 3rd point there is an extra patch in the github PR[2], which addresses it. I haven't seen the last error, but the first three at least should be gone...

[1]: https://patchwork.yoctoproject.org/project/yocto/patch/[email protected]/
[2]:
https://github.com/agherzan/meta-raspberrypi/pull/1522/files#diff-c47f7714624569c0978292d85655edf001a084d2c2b830147b52647eccba602b

Quoted 77 lines · On 9/15/25 18:38, ashish shrikhande6 via Lists.Yoctoproject.Org wrote:

After Integrating tflite with libcamera I am getting some compilation errors:
1.
| In file included from ../sources/libcamera-apps-1.9.0+git/post_processing_stages/tf_stage.cpp:7:
| ../sources/libcamera-apps-1.9.0+git/post_processing_stages/tf_stage.hpp:16:10:
fatal error: tensorflow/lite/builtin_op_data.h: No such file or directory

|    16 | #include "tensorflow/lite/builtin_op_data.h"
|       |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| compilation terminated.


2.

| In file included from ../sources/libcamera-apps-1.9.0+git/post_processing_stages/tensorflow/lite/schema/schema_generated.h:18, |                  from ../sources/libcamera-apps-1.9.0+git/post_processing_stages/tensorflow/lite/core/api/op_resolver.h:29, |                  from ../sources/libcamera-apps-1.9.0+git/post_processing_stages/tensorflow/lite/core/subgraph.h:36,
|                  from ../sources/libcamera-apps-1.9.0+git/post_processing_stages/tensorflow/lite/core/async/async_subgraph.h:27, |                  from ../sources/libcamera-apps-1.9.0+git/post_processing_stages/tensorflow/lite/core/async/async_signature_runner.h:24, |                  from ../sources/libcamera-apps-1.9.0+git/post_processing_stages/tensorflow/lite/core/interpreter.h:48,
|                  from ../sources/libcamera-apps-1.9.0+git/post_processing_stages/tensorflow/lite/interpreter.h:21,
|                  from
../sources/libcamera-apps-1.9.0+git/post_processing_stages/tf_stage.hpp:18,
|                  from ../sources/libcamera-apps-1.9.0+git/post_processing_stages/object_classify_tf_stage.cpp:8:
| ../sources/libcamera-apps-1.9.0+git/post_processing_stages/tensorflow/compiler/mlir/lite/schema/schema_generated.h:21:10:
fatal error: flatbuffers/flatbuffers.h: No such file or directory

|    21 | #include "flatbuffers/flatbuffers.h"
|       |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
| compilation terminated.


3.

| In file included from ../sources/libcamera-apps-1.9.0+git/post_processing_stages/segmentation_tf_stage.cpp:8:
|
../sources/libcamera-apps-1.9.0+git/post_processing_stages/segmentation.hpp:15:82:
error: 'uint8_t' was not declared in this scope
|    15 |         Segmentation(int w, int h, std::vector<std::string>
l, const std::vector<uint8_t> &s)
|       |
                     ^~~~~~~
|
../sources/libcamera-apps-1.9.0+git/post_processing_stages/segmentation.hpp:12:1:
note: 'uint8_t' is defined in header '<cstdint>'; this is probably
fixable by adding '#include <cstdint>'

4.

| In file included from ../sources/libcamera-apps-1.9.0+git/post_processing_stages/tensorflow/lite/core/c/builtin_op_data.h:24, |                  from ../sources/libcamera-apps-1.9.0+git/post_processing_stages/tensorflow/lite/builtin_op_data.h:20, |                  from ../sources/libcamera-apps-1.9.0+git/post_processing_stages/tf_stage.hpp:16,
|                  from ../sources/libcamera-apps-1.9.0+git/post_processing_stages/object_detect_tf_stage.cpp:9:
| ../sources/libcamera-apps-1.9.0+git/post_processing_stages/tensorflow/lite/core/c/common.h:125:7:
error: ISO C++ forbids flexible array member 'data' [-Werror=pedantic]

|   125 |   int data[];
|       |       ^~~~
|
../sources/libcamera-apps-1.9.0+git/post_processing_stages/tensorflow/lite/core/c/common.h:169:9:
error: ISO C++ forbids flexible array member 'data' [-Werror=pedantic]
|   169 |   float data[];
|       |         ^~~~
| cc1plus: all warnings being treated as errors

#10 lore raw
In reply to ashish shrikhande6
Quoted 71 lines · On 9/13/25 11:57, ashish shrikhande6 via lists.yoctoproject.org wrote:

**
*CAUTION: This email comes from a non Wind River email account!*
Do not click links or open attachments unless you recognize the sender and know the content is safe.
I am facing two issues in building meta-tensorflow. I am trying to build tensorflow-lite in latest Yocto whinlatter for Raspberrypi5 target. When I get try to build tensorflow-lite
I get below error:
***********************************************************************************************************************************************
ERROR: tensorflow-lite-2.19.0-r0 do_package: Error executing a python function in exec_func_python() autogenerated:
The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_func_python() autogenerated', lineno: 2, function: <module>
     0001:
 *** 0002:sstate_report_unihash(d)
     0003:
File: '/home/ashish/raspberrypi5_whinlater/poky/meta/classes-global/sstate.bbclass', lineno: 917, function: sstate_report_unihash 0913:    report_unihash = getattr(bb.parse.siggen, 'report_unihash', None)
     0914:
     0915:    if report_unihash:
     0916:        ss = sstate_state_fromvars(d)
 *** 0917:        report_unihash(os.getcwd(), ss['task'], d)
     0918:}
     0919:
     0920:#
     0921:# Shell function to decompress and prepare a package for installation
File: '/home/ashish/raspberrypi5_whinlater/poky/bitbake/lib/bb/siggen.py', lineno: 784, function: report_unihash 0780:
     0781:            if "." in self.method:
     0782:                (module, method) = self.method.rsplit('.', 1)
     0783:                locs['method'] = getattr(importlib.import_module(module), method)
 *** 0784:                outhash = bb.utils.better_eval('method(path, sigfile, task, d)', locs)
     0785:            else:
     0786:                outhash = bb.utils.better_eval(self.method + '(path, sigfile, task, d)', locs)
     0787:
     0788:            try:
File: '/home/ashish/raspberrypi5_whinlater/poky/bitbake/lib/bb/utils.py', lineno: 487, function: better_eval
     0483:    if extraglobals:
     0484:        ctx = copy.copy(ctx)
     0485:        for g in extraglobals:
     0486:            ctx[g] = extraglobals[g]
 *** 0487:    return eval(source, ctx, locals)
     0488:
     0489:@contextmanager
     0490:def fileslocked(files, *args, **kwargs):
     0491:    """Context manager for locking and unlocking file locks. Uses
File: '<string>', lineno: 1, function: <module>
  File "<string>", line 1, in <module>
File: '/home/ashish/raspberrypi5_whinlater/poky/meta/lib/oe/sstatesig.py', lineno: 722, function: OEOuthashBasic 0718:                update_hash("\n")
     0719:
     0720:            # Process this directory and all its child files
     0721:            if include_root or root != ".":
 *** 0722:                process(root)
     0723:            for f in files:
     0724:                if f == 'fixmepath':
     0725:                    continue
     0726:                process(os.path.join(root, f))
File: '/home/ashish/raspberrypi5_whinlater/poky/meta/lib/oe/sstatesig.py', lineno: 661, function: process
     0657:                    except KeyError as e:
     0658:                        msg = ("KeyError: %s\nPath %s is owned by uid %d, gid %d, which doesn't match " 0659:                            "any user/group on target. This may be due to host contamination." %
     0660:                            (e, os.path.abspath(path), s.st_uid, s.st_gid))
 *** 0661:                        raise Exception(msg).with_traceback(e.__traceback__)
     0662:
     0663:                if include_timestamps:
     0664:                    # Need to clamp to SOURCE_DATE_EPOCH
     0665:                    if s.st_mtime > source_date_epoch:
File: '/home/ashish/raspberrypi5_whinlater/poky/meta/lib/oe/sstatesig.py', lineno: 655, function: process
     0651:                    else:
     0652:                        add_perm(stat.S_IXOTH, 'x')
     0653:
     0654:                    try:
 *** 0655:                        update_hash(" %10s" % pwd.getpwuid(s.st_uid).pw_name)

Quoted 8 lines

     0656:                        update_hash(" %10s" % grp.getgrgid(s.st_gid).gr_name)
     0657:                    except KeyError as e:
     0658:                        msg = ("KeyError: %s\nPath %s is owned by uid %d, gid %d, which doesn't match "
     0659:                            "any user/group on target. This may be due to host contamination." %
Exception: Exception: KeyError: 'getpwuid(): uid not found: 1000'
Path /home/ashish/raspberrypi5_whinlater/poky/build/tmp/work/cortexa76-poky-linux/tensorflow-lite/2.19.0/sstate-build-package/package/usr/lib/python3.13/site-packages/tflite_runtime is owned by uid 1000, gid 1000, which doesn't match any user/group on target. This may be due to host contamination.
ERROR: Logfile of failure stored in: /home/ashish/raspberrypi5_whinlater/poky/build/tmp/work/cortexa76-poky-linux/tensorflow-lite/2.19.0/temp/log.do_package.4189490
NOTE: recipe tensorflow-lite-2.19.0-r0: task do_package: Failed

From the log, it should be the issue of sstate cache, such as two builds share one sstate share

in 1st build, build tensorflow-lite, and then in 2nd build, it resue the sstate cache of 1st build.

when you rebuilt from scratch (bitbake tensorflow-lite -cceansstate && bitbake tensorflow-lite)

or trigger do_install rebuild will fix the issue

Quoted 8 lines

********************************************************************************************************************************************************************************************************
After I comment below part from recipe it successfully build it:
    ${STAGING_BINDIR_NATIVE}/pip3 install --disable-pip-version-check -v \
        -t ${D}/${PYTHON_SITEPACKAGES_DIR} --no-cache-dir --no-deps \
${S}/tensorflow/lite/tools/pip_package/gen/tflite_pip/python3/dist/tflite_runtime-${PV}*cp313*.whl
    rm -rf ${D}${PYTHON_SITEPACKAGES_DIR}/tflite_runtime-${PV}.dist-info
Since I wanted to build rpicam-apps (libcamera-apps) with tensorflow-lite support I commented above part as wheel is not required. When I build  libcamera-apps, since meta-tensorflow uses bazel to build, it does not generate libtensorflowlite.pc for libcamera-apps to integrate.

By default, no libtensorflowlite.pc is provided for now, you could manually add the libtensorflowlite.pc to along with recipe and install it in task do_install

//Hongxu

Quoted 10 lines

How to solve these issues? I am new to Yocto and looking for some help?

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