<?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>16383</bug_id>
          
          <creation_ts>2026-07-31 14:38:14 +0000</creation_ts>
          <short_desc>wic: syslinux-native is gated on the build host instead of the target</short_desc>
          <delta_ts>2026-08-04 02:27:59 +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>core</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Undecided</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Trevor Woerner">twoerner</reporter>
          <assigned_to name="Trevor Woerner">twoerner</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</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>106407</commentid>
    <comment_count>0</comment_count>
    <who name="Trevor Woerner">twoerner</who>
    <bug_when>2026-07-31 14:38:14 +0000</bug_when>
    <thetext>image_types_wic.bbclass gates syslinux-native on the build host rather
than on the target, so an x86 image built on a non-x86 host is given the
target bootloader without the installer wic needs in order to use it.

This is the other half of bug 13276:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=13276

That bug reported builds failing on non-x86 hosts, and it was correctly
fixed for the case reported. Filing separately rather than reopening,
because the reported symptom really was resolved; what follows is a
different case that the fix left behind.

Every table below assumes an image that uses wic, and shows whether that
image ends up depending on syslinux-native.

1. As bug 13276 was reported. WKS_FILE_DEPENDS_DEFAULT listed
   syslinux-native unconditionally, and the syslinux recipe set
   COMPATIBLE_HOST to x86 for every variant, native included:

       build host | target  | syslinux-native | result
       -----------+---------+-----------------+---------------------
       x86        | x86     | yes             | works
       x86        | non-x86 | yes             | works, but wasteful
       non-x86    | x86     | yes             | BUILD FAILS
       non-x86    | non-x86 | yes             | BUILD FAILS  &lt;- reported

2. After the fix that closed bug 13276, which gated the dependency on
   BUILD_ARCH:

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

       build host | target  | syslinux-native | result
       -----------+---------+-----------------+---------------------
       x86        | x86     | yes             | works
       x86        | non-x86 | yes             | works, but wasteful
       non-x86    | x86     | no              | installer missing
       non-x86    | non-x86 | no              | works  &lt;- reported case fixed

   The reported failure is gone. But the dependency was dropped from
   both non-x86-host rows, including the one that legitimately needs
   syslinux-native, so an x86 image built on a non-x86 host now gets the
   target bootloader without the installer wic has to run to use it.

   Richard made exactly this point in comment 1 on that bug: &quot;The
   dependency would still seem inaccurate and should probably only be
   added if the target machine is x86?&quot; The patch that landed gated on
   the build host instead.

3. After the syslinux recipe was reworked so that only its target code
   is x86-specific:

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

       build host | target  | syslinux-native | result
       -----------+---------+-----------------+----------------------------
       x86        | x86     | yes             | works
       x86        | non-x86 | yes             | works, but wasteful
       non-x86    | x86     | no              | installer missing, and now
                  |         |                 | needlessly so
       non-x86    | non-x86 | no              | works

   Nothing moved, and that is the point: the constraint that justified
   gating on the build host disappeared in 2020. That commit message
   even names the case it was enabling, &quot;arm64 build host, qemux86
   target&quot;, which is exactly the row that is still broken.

4. Gating on the target instead, the way wic-tools has always done it:

       build host | target  | syslinux-native | result
       -----------+---------+-----------------+---------------------
       x86        | x86     | yes             | works
       x86        | non-x86 | no              | waste removed
       non-x86    | x86     | yes             | works
       non-x86    | non-x86 | no              | works  &lt;- still fixed

The bottom-right row is the one bug 13276 reported, and it never regains
the dependency: a target gate excludes a non-x86 target whatever the
build host is. The build-host gate was never load-bearing for the
reported case.

The only row that changes behaviour is non-x86 host with an x86 target,
which starts building syslinux-native where it previously skipped it. I
do not have a non-x86 build host to confirm that, so a test from someone
who does would be very welcome. Three things suggest it is safe:
7273e131bfc7 was written specifically to enable it, its author was at
Arm at the time, and wic-tools already gates syslinux-native on the
target, so &quot;bitbake wic-tools&quot; on an arm64 host with an x86 target
exercises the same path today. If it does turn out to fail, that would
be a syslinux recipe issue -- it would need a COMPATIBLE_HOST for
native, contradicting the intent of 7273e131bfc7 -- rather than a wic
one.

A patch is included in a wic series about to be posted to
openembedded-core.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106410</commentid>
    <comment_count>1</comment_count>
    <who name="Trevor Woerner">twoerner</who>
    <bug_when>2026-08-02 02:32:21 +0000</bug_when>
    <thetext>Patch posted to the openembedded-core list, as part of the series
&quot;[PATCH v5 0/6] wic: ship the tools it invokes&quot;:

[PATCH v5 6/6] wic: gate syslinux-native on the target, not the build host

https://lore.kernel.org/openembedded-core/20260731152810.2641327-7-twoerner@gmail.com/
https://lists.openembedded.org/g/openembedded-core/message/242452

Moving to IN PROGRESS REVIEW.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106411</commentid>
    <comment_count>2</comment_count>
    <who name="Trevor Woerner">twoerner</who>
    <bug_when>2026-08-02 02:32:31 +0000</bug_when>
    <thetext>v6 supersedes v5.

[PATCH v6 6/6] image_types_wic: gate syslinux-native on the target, not the build host

https://lore.kernel.org/openembedded-core/20260802021000.2886095-7-twoerner@gmail.com/
https://lists.openembedded.org/g/openembedded-core/message/242515

Same fix. It is retitled because it now touches only
image_types_wic.bbclass, and the target gating hangs off
WKS_FILE_DEPENDS_DEFAULT directly rather than the shared helper-tool
variable that v5 introduced and v6 dropped.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106412</commentid>
    <comment_count>3</comment_count>
    <who name="Trevor Woerner">twoerner</who>
    <bug_when>2026-08-02 02:35:33 +0000</bug_when>
    <thetext>Tooling check: verifying rest-bugzilla.sh raw now authenticates writes correctly. Please ignore.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106425</commentid>
    <comment_count>4</comment_count>
    <who name="Trevor Woerner">twoerner</who>
    <bug_when>2026-08-04 02:27:59 +0000</bug_when>
    <thetext>Fixed in master.

The fix for this bug specifically:

  image_types_wic: gate syslinux-native on the target, not the build host
  https://git.openembedded.org/openembedded-core/commit/?id=11a0582524ebf6c954c0d0bc2fd50683b27e986d

It was merged as part of &quot;[PATCH v6 0/6] wic: ship the tools it invokes&quot;,
all six of which are now in master:

  wic-tools: drop the target bootloader firmware
  https://git.openembedded.org/openembedded-core/commit/?id=78c9b1025a69dcf15beef9a55dc193ce8ddc0004

  image_types_wic, wic-tools: drop the obsolete cross-binutils dependency
  https://git.openembedded.org/openembedded-core/commit/?id=5eb21599c36a3313c1ba2a6b0aaf2ed7296d415c

  wic: add runtime dependencies on the tools it invokes
  https://git.openembedded.org/openembedded-core/commit/?id=e15d4865f611bb41e4cac295b40ffceb9026f3ca

  oeqa/selftest/wic: drop dead COREBASE/scripts wic lookup
  https://git.openembedded.org/openembedded-core/commit/?id=fc6e389180e49c583c9f2b504ec4402cd72309d3

  oeqa/selftest/wic: drop redundant per-test PATH overrides
  https://git.openembedded.org/openembedded-core/commit/?id=62a73618eadffeea38534695fc5cc88fa4424f1a

Series posting:
https://lore.kernel.org/openembedded-core/20260802021000.2886095-1-twoerner@gmail.com/</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>