<?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>15486</bug_id>
          
          <creation_ts>2024-05-17 16:28:40 +0000</creation_ts>
          <short_desc>Meson broken in eSDK</short_desc>
          <delta_ts>2025-08-21 14:47: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>devtools / tool chain</component>
          <version>5.0</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></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>5.3 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ross Burton">ross.burton</reporter>
          <assigned_to name="Ross Burton">ross.burton</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</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>99029</commentid>
    <comment_count>0</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2024-05-17 16:28:40 +0000</bug_when>
    <thetext>Meson is broken in an eSDK.

Once a eSDK has been built/installed, you need to install meson itself:

$ devtool sdk-install meson-native

But then running &apos;meson&apos; doesn&apos;t actually inject the cross variables as it does with a normal SDK:

$ meson build
The Meson build system
Version: 1.3.1
Source dir: /home/rosbur01/Mess/libepoxy-1.5.3
Build dir: /home/rosbur01/Mess/libepoxy-1.5.3/build
Build type: native build
Project name: libepoxy
Project version: 1.5.3

meson.build:1:0: ERROR: Could not invoke sanity test executable: [Errno 8] Exec format error: &apos;/home/rosbur01/Mess/libepoxy-1.5.3/build/meson-private/sanitycheckc.exe&apos;.

Note how it thinks its doing a native build, but is using the cross compiler.

This is because the wrapper script only redirects if OECORE_NATIVE_SYSROOT is set, and it is not inside an eSDK.  We can manually set it for testing:

$ export OECORE_NATIVE_SYSROOT=/home/rosbur01/esdk/tmp/sysroots/aarch64
$ meson setup build
meson-wrapper: Running meson with setup options: &quot; --cross-file=/home/rosbur01/esdk/tmp/sysroots/aarch64/usr/share/meson/i686-poky-linux-meson.cross --native-file=/home/rosbur01/esdk/tmp/sysroots/aarch64/usr/share/meson/meson.native &quot;
Could not find any valid candidate for cross files: /home/rosbur01/esdk/tmp/sysroots/aarch64/usr/share/meson/i686-poky-linux-meson.cross

ERROR: Cannot find specified cross file: /home/rosbur01/esdk/tmp/sysroots/aarch64/usr/share/meson/i686-poky-linux-meson.cross

The meson.cross file doesn&apos;t exist because it is meant to be generated by the meson-setup.py as part of the relocation process, which is done totally differently in eSDK.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102648</commentid>
    <comment_count>1</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2025-08-21 14:47:51 +0000</bug_when>
    <thetext>Fixed proper eSDK, minimal eSDK still broken (https://bugzilla.yoctoproject.org/show_bug.cgi?id=15854).</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>