-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Undefined reference in libcore str::str.StrPrelude::bytes::h835a605f8fa9b9b7hWs. #20016
Comments
This problem was introduced sometime after 10th December |
You actually need to modify how you link to rust code in your kernel. Your build process uses Thanks for the issue though! |
Thanks Alex ... sorry I am new to Rust - I'd appreciate it very much if you could provide more details. Are you suggesting that I just need to remove the emit-obj from the command line? |
Yeah you should be fine just deleting that, and then you'll pass |
After removing the --emit=obj I get |
That indicates that |
Thanks Alex ... I'll try it out and post back ... on the move right now |
Awesome .. it worked .... I had to implement a bunch of libc functions though. A couple of questions bother me though -
I'd appreciate your inputs very much. Thanks, |
Plus I did not build libcompiler-rt.a - instead I just used the -L to point to it. How can I build libcompiler-rt myself (using my target spec)....It does not seem as straight forward as libcore. |
Linkers often work just by chance if something's not actually supposed to work, so you may have just been getting lucky before the 10th. Currently you'd have to check out compiler-rt from LLVM itself to cross-compile it, there's sadly not a great way to compile it otherwise. |
Oh ... I did not realize that libcompiler-rt.a is part of LLVM ... in that case, I presume, there's no harm in linking with the one that gets built as part of Rust. Thanks Alex. |
Hey Alex ... happy new year (year of Rust 1.0) ... Just got back from a break and tried to build my kernel code with the latest RUST and found uart.rs:26:5: 26:26 error: unresolved import Not sure, what changed .... could you please advice how I can use the bytes function of &str? Regards, |
The |
Thanks Alex. |
How exactly did you achieve this @ckkashyap? I'd appreciate it if you could give me some hints. I'm compiling Rust code to Raspberry Pi bare metal and facing the same issue. |
Hi,
I am using libcore for my kernel - https://github.com/ckkashyap/unix
I've been using the latest nightly builds. The nightly builds from a few days ago started having an undefined reference to str::str.StrPrelude::bytes::h835a605f8fa9b9b7hWs.
Looks like this is a regression.
Regards,
Kashyap
The text was updated successfully, but these errors were encountered: