<?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>15775</bug_id>
          
          <creation_ts>2025-02-27 09:04:33 +0000</creation_ts>
          <short_desc>go-cross-canadian: does not produce correct binaries for cross build</short_desc>
          <delta_ts>2025-08-08 17:15:22 +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>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>15204</dup_id>
          
          <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>kweihmann</reporter>
          <assigned_to name="Osama Abdelkader">osama.abdelkader</assigned_to>
          <cc>alex.kanavin</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>osama.abdelkader</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>sundeep.kokkonda</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>101235</commentid>
    <comment_count>0</comment_count>
    <who name="">kweihmann</who>
    <bug_when>2025-02-27 09:04:33 +0000</bug_when>
    <thetext>Environment:

- plain poky
- target: qemuarm64
- host: x64_86 build machine

Reproduce:

- run bitbake go-cross-canadian-aarch64

Output:

Build Configuration:
BB_VERSION           = &quot;2.9.1&quot;
BUILD_SYS            = &quot;x86_64-linux&quot;
NATIVELSBSTRING      = &quot;universal&quot;
TARGET_SYS           = &quot;aarch64-poky-linux&quot;
MACHINE              = &quot;qemuarm64&quot;
DISTRO               = &quot;poky&quot;
DISTRO_VERSION       = &quot;5.1&quot;
TUNE_FEATURES        = &quot;aarch64 crc cortexa57&quot;
TARGET_FPU           = &quot;&quot;
meta                 
meta-poky            
meta-yocto-bsp       = &quot;master:2ae32dae580105156a151fa3dc7cbfe8673636e5&quot;

Sstate summary: Wanted 72 Local 2 Mirrors 0 Missed 70 Current 248 (2% match, 78% complete)#################################################              | ETA:  0:00:00
Initialising tasks: 100% |###############################################################################################################################| Time: 0:00:00
NOTE: Executing Tasks
ERROR: go-cross-canadian-aarch64-1.22.12-r0 do_install: Execution of 
  &apos;/path/to/build/tmp/work/x86_64-nativesdk-pokysdk-linux/go-cross-canadian-aarch64/1.22.12/temp/run.do_install.3322717&apos; failed with exit code 1
ERROR: Logfile of failure stored in: /path/to/build/tmp/work/x86_64-nativesdk-pokysdk-linux/go-cross-canadian-aarch64/1.22.12/temp/log.do_install.3322717
Log data follows:
| DEBUG: Executing python function extend_recipe_sysroot
| NOTE: Direct dependencies are [&apos;/path/to/layer/poky/meta/recipes-devtools/gcc/gcc-crosssdk_14.2.bb:do_populate_sysroot&apos;, 
    &apos;/path/to/layer/poky/meta/recipes-devtools/go/go-binary-native_1.22.12.bb:do_populate_sysroot&apos;, 
    &apos;/path/to/layer/poky/meta/recipes-devtools/go/go-crosssdk_1.22.12.bb:do_populate_sysroot&apos;, 
    &apos;/path/to/layer/poky/meta/recipes-devtools/quilt/quilt-native_0.68.bb:do_populate_sysroot&apos;, 
    &apos;virtual:native:/path/to/layer/poky/meta/recipes-devtools/chrpath/chrpath_0.18.bb:do_populate_sysroot&apos;, 
    &apos;virtual:native:/path/to/layer/poky/meta/recipes-devtools/pseudo/pseudo_git.bb:do_populate_sysroot&apos;, 
    &apos;virtual:nativesdk:/path/to/layer/poky/meta/recipes-core/glibc/glibc_2.41.bb:do_populate_sysroot&apos;, 
    &apos;virtual:nativesdk:/path/to/layer/poky/meta/recipes-devtools/gcc/gcc-runtime_14.2.bb:do_populate_sysroot&apos;, 
    &apos;virtual:nativesdk:/path/to/layer/poky/meta/recipes-devtools/go/go-runtime_1.22.12.bb:do_populate_sysroot&apos;]
| NOTE: Installed into sysroot: []
| NOTE: Skipping as already exists in sysroot: [&apos;gettext-minimal-native&apos;, 
          &apos;binutils-crosssdk-x86_64-pokysdk-linux&apos;, &apos;gcc-crosssdk-x86_64-pokysdk-linux&apos;, &apos;go-binary-native&apos;, 
          &apos;go-crosssdk-x86_64-pokysdk-linux&apos;, &apos;libtool-native&apos;, &apos;m4-native&apos;, &apos;quilt-native&apos;, &apos;texinfo-dummy-native&apos;, 
          &apos;gettext-native&apos;, &apos;zlib-native&apos;, &apos;chrpath-native&apos;, &apos;flex-native&apos;, &apos;gnu-config-native&apos;, &apos;pseudo-native&apos;, 
          &apos;xz-native&apos;, &apos;zstd-native&apos;, &apos;attr-native&apos;, &apos;gmp-native&apos;, &apos;libmpc-native&apos;, &apos;mpfr-native&apos;, &apos;sqlite3-native&apos;, 
          &apos;nativesdk-glibc&apos;, &apos;nativesdk-gcc-runtime&apos;, &apos;nativesdk-libgcc&apos;, &apos;nativesdk-go-runtime&apos;, 
          &apos;nativesdk-linux-libc-headers&apos;]
| DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing shell function do_install
| install: omitting directory &apos;/path/to/build/tmp/work/x86_64-nativesdk-pokysdk-linux/go-cross-canadian-aarch64/1.22.12/go/bin/linux_arm64&apos;
| WARNING: exit code 1 from a shell command.
ERROR: Task (/path/to/layer/poky/meta/recipes-devtools/go/go-cross-canadian_1.22.12.bb:do_install) failed with exit code &apos;1&apos;
NOTE: Tasks Summary: Attempted 1121 tasks of which 973 didn&apos;t need to be rerun and 1 failed.

Summary: 1 task failed:
  /path/to/layer/poky/meta/recipes-devtools/go/go-cross-canadian_1.22.12.bb:do_install
    log: /path/to/build/tmp/work/x86_64-nativesdk-pokysdk-linux/go-cross-canadian-aarch64/1.22.12/temp/log.do_install.3322717
Summary: There was 1 ERROR message, returning a non-zero exit code.

---

From the output it looks like `/go/bin/linux_arm64` is the wrong architecture.
Expected the host arch is x86_64.
PS: all the binaries in linux_arm64 are aarch64 as expected, so the passed down 
information into the build seems to be entirely mixed up in terms of host
and target arch.
PS: things ofc work with x86_64 target configuration, but it&apos;s just shadowing the issue

PS: tested revisions

a13c62b66b724e60cc6beae4ac88a5a9acc438e1 shows #15204
everything above:
891d30a5d435081b72790eba86a642ce5df0a353 shows error


Partly reverting https://git.yoctoproject.org/poky/commit/meta/recipes-devtools/go?id=34157b4b1aa40fbf2a70238a553e54f6bd157ace

from

- ./make.bash --target-only --no-banner
+ ./make.bash --host-only --no-banner

Solves the issue!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101245</commentid>
    <comment_count>1</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2025-02-27 15:47:29 +0000</bug_when>
    <thetext>Alex, Any comments?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101250</commentid>
    <comment_count>2</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2025-02-27 16:13:49 +0000</bug_when>
    <thetext>I dont have any. Other than the usual &apos;patches welcome&apos;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101845</commentid>
    <comment_count>3</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2025-05-01 14:09:07 +0000</bug_when>
    <thetext>Bulk move of most 5.2-M4 unassigned bugs to 5.3-M2.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102574</commentid>
    <comment_count>4</comment_count>
    <who name="Osama Abdelkader">osama.abdelkader</who>
    <bug_when>2025-08-08 17:07:07 +0000</bug_when>
    <thetext>same patch of #15204 fix the problem:

https://patchwork.yoctoproject.org/project/oe-core/patch/20250808161533.13752-1-osama.abdelkader@gmail.com/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102575</commentid>
    <comment_count>5</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2025-08-08 17:15:22 +0000</bug_when>
    <thetext>Seems to be a duplicate. Re-open if not.

*** This bug has been marked as a duplicate of bug 15204 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>