-
Notifications
You must be signed in to change notification settings - Fork 128
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
Is it possible to build rustc and cargo for target? #81
Comments
In theory yes, in practice I'm not sure if anyone has actually tested that. |
I'll test that. All I've to do is include |
Should be |
@kteza1 I'm assuming this has not worked for you? I just did |
@cardoe Oops sorry for not getting back. I tried this some time back and it failed I think. I'll report back if I try this again. |
I've tried to do this too with the experiment in merging the rust-llvm build into rust. IIRC, it failed there too due to llvm not recognizing the target it was being built for. llvm's build likely needs to be passed an llvm-flavor target instead of a OE target. |
So in my branch to build rust-llvm with cmake I've managed to get it compiled for the target. I haven't tried to build rust with it yet. But figured I'd provide an update. |
Avoid issues with non-native builds by splitting up the packages a little closer to how they should be while still leaving the main package containing everything Rust uses. This makes it possible to build rust-llvm for the target, hopefully improving issue meta-rust#81.
Avoid issues with non-native builds by splitting up the packages a little closer to how they should be while still leaving the main package containing everything Rust uses. This makes it possible to build rust-llvm for the target, hopefully improving issue meta-rust#81.
While #105 fixes rust-llvm it does not fix rust which still fails with the following:
|
Avoid issues with non-native builds by splitting up the packages a little closer to how they should be while still leaving the main package containing everything Rust uses. This makes it possible to build rust-llvm for the target, hopefully improving issue meta-rust#81.
Guessing we're missing |
If this is a build failure, then you'd need to DEPEND on gcc-runtime, rather RDEPEND, right? |
We need the Rust snapshot (stage0) for the build environment not the host environment. This is not affecting us currently because we are only building native versions of this today but should improve the behavior of meta-rust#81 or if any Rust components are built for the target machine.
We need the Rust snapshot (stage0) for the build environment not the host environment. This is not affecting us currently because we are only building native versions of this today but should improve the behavior of meta-rust#81 or if any Rust components are built for the target machine.
We need the Rust snapshot (stage0) for the build environment not the host environment. This is not affecting us currently because we are only building native versions of this today but should improve the behavior of meta-rust#81 or if any Rust components are built for the target machine.
We need the Rust snapshot (stage0) for the build environment not the host environment. This is not affecting us currently because we are only building native versions of this today but should improve the behavior of meta-rust#81 or if any Rust components are built for the target machine.
We need the Rust snapshot (stage0) for the build environment not the host environment. This is not affecting us currently because we are only building native versions of this today but should improve the behavior of meta-rust#81 or if any Rust components are built for the target machine.
I do not believe anyone is working on this but we would certainly accept patches for this support. |
We need the Rust snapshot (stage0) for the build environment not the host environment. This is not affecting us currently because we are only building native versions of this today but should improve the behavior of meta-rust#81 or if any Rust components are built for the target machine.
Currently (I am on 0621067 commit), the error message is:
I am going to spend a while figuring this out |
Hi @macpijan did you ever figure this out? I'm getting exactly this error when trying to run the build on an AWS codebuild server. |
@david-mcgillicuddy-moixa Sadly no, I had to finish that project and shipped prebuild rustc compiler on the target. I hope to get back to rust and maybe have some more time to work on that next time. |
My case might just have been an OOM actually, trying again with more seemed to work. |
Interesting. Are you building the rustc compiler to be installed on the target board, or something else? What is the target arch? |
I didn't set the build up, but it's:
Precompiled rustc binaries would probably work for our use case too - they are not installed on the target board, only the artifact image. |
I tried to build cargo for arm target and got:
|
Same issue building rust-1.46.0-r0 on x86_64 for a x86_64 target. | Compiling bootstrap v0.0.0 (/opt/grays-poky-dunfell/build-grays-dunfell/tmp/work/core2-64-poky-linux/rust/1.46.0-r0/rustc-1.46.0-src/src/bootstrap) |
Same issue building rust-1.49.0-r0 on x86_64 for a x86_64 target. Log data follows: |
this is known limitation |
Any workaround to get rust working on x86_64 |
Hi SrijanNandi, |
Hi macpijan |
It's possible using oe-core/langdale or oe-core/master. I haven't tried it yet, have you? If so and it works well for you then please consider closing this bug. I'm hoping to get to that this weekend. |
cargo doesn't build for the target https://bugzilla.yoctoproject.org/show_bug.cgi?id=14975 Rust does build but fails for me with:
|
If you manually copy it works. Patch coming for master and langdale soon. |
Yes, fixed in oe-core/master: |
I tried using rustup to be able to directly compile on target board and it didn't work. Is it possible to build rustc and cargo using meta-rust?
The text was updated successfully, but these errors were encountered: