On 2021-09-29 9:20 a.m., Pgowda wrote:
When DEBUG_BUILD is set for building rust-native, it generated
error as follows:-
=========================================================
Building : rustdoc, rustdoc-json-types
error[E0463]: can't find crate for `rustc_llvm`
which `rustc_driver` depends on
--> src/librustdoc/lib.rs:37:1
|
37 | extern crate rustc_driver;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate
=========================================================
On analyzing the issue, it was found that rustc_llvm crate was present
at required path. However, it was very huge due to the presence of
debugging information. Hence, it was somehow not recognized as a valid
crate.
So we need to know more about this. What tool is being used to identify
the crate and has there been any changes to fix is since 1.54?
Also, please check this problem still happens with Alex's 1.55 upgrade:
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=akanavin/package-version-updates
The following patch removes the debug information from
rust-llvm-native which is built prior to rust-native but retains debug
information as required in rust-native binaries.
This is a functional work-around but I suspect that we'll hold-off
for a while before giving in and accepting it in oe-core/master.
Some people might find it useful so thanks for posting it as I suggested.
Hopefully we can better understand and fix the root cause.
Thanks Naveen,
../Randy
Signed-off-by: Pgowda <[email protected]>
---
meta/recipes-devtools/rust/rust-llvm.inc | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/meta/recipes-devtools/rust/rust-llvm.inc
b/meta/recipes-devtools/rust/rust-llvm.inc
index d7f445385b..0f8fb785b7 100644
--- a/meta/recipes-devtools/rust/rust-llvm.inc
+++ b/meta/recipes-devtools/rust/rust-llvm.inc
@@ -15,6 +15,11 @@ DEPENDS += "ninja-native rust-llvm-native"
ARM_INSTRUCTION_SET:armv5 = "arm"
ARM_INSTRUCTION_SET:armv4t = "arm"
+# rustc_llvm with debug info is not recognized as a valid crate that's
+# generated by rust-llvm-native.
+CFLAGS:remove = "-g"
+CXXFLAGS:remove = "-g"
+
LLVM_DIR = "llvm${LLVM_RELEASE}"
EXTRA_OECMAKE = " \
--
# Randy MacLeod
# Wind River Linux
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#156671):
https://lists.openembedded.org/g/openembedded-core/message/156671
Mute This Topic: https://lists.openembedded.org/mt/85948023/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-