kraj / meta-clang

Clang C/C++ cross compiler and runtime for OpenEmbedded/Yocto Project
MIT License
153 stars 198 forks source link

When setting up sdk relocating error #119

Open Lorac opened 5 years ago

Lorac commented 5 years ago

When I setup our SDK I get this error :

ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/lib/libclang.so.8, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/lib/LLVMgold.so, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/lib/libOptRemarks.so.8, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/lib/libLTO.so.8, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/clang-format, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/clang-tblgen, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/llvm-stress, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/llvm-diff, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/clang-offload-bundler, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/llvm-extract, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/llvm-cxxfilt, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/llvm-opt-report, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/llvm-profdata, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/llvm-bcanalyzer, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/diagtool, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/llvm-nm, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/llvm-rtdyld, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/lld, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/clang-tidy, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/clang-extdef-mapping, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/llvm-config, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/bugpoint, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/llvm-as, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/clang-refactor, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/clang-8, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/llc, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/lli, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/yaml2obj, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/llvm-modextract, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/llvm-cxxdump, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/llvm-cat, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/dsymutil, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/opt, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/llvm-mt, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/llvm-xray, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/llvm-mca, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/llvm-dwarfdump, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/clang-import-test, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/llvm-size, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/llvm-lto2, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/llvm-elfabi, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/llvm-symbolizer, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/modularize, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/llvm-cvtres, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/llvm-c-test, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/llvm-objcopy, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/llvm-cxxmap, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/llvm-split, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/llvm-strings, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/llvm-mc, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/llvm-rc, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/clang-apply-replacements, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/sancov, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/clang-query, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/llvm-lto, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/llvm-cfi-verify, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/llvm-objdump, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/llvm-ar, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/clang-include-fixer, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/sanstats, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/obj2yaml, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/clang-change-namespace, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/llvm-exegesis, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/llvm-link, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/clang-rename, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/find-all-symbols, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/clang-reorder-fields, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/llvm-dis, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/llvm-cov, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/verify-uselistorder, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/clang-check, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/llvm-dwp, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/c-index-test, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/llvm-pdbutil, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/llvm-undname, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/llvm-readobj, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/clangd, interp size = 71 and 86 is needed.
ERROR: could not relocate ...../sysroots/x86_64-pikosdk-linux/usr/bin/llvm-tblgen, interp size = 71 and 86 is needed.

The ..... is just to mask the path

cah-ableton commented 3 years ago

Thanks - that makes things a little clearer. It looks like maybe the build of nativesdk-clang is trying to use gold but not finding it and reverting to the system gold. Where should the yocto-built glibc and binutils get its copy of gold?

cah-ableton commented 3 years ago

It would appear that removing the -fuse-ld=gold in clang_git.bb "fixes" this problem for me, though it seems unlikely that it's the best solution.

kraj commented 3 years ago

that would fix it since ld.bfd is already modified to address relocatable interp section, but we also had this done for gold recently so it seems this might not be working in gold then.

davidlt commented 3 years ago

I have tried building Clang in SDK for riscv64 and 0001-binutils-crosssdk-Generate-relocatable-SDKs.patch didn't help (using master of meta-clang) and a month old oe-core/meta-oe.

davidlt commented 3 years ago

Works after removing:

diff --git a/recipes-devtools/clang/clang_git.bb b/recipes-devtools/clang/clang_git.bb
index a6d3f58..1728797 100644
--- a/recipes-devtools/clang/clang_git.bb
+++ b/recipes-devtools/clang/clang_git.bb
@@ -15,7 +15,6 @@ BUILD_CXX_class-nativesdk = "clang++"
 BUILD_AR_class-nativesdk = "llvm-ar"
 BUILD_RANLIB_class-nativesdk = "llvm-ranlib"
 BUILD_NM_class-nativesdk = "llvm-nm"
-LDFLAGS_append_class-nativesdk = " -fuse-ld=lld"

 inherit cmake cmake-native pkgconfig python3native

Then I was able to cross-compile C and C++ hello world with $CLANGCC and $CLANGCXX

kraj commented 3 years ago

I think it was a workaround to avoid ld/gold relocation not working I think it could be reverted can you paste errror message you see ?

davidlt commented 3 years ago
ERROR: could not relocate /SDK/test2/sysroots/x86_64-oesdk-linux/usr/bin/clang-query, interp size = 78 and 82 is needed.
ERROR: could not relocate /SDK/test2/sysroots/x86_64-oesdk-linux/usr/bin/llvm-cxxdump, interp size = 78 and 82 is needed.
ERROR: could not relocate /SDK/test2/sysroots/x86_64-oesdk-linux/usr/bin/lld, interp size = 78 and 82 is needed.
ERROR: could not relocate /SDK/test2/sysroots/x86_64-oesdk-linux/usr/bin/llvm-as, interp size = 78 and 82 is needed.
ERROR: could not relocate /SDK/test2/sysroots/x86_64-oesdk-linux/usr/bin/dsymutil, interp size = 78 and 82 is needed.
ERROR: could not relocate /SDK/test2/sysroots/x86_64-oesdk-linux/usr/bin/clang-offload-wrapper, interp size = 78 and 82 is needed.
ERROR: could not relocate /SDK/test2/sysroots/x86_64-oesdk-linux/usr/bin/llvm-lipo, interp size = 78 and 82 is needed.
ERROR: could not relocate /SDK/test2/sysroots/x86_64-oesdk-linux/usr/bin/clang-tblgen, interp size = 78 and 82 is needed.
ERROR: could not relocate /SDK/test2/sysroots/x86_64-oesdk-linux/usr/bin/llvm-ar, interp size = 78 and 82 is needed.
ERROR: could not relocate /SDK/test2/sysroots/x86_64-oesdk-linux/usr/bin/llvm-symbolizer, interp size = 78 and 82 is needed.
ERROR: could not relocate /SDK/test2/sysroots/x86_64-oesdk-linux/usr/bin/llvm-strings, interp size = 78 and 82 is needed.
ERROR: could not relocate /SDK/test2/sysroots/x86_64-oesdk-linux/usr/bin/modularize, interp size = 78 and 82 is needed.
ERROR: could not relocate /SDK/test2/sysroots/x86_64-oesdk-linux/usr/bin/llvm-link, interp size = 78 and 82 is needed.
ERROR: could not relocate /SDK/test2/sysroots/x86_64-oesdk-linux/usr/bin/llvm-dwp, interp size = 78 and 82 is needed.
ERROR: could not relocate /SDK/test2/sysroots/x86_64-oesdk-linux/usr/bin/llvm-config, interp size = 78 and 82 is needed.
ERROR: could not relocate /SDK/test2/sysroots/x86_64-oesdk-linux/usr/bin/clang-format, interp size = 78 and 82 is needed.
ERROR: could not relocate /SDK/test2/sysroots/x86_64-oesdk-linux/usr/bin/llvm-lto, interp size = 78 and 82 is needed.
ERROR: could not relocate /SDK/test2/sysroots/x86_64-oesdk-linux/usr/bin/clang-11, interp size = 78 and 82 is needed.
ERROR: could not relocate /SDK/test2/sysroots/x86_64-oesdk-linux/usr/bin/llvm-bcanalyzer, interp size = 78 and 82 is needed.
ERROR: could not relocate /SDK/test2/sysroots/x86_64-oesdk-linux/usr/bin/clang-tidy, interp size = 78 and 82 is needed.
ERROR: could not relocate /SDK/test2/sysroots/x86_64-oesdk-linux/usr/bin/clang-change-namespace, interp size = 78 and 82 is needed.
ERROR: could not relocate /SDK/test2/sysroots/x86_64-oesdk-linux/usr/bin/clang-rename, interp size = 78 and 82 is needed.

ld.gold is not implemented for riscv. Not sure what's the status of ld.lld (I think it might not be on the level as ld.bfd yet). Sticking to ld.bfd might be the best option right now for riscv, but again I don't follow ld.lld development closely.

kraj commented 3 years ago

ok lets stick to ld.bfd

On Fri, Nov 13, 2020 at 9:03 AM David Abdurachmanov < notifications@github.com> wrote:

ERROR: could not relocate /SDK/test2/sysroots/x86_64-oesdk-linux/usr/bin/clang-query, interp size = 78 and 82 is needed. ERROR: could not relocate /SDK/test2/sysroots/x86_64-oesdk-linux/usr/bin/llvm-cxxdump, interp size = 78 and 82 is needed. ERROR: could not relocate /SDK/test2/sysroots/x86_64-oesdk-linux/usr/bin/lld, interp size = 78 and 82 is needed. ERROR: could not relocate /SDK/test2/sysroots/x86_64-oesdk-linux/usr/bin/llvm-as, interp size = 78 and 82 is needed. ERROR: could not relocate /SDK/test2/sysroots/x86_64-oesdk-linux/usr/bin/dsymutil, interp size = 78 and 82 is needed. ERROR: could not relocate /SDK/test2/sysroots/x86_64-oesdk-linux/usr/bin/clang-offload-wrapper, interp size = 78 and 82 is needed. ERROR: could not relocate /SDK/test2/sysroots/x86_64-oesdk-linux/usr/bin/llvm-lipo, interp size = 78 and 82 is needed. ERROR: could not relocate /SDK/test2/sysroots/x86_64-oesdk-linux/usr/bin/clang-tblgen, interp size = 78 and 82 is needed. ERROR: could not relocate /SDK/test2/sysroots/x86_64-oesdk-linux/usr/bin/llvm-ar, interp size = 78 and 82 is needed. ERROR: could not relocate /SDK/test2/sysroots/x86_64-oesdk-linux/usr/bin/llvm-symbolizer, interp size = 78 and 82 is needed. ERROR: could not relocate /SDK/test2/sysroots/x86_64-oesdk-linux/usr/bin/llvm-strings, interp size = 78 and 82 is needed. ERROR: could not relocate /SDK/test2/sysroots/x86_64-oesdk-linux/usr/bin/modularize, interp size = 78 and 82 is needed. ERROR: could not relocate /SDK/test2/sysroots/x86_64-oesdk-linux/usr/bin/llvm-link, interp size = 78 and 82 is needed. ERROR: could not relocate /SDK/test2/sysroots/x86_64-oesdk-linux/usr/bin/llvm-dwp, interp size = 78 and 82 is needed. ERROR: could not relocate /SDK/test2/sysroots/x86_64-oesdk-linux/usr/bin/llvm-config, interp size = 78 and 82 is needed. ERROR: could not relocate /SDK/test2/sysroots/x86_64-oesdk-linux/usr/bin/clang-format, interp size = 78 and 82 is needed. ERROR: could not relocate /SDK/test2/sysroots/x86_64-oesdk-linux/usr/bin/llvm-lto, interp size = 78 and 82 is needed. ERROR: could not relocate /SDK/test2/sysroots/x86_64-oesdk-linux/usr/bin/clang-11, interp size = 78 and 82 is needed. ERROR: could not relocate /SDK/test2/sysroots/x86_64-oesdk-linux/usr/bin/llvm-bcanalyzer, interp size = 78 and 82 is needed. ERROR: could not relocate /SDK/test2/sysroots/x86_64-oesdk-linux/usr/bin/clang-tidy, interp size = 78 and 82 is needed. ERROR: could not relocate /SDK/test2/sysroots/x86_64-oesdk-linux/usr/bin/clang-change-namespace, interp size = 78 and 82 is needed. ERROR: could not relocate /SDK/test2/sysroots/x86_64-oesdk-linux/usr/bin/clang-rename, interp size = 78 and 82 is needed.

ld.gold is not implemented for riscv. Not sure what's the status of ld.lld (I think it might not be on the level as ld.bfd yet). Sticking to ld.bfd might be the best option right now for riscv, but again I don't follow ld.lld development closely.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kraj/meta-clang/issues/119#issuecomment-726879341, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADRS7ZXH5URELWHKY26XZDSPVRHVANCNFSM4HDWF3RQ .

jekhor commented 2 years ago

We use such hack in our company for this (in a distro config):

SDKPATH = "/usr/local/oe-sdk-meaningless-long-line-for-replace-it-on-build-path-by-sdk_relocate-script"
sundeep-kokkonda commented 2 years ago

Hello @kraj ,

I am getting similar SDK relocation error with rust tools.

Extracting SDK....................................................................................done Setting it up...ERROR: could not relocate ...../sysroots/x86_64-pokysdk-linux/usr/lib/x86_64-poky-linux/rustlib/x86_64-unknown-linux-gnu/bin/llvm-readobj, interp size = 102 and 177 is needed. ERROR: could not relocate ...../sysroots/x86_64-pokysdk-linux/usr/lib/x86_64-poky-linux/rustlib/x86_64-unknown-linux-gnu/bin/llvm-objcopy, interp size = 102 and 177 is needed. ERROR: could not relocate ...../sysroots/x86_64-pokysdk-linux/usr/lib/x86_64-poky-linux/rustlib/x86_64-unknown-linux-gnu/bin/llvm-ar, interp size = 102 and 177 is needed. ERROR: could not relocate ...../sysroots/x86_64-pokysdk-linux/usr/lib/x86_64-poky-linux/rustlib/x86_64-unknown-linux-gnu/bin/llc, interp size = 102 and 177 is needed. ERROR: could not relocate ...../sysroots/x86_64-pokysdk-linux/usr/lib/x86_64-poky-linux/rustlib/x86_64-unknown-linux-gnu/bin/llvm-cov, interp size = 102 and 177 is needed. ERROR: could not relocate ...../sysroots/x86_64-pokysdk-linux/usr/lib/x86_64-poky-linux/rustlib/x86_64-unknown-linux-gnu/bin/llvm-profdata, interp size = 102 and 177 is needed. ERROR: could not relocate ...../sysroots/x86_64-pokysdk-linux/usr/lib/x86_64-poky-linux/rustlib/x86_64-unknown-linux-gnu/bin/llvm-dis, interp size = 102 and 177 is needed. ERROR: could not relocate ...../sysroots/x86_64-pokysdk-linux/usr/lib/x86_64-poky-linux/rustlib/x86_64-unknown-linux-gnu/bin/llvm-objdump, interp size = 102 and 177 is needed. ERROR: could not relocate ...../sysroots/x86_64-pokysdk-linux/usr/lib/x86_64-poky-linux/rustlib/x86_64-unknown-linux-gnu/bin/opt, interp size = 102 and 177 is needed. ERROR: could not relocate ...../sysroots/x86_64-pokysdk-linux/usr/lib/x86_64-poky-linux/rustlib/x86_64-unknown-linux-gnu/bin/llvm-as, interp size = 102 and 177 is needed. ERROR: could not relocate ...../sysroots/x86_64-pokysdk-linux/usr/lib/x86_64-poky-linux/rustlib/x86_64-unknown-linux-gnu/bin/llvm-nm, interp size = 102 and 177 is needed. ERROR: could not relocate ...../sysroots/x86_64-pokysdk-linux/usr/lib/x86_64-poky-linux/rustlib/x86_64-unknown-linux-gnu/bin/llvm-size, interp size = 102 and 177 is needed. ERROR: could not relocate ...../sysroots/x86_64-pokysdk-linux/usr/bin/rustdoc, interp size = 102 and 177 is needed. ERROR: could not relocate ...../sysroots/x86_64-pokysdk-linux/usr/bin/rustc, interp size = 102 and 177 is needed. ERROR: could not relocate ...../sysroots/x86_64-pokysdk-linux/usr/bin/clippy-driver, interp size = 102 and 177 is needed. ERROR: could not relocate ...../sysroots/x86_64-pokysdk-linux/usr/bin/rustfmt, interp size = 102 and 177 is needed. ERROR: could not relocate ...../sysroots/x86_64-pokysdk-linux/usr/bin/cargo, interp size = 102 and 177 is needed. ERROR: could not relocate ...../sysroots/x86_64-pokysdk-linux/usr/bin/cargo-clippy, interp size = 102 and 177 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. $ . ...../environment-setup-core2-64-poky-linux

Below is my build configuration. Build Configuration: BB_VERSION = "2.0.0" BUILD_SYS = "x86_64-linux" NATIVELSBSTRING = "universal" TARGET_SYS = "x86_64-poky-linux" MACHINE = "qemux86-64" DISTRO = "poky" DISTRO_VERSION = "4.1+snapshot-d9dc50ccff39b91522d15258de28724dc0fb6a19" TUNE_FEATURES = "m64 core2" TARGET_FPU = "" meta meta-poky meta-yocto-bsp = "master:d9dc50ccff39b91522d15258de28724dc0fb6a19"

I could see the below patches are present in my repository. But still I could see relocation errors (may be these are irrelevant for rust pkg). meta/recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch 0005-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch

Also, in 'meta/recipe-devtools/rust/' I couldn't find and LDFLAGS/Linker info to implement similar patch. Anyway, I tried to modify the _scripts/relocationsdk.py (_changeinterpreter function) to increase the path size, but the installed SDK binaries are corrupted and not working.

Any clue where I should modify the size of .interp section to increase the sdk relocation path size and fix this issue for rust tools?

sundeep-kokkonda commented 2 years ago

Hello @kraj,

Any hint here on how to fix this issue for rust binaries?