Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 505E6CAC58E for ; Sat, 13 Sep 2025 03:57:23 +0000 (UTC) Subject: do_package error after building meta-tensorflow and libcamera-apps does not detect tensorflow-lite To: yocto@lists.yoctoproject.org From: "ashish shrikhande6" X-Originating-Location: Bengaluru, Karnataka, IN (49.205.206.74) X-Originating-Platform: Linux Firefox 142 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Fri, 12 Sep 2025 20:57:19 -0700 Message-ID: Content-Type: multipart/alternative; boundary="NDmFtfRTJsw7NOq2Ulu0" List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sat, 13 Sep 2025 03:57:23 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto/message/65829 --NDmFtfRTJsw7NOq2Ulu0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable I am facing two issues in building meta-tensorflow. I am trying to build te= nsorflow-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 funct= ion 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: 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: =C2=A0 =C2=A0report_unihash =3D getattr(bb.parse.siggen, 'report_unih= ash', None) 0914: 0915: =C2=A0 =C2=A0if report_unihash: 0916: =C2=A0 =C2=A0 =C2=A0 =C2=A0ss =3D sstate_state_fromvars(d) *** 0917: =C2=A0 =C2=A0 =C2=A0 =C2=A0report_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: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if "." in self.method: 0782: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(module, metho= d) =3D self.method.rsplit('.', 1) 0783: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0locs['method']= =3D getattr(importlib.import_module(module), method) *** 0784: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0outhash = =3D bb.utils.better_eval('method(path, sigfile, task, d)', locs) 0785: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0else: 0786: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0outhash =3D bb= .utils.better_eval(self.method + '(path, sigfile, task, d)', locs) 0787: 0788: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0try: File: '/home/ashish/raspberrypi5_whinlater/poky/bitbake/lib/bb/utils.py', l= ineno: 487, function: better_eval 0483: =C2=A0 =C2=A0if extraglobals: 0484: =C2=A0 =C2=A0 =C2=A0 =C2=A0ctx =3D copy.copy(ctx) 0485: =C2=A0 =C2=A0 =C2=A0 =C2=A0for g in extraglobals: 0486: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ctx[g] =3D extraglobals[g] *** 0487: =C2=A0 =C2=A0return eval(source, ctx, locals) 0488: 0489:@contextmanager 0490:def fileslocked(files, *args, **kwargs): 0491: =C2=A0 =C2=A0"""Context manager for locking and unlocking file locks.= Uses File: '', lineno: 1, function: File "", line 1, in File: '/home/ashish/raspberrypi5_whinlater/poky/meta/lib/oe/sstatesig.py', = lineno: 722, function: OEOuthashBasic 0718: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0update_hash("\= n") 0719: 0720: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0# Process this directory and= all its child files 0721: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if include_root or root !=3D= ".": *** 0722: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0process(ro= ot) 0723: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0for f in files: 0724: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if f =3D=3D 'f= ixmepath': 0725: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= continue 0726: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0process(os.pat= h.join(root, f)) File: '/home/ashish/raspberrypi5_whinlater/poky/meta/lib/oe/sstatesig.py', = lineno: 661, function: process 0657: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= except KeyError as e: 0658: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0msg =3D ("KeyError: %s\nPath %s is owned by uid %d, gid %d, w= hich doesn't match " 0659: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0"any user/group on target. This may be due to h= ost contamination." % 0660: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0(e, os.path.abspath(path), s.st_uid, s.st_gid)) *** 0661: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0raise Exception(msg).with_traceback(e.__traceback__) 0662: 0663: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if include_tim= estamps: 0664: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= # Need to clamp to SOURCE_DATE_EPOCH 0665: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= if s.st_mtime > source_date_epoch: File: '/home/ashish/raspberrypi5_whinlater/poky/meta/lib/oe/sstatesig.py', = lineno: 655, function: process 0651: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= else: 0652: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0add_perm(stat.S_IXOTH, 'x') 0653: 0654: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= try: *** 0655: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0update_hash(" %10s" % pwd.getpwuid(s.st_uid).pw_name) 0656: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0update_hash(" %10s" % grp.getgrgid(s.st_gid).gr_name) 0657: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= except KeyError as e: 0658: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0msg =3D ("KeyError: %s\nPath %s is owned by uid %d, gid %d, w= hich doesn't match " 0659: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0"any user/group on target. This may be due to h= ost 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/po= ky/build/tmp/work/cortexa76-poky-linux/tensorflow-lite/2.19.0/temp/log.do_p= ackage.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_r= untime-${PV}*cp313*.whl rm -rf ${D}${PYTHON_SITEPACKAGES_DIR}/tflite_runtime-${PV}.dist-info Since I wanted to build rpicam-apps (libcamera-apps)=C2=A0 with tensorflow-= lite support I commented above part as wheel is not required. When I build=C2=A0 libcamera-apps, since meta-tensorflow uses bazel to buil= d, it does not generate libtensorflowlite.pc for libcamera-apps to integrat= e. How to solve these issues? I am new to Yocto and looking for some help? --NDmFtfRTJsw7NOq2Ulu0 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable
I am facing two issues in building meta-tensorflow. I am trying to bui= ld 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/failur= e was:
File: 'exec_func_python() autogenerated', lineno: 2, function: = <module>
     0001:
 *** 0002:sstate_re= port_unihash(d)
     0003:
File: '/home/ashish/ras= pberrypi5_whinlater/poky/meta/classes-global/sstate.bbclass', lineno: 917, = function: sstate_report_unihash
     0913:    = ;report_unihash =3D getattr(bb.parse.siggen, 'report_unihash', None)
&= nbsp;    0914:
     0915:    if rep= ort_unihash:
     0916:        ss = =3D sstate_state_fromvars(d)
 *** 0917:       &nbs= p;report_unihash(os.getcwd(), ss['task'], d)
     0918:= }
     0919:
     0920:#
 = ;    0921:# Shell function to decompress and prepare a package fo= r installation
File: '/home/ashish/raspberrypi5_whinlater/poky/bitbake= /lib/bb/siggen.py', lineno: 784, function: report_unihash
   = ;  0780:
     0781:         &n= bsp;  if "." in self.method:
     0782:   &nb= sp;            (module, method) =3D self.meth= od.rsplit('.', 1)
     0783:        = ;        locs['method'] =3D getattr(importlib.import_mo= dule(module), method)
 *** 0784:         &nbs= p;      outhash =3D bb.utils.better_eval('method(path, sigfi= le, task, d)', locs)
     0785:       &n= bsp;    else:
     0786:      =          outhash =3D bb.utils.better_eval(self.me= thod + '(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 =3D copy.copy(ctx)
     0485:     =    for g in extraglobals:
     0486:   &= nbsp;        ctx[g] =3D extraglobals[g]
 *** = 0487:    return eval(source, ctx, locals)
    &nbs= p;0488:
     0489:@contextmanager
    &n= bsp;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: &= nbsp;              update_hash("\n")
     0719:
     0720:     &n= bsp;      # Process this directory and all its child files     0721:            if i= nclude_root or root !=3D ".":
 *** 0722:       &nb= sp;        process(root)
     0723:=            for f in files:
   = ;  0724:                if f = =3D=3D 'fixmepath':
     0725:       &nb= sp;            continue
    &n= bsp;0726:                process(os= .path.join(root, f))
File: '/home/ashish/raspberrypi5_whinlater/poky/m= eta/lib/oe/sstatesig.py', lineno: 661, function: process
   =  0657:                  =  except KeyError as e:
     0658:     &= nbsp;                  msg =3D= ("KeyError: %s\nPath %s is owned by uid %d, gid %d, which doesn't match "<= br />     0659:             &n= bsp;              "any user/group on tar= get. This may be due to host contamination." %
     066= 0:                     &n= bsp;      (e, os.path.abspath(path), s.st_uid, s.st_gid)) *** 0661:                 =        raise Exception(msg).with_traceback(e.__tracebac= k__)
     0662:
     0663:   &= nbsp;            if include_timestamps:
=      0664:               =      # Need to clamp to SOURCE_DATE_EPOCH
   =  0665:                  =  if s.st_mtime > source_date_epoch:
File: '/home/ashish/raspb= errypi5_whinlater/poky/meta/lib/oe/sstatesig.py', lineno: 655, function: pr= ocess
     0651:           &nb= sp;        else:
     0652:   =                      = ;add_perm(stat.S_IXOTH, 'x')
     0653:
  &nb= sp;  0654:                 &nb= sp;  try:
 *** 0655:           &nbs= p;            update_hash(" %10s" % pwd.getpw= uid(s.st_uid).pw_name)
     0656:       =                  update_hash("= %10s" % grp.getgrgid(s.st_gid).gr_name)
     0657: &nb= sp;                  except Ke= yError as e:
     0658:         &nb= sp;              msg =3D ("KeyError: %s\= nPath %s is owned by uid %d, gid %d, which doesn't match "
  &nbs= p;  0659:                 &nbs= p;          "any user/group on target. This may be= due to host contamination." %
Exception: Exception: KeyError: 'getpwu= id(): uid not found: 1000'
Path /home/ashish/raspberrypi5_whinlater/po= ky/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_whinlat= er/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_pa= ckage: Failed
 
**********************************************************************= ***************************************************************************= *******************************************************
 
 
After I comment below part from recipe it successfully build it:
 
    ${STAGING_BINDIR_NATIVE}/pip3 install --disable-pip-vers= ion-check -v \
        -t ${D}/${PYTHON_SITEPACKAG= ES_DIR} --no-cache-dir --no-deps \
        ${S}/te= nsorflow/lite/tools/pip_package/gen/tflite_pip/python3/dist/tflite_runtime-= ${PV}*cp313*.whl
    rm -rf ${D}${PYTHON_SITEPACKAGES_DIR}/tflite_runtime-${P= V}.dist-info
 
Since I wanted to build rpicam-apps (libcamera-apps)  with tensor= flow-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 int= egrate.
 
How to solve these issues? I am new to Yocto and looking for some help= ? 
 
--NDmFtfRTJsw7NOq2Ulu0--