<?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>14640</bug_id>
          
          <creation_ts>2021-11-29 07:58:59 +0000</creation_ts>
          <short_desc>Relocation error when setting up SDK with rust tools</short_desc>
          <delta_ts>2022-11-14 07:51:09 +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>3.4.1</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>OBSOLETE</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>4.2 M1</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>pgowda.cve</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>sundeep.kokkonda</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>92083</commentid>
    <comment_count>0</comment_count>
    <who name="Peter Bergin">peter</who>
    <bug_when>2021-11-29 07:58:59 +0000</bug_when>
    <thetext>When installing and setting up a SDK with packagegroup-rust-cross-canadian it fails if the installation path is too long. I have found similar issues in meta-rust [1] and some other setup [2] that can be related.


Steps to reproduce:

  &lt;setup standard poky build, qemux86_64&gt;
  $ echo &apos;TOOLCHAIN_HOST_TASK:append = &quot; packagegroup-rust-cross-canadian-${MACHINE}&quot;&apos; &gt;&gt; conf/auto.conf
  $ bitbake core-image-minimal -cpopulate_sdk

  &lt;installation&gt;
  $ ./tmp/deploy/sdk/poky-glibc-x86_64-core-image-minimal-core2-64-qemux86-64-toolchain-3.4+snapshot.sh
  Poky (Yocto Project Reference Distro) SDK installer version 3.4+snapshot
========================================================================
  Enter target directory for SDK (default: /opt/poky/3.4+snapshot): /work/sdk/install/sdk/to/a/really/long/path
  You are about to install the SDK to &quot;/work/sdk/install/sdk/to/a/really/long/path&quot;. Proceed [Y/n]? y
  Extracting SDK....................................................................................done
  Setting it up...ERROR: could not relocate /work/sdk/install/sdk/to/a/really/long/path/sysroots/x86_64-pokysdk-linux/usr/bin/cargo-clippy, interp size = 84 and 99 is needed.
  ERROR: could not relocate /work/sdk/install/sdk/to/a/really/long/path/sysroots/x86_64-pokysdk-linux/usr/bin/cargo, interp size = 84 and 99 is needed.
  ERROR: could not relocate /work/sdk/install/sdk/to/a/really/long/path/sysroots/x86_64-pokysdk-linux/usr/bin/rustfmt, interp size = 84 and 99 is needed.
  ERROR: could not relocate /work/sdk/install/sdk/to/a/really/long/path/sysroots/x86_64-pokysdk-linux/usr/bin/rustdoc, interp size = 84 and 99 is needed.
  ERROR: could not relocate /work/sdk/install/sdk/to/a/really/long/path/sysroots/x86_64-pokysdk-linux/usr/bin/rustc, interp size = 84 and 99 is needed.
  ERROR: could not relocate /work/sdk/install/sdk/to/a/really/long/path/sysroots/x86_64-pokysdk-linux/usr/bin/clippy-driver, interp size = 84 and 99 is needed.
  ERROR: could not relocate /work/sdk/install/sdk/to/a/really/long/path/sysroots/x86_64-pokysdk-linux/usr/lib/x86_64-poky-linux/rustlib/x86_64-unknown-linux-gnu/bin/rust-llvm-dwp, interp size = 84 and 99 is needed.
  done
  SDK has been successfully set up and is ready to be used.
  Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.
   $ . /work/sdk/install/sdk/to/a/really/long/path/environment-setup-core2-64-poky-linux


The workaround is fairly easy and it is to install the SDK to a shorter path. In that sense this is no big blocker but if we can find a solution it would be good. 


[1] https://github.com/kraj/meta-clang/issues/119

[2] https://lists.yoctoproject.org/g/yocto/message/48173</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92125</commentid>
    <comment_count>1</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2021-12-09 15:35:17 +0000</bug_when>
    <thetext>We modify the SDK compile flags or perhaps the compiler itself to make the SDK work so we&apos;ll have to rust SDK components as well. Ping me as needed and we&apos;ll try to find an example.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92126</commentid>
    <comment_count>2</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2021-12-09 15:36:05 +0000</bug_when>
    <thetext>see: meta/recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch

according to RP.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92998</commentid>
    <comment_count>3</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2022-04-12 00:36:57 +0000</bug_when>
    <thetext>Sundeep, Naveen, Peter, 
Is this still a problem or is it resolved by:
https://git.openembedded.org/openembedded-core/commit/?id=7d6f4b1373e4dfafc63702ef2426cd45100f18a3</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93003</commentid>
    <comment_count>4</comment_count>
    <who name="Sundeep KOKKONDA">sundeep.kokkonda</who>
    <bug_when>2022-04-12 09:08:58 +0000</bug_when>
    <thetext>Hi Randy,

The below commit is for different issue (14742).
https://git.openembedded.org/openembedded-core/commit/?id=7d6f4b1373e4dfafc63702ef2426cd45100f18a3

For this issue, the work is in progress with Chandra.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94141</commentid>
    <comment_count>5</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2022-10-13 14:29:18 +0000</bug_when>
    <thetext>Naveen are you the right owner here?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94188</commentid>
    <comment_count>6</comment_count>
    <who name="">pgowda.cve</who>
    <bug_when>2022-10-17 11:36:42 +0000</bug_when>
    <thetext>(In reply to comment #5)
&gt; Naveen are you the right owner here?

I suppose Sundeep is working on this issue.
Hence, he should be the right owner.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94412</commentid>
    <comment_count>7</comment_count>
    <who name="Sundeep KOKKONDA">sundeep.kokkonda</who>
    <bug_when>2022-11-14 07:51:09 +0000</bug_when>
    <thetext>Unable to reproduce the issue with latest sources. Issue fixed with commit ID ce18cc1d72374d7bec2b069b71e72e49aff5649a. For Patch details refer mailing list message https://lists.openembedded.org/g/openembedded-core/message/168878.
Tested the sdk installed cargo and rust and those are working fine. So the issue is closed.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>