<?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>14849</bug_id>
          
          <creation_ts>2022-06-29 08:42:18 +0000</creation_ts>
          <short_desc>rust cross-canadian is not working for all architectures</short_desc>
          <delta_ts>2022-09-14 06:26:00 +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>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>4.1 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Peter Bergin">peter</reporter>
          <assigned_to name="Sundeep KOKKONDA">sundeep.kokkonda</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>ross.burton</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>93605</commentid>
    <comment_count>0</comment_count>
    <who name="Peter Bergin">peter</who>
    <bug_when>2022-06-29 08:42:18 +0000</bug_when>
    <thetext>With input from Richard Purdie in this thread (https://lists.yoctoproject.org/g/yocto/topic/91864950#57400) it is stated that cross-canadian support for rust is not working.

Here is one example of a non working setup built on a x86_64 machine:

$ cat conf/auto.conf 
MACHINE = &quot;qemuarm64&quot;
SDKMACHINE = &quot;aarch64&quot;
$ bitbake rust-cross-canadian-aarch64

It fails with this error:

&lt;snip&gt;
| Couldn&apos;t find required command: ninja (or ninja-build)
| 
| You should install ninja as described at
| &lt;https://github.com/ninja-build/ninja/wiki/Pre-built-Ninja-packages&gt;,
| or set `ninja = false` in the `[llvm]` section of `config.toml`.
| Alternatively, set `download-ci-llvm = true` in that `[llvm]` section
| to download LLVM rather than building it.
| 
| Traceback (most recent call last):
|   File &quot;/work/yocto/poky3/build/tmp/work/aarch64-nativesdk-pokysdk-linux/rust-cross-canadian-aarch64/1.60.0-r0/rustc-1.60.0-src/src/bootstrap/bootstrap.py&quot;, line 1342, in &lt;module&gt;
|     main()
|   File &quot;/work/yocto/poky3/build/tmp/work/aarch64-nativesdk-pokysdk-linux/rust-cross-canadian-aarch64/1.60.0-r0/rustc-1.60.0-src/src/bootstrap/bootstrap.py&quot;, line 1325, in main
|     bootstrap(help_triggered)
|   File &quot;/work/yocto/poky3/build/tmp/work/aarch64-nativesdk-pokysdk-linux/rust-cross-canadian-aarch64/1.60.0-r0/rustc-1.60.0-src/src/bootstrap/bootstrap.py&quot;, line 1311, in bootstrap
|     run(args, env=env, verbose=build.verbose, is_bootstrap=True)
|   File &quot;/work/yocto/poky3/build/tmp/work/aarch64-nativesdk-pokysdk-linux/rust-cross-canadian-aarch64/1.60.0-r0/rustc-1.60.0-src/src/bootstrap/bootstrap.py&quot;, line 185, in run
|     raise RuntimeError(err)
| RuntimeError: failed to run: /work/yocto/poky3/build/tmp/work/aarch64-nativesdk-pokysdk-linux/rust-cross-canadian-aarch64/1.60.0-r0/rustc-1.60.0-src/build/bootstrap/debug/bootstrap -j 8 build --stage 2 --verbose
| WARNING: /work/yocto/poky3/build/tmp/work/aarch64-nativesdk-pokysdk-linux/rust-cross-canadian-aarch64/1.60.0-r0/temp/run.do_compile.4136476:177 exit 1 from &apos;python3 src/bootstrap/bootstrap.py -j 8 &quot;$@&quot; --verbose&apos;
| WARNING: Backtrace (BB generated script):
| 	#1: rust_runx, /work/yocto/poky3/build/tmp/work/aarch64-nativesdk-pokysdk-linux/rust-cross-canadian-aarch64/1.60.0-r0/temp/run.do_compile.4136476, line 177
| 	#2: do_compile, /work/yocto/poky3/build/tmp/work/aarch64-nativesdk-pokysdk-linux/rust-cross-canadian-aarch64/1.60.0-r0/temp/run.do_compile.4136476, line 160
| 	#3: main, /work/yocto/poky3/build/tmp/work/aarch64-nativesdk-pokysdk-linux/rust-cross-canadian-aarch64/1.60.0-r0/temp/run.do_compile.4136476, line 200</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93615</commentid>
    <comment_count>1</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2022-06-30 14:36:42 +0000</bug_when>
    <thetext>SDKMACHINE=aarch64 MACHINE=qemuarm64 still breaks even the patch give on the email list so please confirm that and work on a more general fix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93616</commentid>
    <comment_count>2</comment_count>
    <who name="Peter Bergin">peter</who>
    <bug_when>2022-06-30 14:49:09 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; SDKMACHINE=aarch64 MACHINE=qemuarm64 still breaks even the patch give on the
&gt; email list so please confirm that and work on a more general fix.

The fix on the list was not aimed to fix this issue. It was aimed for SDKMACHINE=&quot;x86_64&quot; and MACHINE=&quot;qemuarm64&quot;. This issue was spotted by Richard and has no solution.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93750</commentid>
    <comment_count>3</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2022-08-11 09:15:58 +0000</bug_when>
    <thetext>Sundeep, Peter, 

Please report on whether the rust re-write that Richard has done resolves this problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93978</commentid>
    <comment_count>4</comment_count>
    <who name="Sundeep KOKKONDA">sundeep.kokkonda</who>
    <bug_when>2022-09-05 12:32:54 +0000</bug_when>
    <thetext>Hello Randy,

With latest sources this problem is solved and build is success without any issues.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93979</commentid>
    <comment_count>5</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2022-09-06 14:09:40 +0000</bug_when>
    <thetext>Sundeep, Great. Please provide an oe-core link to master.
Peter, Does this fix work for you?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93981</commentid>
    <comment_count>6</comment_count>
    <who name="Peter Bergin">peter</who>
    <bug_when>2022-09-06 18:41:50 +0000</bug_when>
    <thetext>Randy, it has worked for me all the time. I opened this on your request to track the observation from Richard that this was broken. I appreciate all the work done by everyone to get the rust support in a better shape in oe-core.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93982</commentid>
    <comment_count>7</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2022-09-06 21:46:04 +0000</bug_when>
    <thetext>Thanks Peter. Sorry for the noise, i have too much going on and was just trying to ensure that you were happy! 

Sundeep, Please provide the link and resolve the defect.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94023</commentid>
    <comment_count>8</comment_count>
    <who name="Sundeep KOKKONDA">sundeep.kokkonda</who>
    <bug_when>2022-09-12 07:11:59 +0000</bug_when>
    <thetext>Issue fixed on latest sources. Checked with patch https://git.openembedded.org/openembedded-core/commit/?h=master-next&amp;id=7cd6faf4e0147eef557f83fb266a25935e26efff on master-next.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94024</commentid>
    <comment_count>9</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2022-09-12 20:46:42 +0000</bug_when>
    <thetext>Sundeep,

Not all commits to master-next are merged to master so please ONLY use commit links to the master or other release branches.

The right link here seems to be:

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

Right?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94030</commentid>
    <comment_count>10</comment_count>
    <who name="Sundeep KOKKONDA">sundeep.kokkonda</who>
    <bug_when>2022-09-14 06:26:00 +0000</bug_when>
    <thetext>Yes, the link https://git.openembedded.org/openembedded-core/commit/?id=7cd6faf4e0147eef557f83fb266a25935e26efff is correct.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>