<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>16246</bug_id>
          
          <creation_ts>2026-04-14 12:06:07 +0000</creation_ts>
          <short_desc>AB-INT: wic: env file doesn&apos;t exist</short_desc>
          <delta_ts>2026-04-23 14:59:51 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>oe-core other</component>
          <version>5.99</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>AB-INT</status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>6.0 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mathieu Dubois-Briand">mathieu.dubois-briand</reporter>
          <assigned_to name="Paul Barker">paul</assigned_to>
          <cc>paul</cc>
    
    <cc>randy.macleod</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>105065</commentid>
    <comment_count>0</comment_count>
    <who name="Mathieu Dubois-Briand">mathieu.dubois-briand</who>
    <bug_when>2026-04-14 12:06:07 +0000</bug_when>
    <thetext>I had this failure in one of my builds:

Poky - The Yocto Project testing distribution
Running &apos;. ./init-build-env; oe-run-native wic-native wic create directdisk -e core-image-sato -o ${BUILDDIR}/tmp/deploy/wic_images/qemux86/directdisk/core-image-sato/ --vars ${BUILDDIR}/tmp/deploy/images/qemux86/&apos; with output to /srv/pokybuild/yocto-worker/wic/build/build/command-1-cmds.log in /srv/pokybuild/yocto-worker/wic/build/build
Getting sysroot...
Couldn&apos;t get bitbake variable from /srv/pokybuild/yocto-worker/wic/build/build/tmp/deploy/images/qemux86/core-image-sato.env.
File /srv/pokybuild/yocto-worker/wic/build/build/tmp/deploy/images/qemux86/core-image-sato.env doesn&apos;t exist.
Couldn&apos;t get bitbake variable from /srv/pokybuild/yocto-worker/wic/build/build/tmp/deploy/images/qemux86/core-image-sato.env.
File /srv/pokybuild/yocto-worker/wic/build/build/tmp/deploy/images/qemux86/core-image-sato.env doesn&apos;t exist.
Couldn&apos;t get bitbake variable from /srv/pokybuild/yocto-worker/wic/build/build/tmp/deploy/images/qemux86/core-image-sato.env.
File /srv/pokybuild/yocto-worker/wic/build/build/tmp/deploy/images/qemux86/core-image-sato.env doesn&apos;t exist.
Couldn&apos;t get bitbake variable from /srv/pokybuild/yocto-worker/wic/build/build/tmp/deploy/images/qemux86/core-image-sato.env.
File /srv/pokybuild/yocto-worker/wic/build/build/tmp/deploy/images/qemux86/core-image-sato.env doesn&apos;t exist.
Couldn&apos;t get bitbake variable from /srv/pokybuild/yocto-worker/wic/build/build/tmp/deploy/images/qemux86/core-image-sato.env.
File /srv/pokybuild/yocto-worker/wic/build/build/tmp/deploy/images/qemux86/core-image-sato.env doesn&apos;t exist.
Traceback (most recent call last):
  File &quot;/srv/pokybuild/yocto-worker/wic/build/build/tmp/work/x86_64-linux/wic-native/0.3.0/recipe-sysroot-native/usr/bin/wic&quot;, line 8, in &lt;module&gt;
    sys.exit(main())
             ~~~~^^
  File &quot;/srv/pokybuild/yocto-worker/wic/build/build/tmp/work/x86_64-linux/wic-native/0.3.0/recipe-sysroot-native/usr/lib/python3.14/site-packages/wic/cli.py&quot;, line 628, in main
    return hlp.invoke_subcommand(args, parser, hlp.wic_help_usage, subcommands)
           ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File &quot;/srv/pokybuild/yocto-worker/wic/build/build/tmp/work/x86_64-linux/wic-native/0.3.0/recipe-sysroot-native/usr/lib/python3.14/site-packages/wic/help.py&quot;, line 83, in invoke_subcommand
    subcmd[0](args, usage)
    ~~~~~~~~~^^^^^^^^^^^^^
  File &quot;/srv/pokybuild/yocto-worker/wic/build/build/tmp/work/x86_64-linux/wic-native/0.3.0/recipe-sysroot-native/usr/lib/python3.14/site-packages/wic/cli.py&quot;, line 195, in wic_create_subcommand
    raise WicError(&quot;Unable to find the location of the native tools sysroot&quot;)
wic.WicError: Unable to find the location of the native tools sysroot

====================================================================================================
ERROR: Command . ./init-build-env; oe-run-native wic-native wic create directdisk -e core-image-sato -o ${BUILDDIR}/tmp/deploy/wic_images/qemux86/directdisk/core-image-sato/ --vars ${BUILDDIR}/tmp/deploy/images/qemux86/ failed with exit code 1, see errors above. (1776150775.6: 12.8)
====================================================================================================

Looking on the worker, the environment file is indeed missing. Yet, do_rootfs_wicenv was executed during the build, so the file should have been generated.

Log file for do_rootfs_wicenv looks similar to other lo files:

DEBUG: Executing python function set_image_size
DEBUG: 3268205.200000 = 2514004 * 1.300000
DEBUG: 3370605.200000 = max(3268205.200000, 65536)[3268205.200000] + 102400
DEBUG: 3370606.000000 = int(3370605.200000)
DEBUG: 3370606 = aligned(3370606)
DEBUG: returning 3370606
DEBUG: Python function set_image_size finished
DEBUG: Executing python function do_rootfs_wicenv
DEBUG: Python function do_rootfs_wicenv finished</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105066</commentid>
    <comment_count>1</comment_count>
    <who name="Mathieu Dubois-Briand">mathieu.dubois-briand</who>
    <bug_when>2026-04-14 12:07:03 +0000</bug_when>
    <thetext>Kinda related question for the next triage meeting: should we create a bugzilla section for &quot;wic&quot; in &quot;Yocto Project Subprojects&quot;?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105070</commentid>
    <comment_count>2</comment_count>
    <who name="Mathieu Dubois-Briand">mathieu.dubois-briand</who>
    <bug_when>2026-04-14 12:07:42 +0000</bug_when>
    <thetext>wic fedora43-vk-1 mathieu/master-next completed at 2026-04-14 07:27:51+00:00
https://autobuilder.yoctoproject.org/valkyrie/#/builders/15/builds/3546/steps/13/logs/stdio</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105078</commentid>
    <comment_count>3</comment_count>
    <who name="Mathieu Dubois-Briand">mathieu.dubois-briand</who>
    <bug_when>2026-04-15 13:29:09 +0000</bug_when>
    <thetext>wic fedora43-vk-1 mathieu/master-next completed at 2026-04-14 18:45:47+00:00
https://autobuilder.yoctoproject.org/valkyrie/#/builders/15/builds/3550/steps/13/logs/stdio</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105153</commentid>
    <comment_count>4</comment_count>
    <who name="Mathieu Dubois-Briand">mathieu.dubois-briand</who>
    <bug_when>2026-04-20 08:02:38 +0000</bug_when>
    <thetext>wic ubuntu2204-vk-4 master completed at 2026-04-20 01:21:31+00:00
https://autobuilder.yoctoproject.org/valkyrie/#/builders/15/builds/3577/steps/13/logs/stdio</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105182</commentid>
    <comment_count>5</comment_count>
    <who name="Paul Barker">paul</who>
    <bug_when>2026-04-21 20:13:31 +0000</bug_when>
    <thetext>Patches sent:

- https://lore.kernel.org/openembedded-core/20260421-wicenv-v1-1-75450eff8364@pbarker.dev/T/

- https://lore.kernel.org/yocto-patches/20260421-wicenv-v1-1-17447e94d2f6@pbarker.dev/T/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105188</commentid>
    <comment_count>6</comment_count>
    <who name="Mathieu Dubois-Briand">mathieu.dubois-briand</who>
    <bug_when>2026-04-22 08:59:46 +0000</bug_when>
    <thetext>wic ubuntu2404-vk-2 master&amp;master-next completed at 2026-04-21 15:14:01+00:00
https://autobuilder.yoctoproject.org/valkyrie/#/builders/15/builds/3596/steps/13/logs/stdio</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105225</commentid>
    <comment_count>7</comment_count>
    <who name="Paul Barker">paul</who>
    <bug_when>2026-04-23 14:59:51 +0000</bug_when>
    <thetext>Fixes merged:

- https://git.openembedded.org/openembedded-core/commit/?id=e4d49702f21fb75444d58f419432649a04e351c9

- https://git.yoctoproject.org/yocto-autobuilder-helper/commit/?id=251dbadeb48a21c825c952a140b42523e5463229</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>