Re: [yocto] do_package error after building meta-tensorflow and libcamera-apps does not detect tensorflow-lite
Gyorgy Sarvari <[email protected]>
| Newsgroups | org.yoctoproject.lists.yocto |
|---|---|
| Message-ID | <[email protected]> |
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
>
> 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?
>
> 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]/