<?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>14967</bug_id>
          
          <creation_ts>2022-11-11 01:12:55 +0000</creation_ts>
          <short_desc>rust-cross broken for ARMv5</short_desc>
          <delta_ts>2023-05-20 18:59:21 +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>4.0</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>4.0.11</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Denys Dmytriyenko">denis</reporter>
          <assigned_to name="Steve Sakoman">steve</assigned_to>
          <cc>cp0613</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</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>94408</commentid>
    <comment_count>0</comment_count>
    <who name="Denys Dmytriyenko">denis</who>
    <bug_when>2022-11-11 01:12:55 +0000</bug_when>
    <thetext>rust-cross is broken for ARMv5 on Kirkstone. Seems to be fine on Langdale/master, but there were tons of rust-cross changes since Kirkstone

Logs:

$ bitbake librsvg
Loading cache: 100% |                                                                                                                                                                       | ETA:  --:--:--
Loaded 0 entries from dependency cache.
Parsing recipes: 100% |######################################################################################################################################################################| Time: 0:00:05
Parsing of 882 .bb files complete (0 cached, 882 parsed). 1641 targets, 61 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION           = &quot;2.0.0&quot;
BUILD_SYS            = &quot;x86_64-linux&quot;
NATIVELSBSTRING      = &quot;ubuntu-20.04&quot;
TARGET_SYS           = &quot;arm-poky-linux-gnueabi&quot;
MACHINE              = &quot;qemuarmv5&quot;
DISTRO               = &quot;poky&quot;
DISTRO_VERSION       = &quot;4.0.5&quot;
TUNE_FEATURES        = &quot;arm armv5 thumb dsp&quot;
TARGET_FPU           = &quot;soft&quot;
meta                 
meta-poky            
meta-yocto-bsp       = &quot;kirkstone:1cb13d24b592986a44fd653e083b7711513fc916&quot;

NOTE: Fetching uninative binary shim http://downloads.yoctoproject.org/releases/uninative/3.7/x86_64-nativesdk-libc-3.7.tar.xz;sha256sum=b110bf2e10fe420f5ca2f3ec55f048ee5f0a54c7e34856a3594e51eb2aea0570 (will check PREMIRRORS first)
Initialising tasks: 100% |###################################################################################################################################################################| Time: 0:00:01
Checking sstate mirror object availability: 100% |###########################################################################################################################################| Time: 0:00:03
Sstate summary: Wanted 496 Local 0 Mirrors 211 Missed 285 Current 0 (42% match, 0% complete)
NOTE: Executing Tasks
ERROR: rust-cross-armv5e-glibc-1.59.0-r0 do_rust_gen_targets: Error executing a python function in exec_func_python() autogenerated:

The stack trace of python calls that resulted in this exception/failure was:
File: &apos;exec_func_python() autogenerated&apos;, lineno: 2, function: &lt;module&gt;
     0001:
 *** 0002:do_rust_gen_targets(d)
     0003:
File: &apos;/OE/poky-kirkstone/meta/recipes-devtools/rust/rust-cross.inc&apos;, lineno: 19, function: do_rust_gen_targets
     0015:            if arch == &quot;arm&quot; and target_is_armv7(d):
     0016:                arch = &apos;armv7&apos;
     0017:            features = d.getVar(&apos;TARGET_LLVM_FEATURES&apos;) or &quot;&quot;
     0018:            cpu = d.getVar(&apos;TARGET_LLVM_CPU&apos;)
 *** 0019:        rust_gen_target(d, thing, wd, features, cpu, arch, abi)
     0020:}
     0021:
     0022:# Otherwise we&apos;ll depend on what we provide
     0023:INHIBIT_DEFAULT_RUST_DEPS = &quot;1&quot;
File: &apos;/OE/poky-kirkstone/meta/recipes-devtools/rust/rust-common.inc&apos;, lineno: 314, function: rust_gen_target
     0310:    # build tspec
     0311:    tspec = {}
     0312:    tspec[&apos;llvm-target&apos;] = d.getVar(&apos;RUST_TARGET_SYS&apos;, arch_abi)
     0313:    tspec[&apos;data-layout&apos;] = d.getVarFlag(&apos;DATA_LAYOUT&apos;, arch_abi)
 *** 0314:    tspec[&apos;max-atomic-width&apos;] = int(d.getVarFlag(&apos;MAX_ATOMIC_WIDTH&apos;, arch_abi))
     0315:    tspec[&apos;target-pointer-width&apos;] = d.getVarFlag(&apos;TARGET_POINTER_WIDTH&apos;, arch_abi)
     0316:    tspec[&apos;target-c-int-width&apos;] = d.getVarFlag(&apos;TARGET_C_INT_WIDTH&apos;, arch_abi)
     0317:    tspec[&apos;target-endian&apos;] = d.getVarFlag(&apos;TARGET_ENDIAN&apos;, arch_abi)
     0318:    tspec[&apos;arch&apos;] = arch_to_rust_target_arch(rust_arch)
Exception: TypeError: int() argument must be a string, a bytes-like object or a number, not &apos;NoneType&apos;

ERROR: Logfile of failure stored in: /OE/poky-kirkstone/build/tmp/work/x86_64-linux/rust-cross-armv5e-glibc/1.59.0-r0/temp/log.do_rust_gen_targets.30873
ERROR: Task (/OE/poky-kirkstone/meta/recipes-devtools/rust/rust-cross_1.59.0.bb:do_rust_gen_targets) failed with exit code &apos;1&apos;
NOTE: Tasks Summary: Attempted 1245 tasks of which 940 didn&apos;t need to be rerun and 1 failed.

Summary: 1 task failed:
  /OE/poky-kirkstone/meta/recipes-devtools/rust/rust-cross_1.59.0.bb:do_rust_gen_targets
Summary: There was 1 ERROR message, returning a non-zero exit code.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94413</commentid>
    <comment_count>1</comment_count>
    <who name="Chen Pei">cp0613</who>
    <bug_when>2022-11-16 01:45:03 +0000</bug_when>
    <thetext>You can add the &apos;-eabi&apos; for arm-unknown-linux-gnueabihf temporarily in rust-common.inc. I found from the git log that this has been repeatedly modified.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94424</commentid>
    <comment_count>2</comment_count>
    <who name="Denys Dmytriyenko">denis</who>
    <bug_when>2022-11-17 00:56:46 +0000</bug_when>
    <thetext>For the reference.

This commit changed the target generation keyed of from just &lt;arch&gt; to &lt;arch&gt;-&lt;abi&gt;:

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

These are the commits that changed the entry back and forth between &quot;arm&quot; and &quot;arm-eabi&quot;:

https://git.openembedded.org/openembedded-core/commit/?id=ef49f89c89889466ee3696ab680f8e10c961a677
https://git.openembedded.org/openembedded-core/commit/?id=299f429a1ee387681ba70e33ca23f165e5837961
https://git.openembedded.org/openembedded-core/commit/?id=a4886f02dfb78e861fd7afe07b4a25c262bf0421

Since qemuarm = armv7, not sure why &quot;arm&quot; entry was modified, not &quot;armv7&quot;. This does affect qemuarmv5 negatively though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95579</commentid>
    <comment_count>3</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2023-05-20 18:59:21 +0000</bug_when>
    <thetext>I think I heard Steve say that this likely won&apos;t get fixed on the 4.0.* branch.
Since we have The newer rust code and build rules in:
  https://git.yoctoproject.org/meta-lts-mixins/log/?h=kirkstone/rust-1.68

I&apos;m going to close the defect as Won&apos;t Fix.
If that&apos;s a problem for you Denys, please re-open and explain why you can&apos;t use the mixin layer.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>