diff mbox series

[meta-tensorflow] tensorflow-lite: don't install flatbuffers header files

Message ID 20260401053022.96757-1-martin.jansa@gmail.com
State New
Headers show
Series [meta-tensorflow] tensorflow-lite: don't install flatbuffers header files | expand

Commit Message

Martin Jansa April 1, 2026, 5:30 a.m. UTC
From: Martin Jansa <martin.jansa@gmail.com>

https://lists.yoctoproject.org/g/yocto-patches/message/2186
breaks a build for recipes which depend on both tensorflow-lite and flatbuffers because of conflicts in RSS as in:
ERROR: foo-1.0-r0 do_prepare_recipe_sysroot: The file /usr/include/flatbuffers/array.h is installed by both tensorflow-lite and flatbuffers, aborting

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
---
 recipes-framework/tensorflow/tensorflow-lite_2.21.0.bb | 7 -------
 1 file changed, 7 deletions(-)

Comments

Hongxu Jia April 1, 2026, 5:34 a.m. UTC | #1
On 4/1/26 13:30, martin.jansa@gmail.com 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.
>
> From: Martin Jansa <martin.jansa@gmail.com>
>
> https://lists.yoctoproject.org/g/yocto-patches/message/2186
> breaks a build for recipes which depend on both tensorflow-lite and flatbuffers because of conflicts in RSS as in:
> ERROR: foo-1.0-r0 do_prepare_recipe_sysroot: The file /usr/include/flatbuffers/array.h is installed by both tensorflow-lite and flatbuffers, aborting
>
> Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
> ---
>   recipes-framework/tensorflow/tensorflow-lite_2.21.0.bb | 7 -------
>   1 file changed, 7 deletions(-)
>
> diff --git a/recipes-framework/tensorflow/tensorflow-lite_2.21.0.bb b/recipes-framework/tensorflow/tensorflow-lite_2.21.0.bb
> index 41646df..4951fbc 100644
> --- a/recipes-framework/tensorflow/tensorflow-lite_2.21.0.bb
> +++ b/recipes-framework/tensorflow/tensorflow-lite_2.21.0.bb
> @@ -123,13 +123,6 @@ do_install() {
>           install -D -m 0644 $header ${D}${includedir}/$header
>       done
>       cd -
> -
> -    cd ${WORKDIR}/bazel/output_base/external/flatbuffers/include
> -    for header in `find ./flatbuffers -type f`; do
> -        install -D -m 0644 $header ${D}${includedir}/$header
> -    done
> -    cd -
> -
>       # header installation done
>
>       #echo "Installing pip package"

Merged

//Hongxu
Martin Jansa April 1, 2026, 1:20 p.m. UTC | #2
On Wed, Apr 1, 2026 at 7:34 AM Hongxu Jia <hongxu.jia@windriver.com> wrote:
>
> On 4/1/26 13:30, martin.jansa@gmail.com 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.
> >
> > From: Martin Jansa <martin.jansa@gmail.com>
> >
> > https://lists.yoctoproject.org/g/yocto-patches/message/2186
> > breaks a build for recipes which depend on both tensorflow-lite and flatbuffers because of conflicts in RSS as in:
> > ERROR: foo-1.0-r0 do_prepare_recipe_sysroot: The file /usr/include/flatbuffers/array.h is installed by both tensorflow-lite and flatbuffers, aborting
> >
> > Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
> > ---
> >   recipes-framework/tensorflow/tensorflow-lite_2.21.0.bb | 7 -------
> >   1 file changed, 7 deletions(-)
>
> Merged
>
> //Hongxu

Thank you for quick update.

With newer ubuntu on host I'm seeing one more issue with bazel-native,
will send a patch or more details when I figure out what's wrong, but
it fails with ubuntu-25.04 and newer while in ubuntu-24.04 and 24.10
it built bazel-native fine.

I'm sharing it now just in case you've already seen this issue and
might have some pending fix already.

The log from 24.04 doesn't show "Linking src/main/cpp/util/libport.a"
at all, so I guess it's util:port dependency somehow not required, but
I'm still searching why (in all that bazel output which is a bit
confusing to me :)).

Regards,

tmp/work/x86_64-linux/bazel-native/7.7.0/sources/src/main/cpp/util/BUILD:95:11:
Linking src/main/cpp/util/libport.a failed: (Exit 1): ar failed: error
executing CppArchive command (from target //src/main/cpp/util:port)
  (cd tmp/bazel/bazel_EExPgtfN/out/execroot/_main && \
  exec env - \
    PATH=oe-core/scripts/native-intercept:tmp/work/x86_64-linux/bazel-native/7.7.0/recipe-sysroot-native/usr/bin/python3-native:oe-core/scripts:tmp/work/x86_64-linux/bazel-native/7.7.0/recipe-sysroot-native/usr/bin/x86_64-linux:tmp/work/x86_64-linux/bazel-native/7.7.0/recipe-sysroot-native/usr/bin:tmp/work/x86_64-linux/bazel-native/7.7.0/recipe-sysroot-native/usr/sbin:tmp/work/x86_64-linux/bazel-native/7.7.0/recipe-sysroot-native/usr/bin:tmp/work/x86_64-linux/bazel-native/7.7.0/recipe-sysroot-native/sbin:tmp/work/x86_64-linux/bazel-native/7.7.0/recipe-sysroot-native/bin:bitbake/bin:tmp/hosttools
\
    PWD=/proc/self/cwd \
    ZERO_AR_DATE=1 \
  oe-core/scripts/native-intercept/ar
@bazel-out/k8-opt/bin/src/main/cpp/util/libport.a-2.params)
# Configuration:
d26135a3254147264e37dd42dcbe81f92695ccaa36573733091ed4b195d3bf62
# Execution platform: //:default_host_platform
oe-core/scripts/native-intercept/ar: invalid option -- '@'
Usage: oe-core/scripts/native-intercept/ar [emulation options]
[-]{dmpqrstx}[abcDfilMNoOPsSTuvV] [--plugin <name>] [member-name]
[count] archive-file file...
       oe-core/scripts/native-intercept/ar -M [<mri-script]
diff mbox series

Patch

diff --git a/recipes-framework/tensorflow/tensorflow-lite_2.21.0.bb b/recipes-framework/tensorflow/tensorflow-lite_2.21.0.bb
index 41646df..4951fbc 100644
--- a/recipes-framework/tensorflow/tensorflow-lite_2.21.0.bb
+++ b/recipes-framework/tensorflow/tensorflow-lite_2.21.0.bb
@@ -123,13 +123,6 @@  do_install() {
         install -D -m 0644 $header ${D}${includedir}/$header
     done
     cd -
-
-    cd ${WORKDIR}/bazel/output_base/external/flatbuffers/include
-    for header in `find ./flatbuffers -type f`; do
-        install -D -m 0644 $header ${D}${includedir}/$header
-    done
-    cd -
-
     # header installation done
 
     #echo "Installing pip package"