-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Cannot build on RPi/aarch64; Rust returns E0685 error for unstable package 'stdsimd' #4111
Comments
@mapachurro you need to apply a local patch to force "rust nightly": stable rust does not support intrinsics on non-x86 |
Hey @ribasushi thanks. I had actually found that thread previously and tried your patch--it hung at the patch if I remember correctly. But I will try again hopefully tonight. |
OK! It was chugging along beautifully until it wasn't.
And here's my uname output:
So it is running aarch64. Go:
Rust:
Cheers. |
@mapachurro this seems like you do not have https://packages.debian.org/unstable/libclang-dev + deps available. Please check and report. |
It would seem I do not have it available:
This is what happens when I specifically try to install libgl-dev:
|
Uh-oh... this is a bug in raspi's package repo: having 2 packages sharing the same file is a big no-no. |
Sounds awesome. I'll email you to coordinate. |
I appear to have fixed the unmet dependencies issue by following these instructions. I then went through the above error message that I had gotten, and installed all the dependencies for libclang-9-dev, up to and including libclang-9-dev. They all installed without a problem. However, I'm still getting the stderr. Here's the full output. Hopefully we can hash some of this out over the weekend.
|
@mapachurro sorry about dropping this for a while: there was so much churn in the underlying rust libs, that trying to tackle this wasn't feasible. However now the time seems right, and we will try to get the core proofs team to look at this in the coming days. Please track filecoin-project/rust-fil-proofs#1351 as a start, it is a hard-blocker to have your issue resolved. |
Updating this issue: I read the good news on filecoin-project/rust-fil-proofs#1351, which I understood to mean that if I start over with a fresh clone of the lotus repo, it should compile. Some things looked better than they did before (libclang deps, for example), but I got this in the end:
Steps to reproduce: -Following current instructions on https://docs.filecoin.io/get-started/lotus/installation/#software-dependencies, install Ubuntu/Debian dependencies, Rust, and Go My next thought is to try the target-cpu-native and build-from-source flags, if that fixes I will report back. Thanks for all the awesome work so far! |
Ok, with target-cpu-native and build-from-source, I get the following error:
|
@mapachurro the changes you linked have not been merged into lotus/master yet. You can try with release/v1.2.0, but it is not quite ready just yet. |
@mapachurro at last! lotus |
Oh that's very exciting! I will try tomorrow. Thanks to you and those doing the heavy lifting!! |
@mapachurro if you have cycles to spare: the dev team would really love a contribution to the CI to build and run the tests under aarch64. We do not have sufficient expertise to deal with the qemu dance, but also do not like breaking this over and over :( |
I'd love to, and I hear what you're saying about having a physical box rather than a virtual. Do you have some documentation as to what specifically you're looking for? |
@mapachurro oh, I wasn't implying "physical box". Rather: there got to be some sort of black magic to make such an addition to circle-ci, just nobody has done the necessary research. So if you have the cycles... :) |
@mapachurro I switched some of my personal builds to aarch64, with no issues. Closing this issue for now, please reopen if you still encounter problems. |
My goal: run filecoin on an 8GB Raspberry Pi 4. Space Race!
My environment: Raspbian OS 64-bit 'beta', Rust and Go most recent versions; running nightly Rust toolchain (more on this below), jq installed; lotus master branch; I've deleted and re-cloned the repo various times and the error re-occurs.
My issue: I get to the point of running 'make clean all' as per these instructions and I get an error code from Rust. I should say that at some point, I read some instructions that indicated I should be using additional flags to get it to compile properly on RPi:
So I have declared those flags, and when I run 'make clean all', I get a Rust error: E0685, "use of unstable library feature stdsimd". Rust helpfully directs me to this github issue (which is closed, and for whatever reason Github won't let me comment on the discussion of reopening it ), and gives me the option to ask for more information. When I do, it gives me this:
It was thanks to these instructions that I switched to a nightly toolchain install; I have been editing the cargo.toml file at ~/lotus/extern/filecoin-ffi/rust/Cargo.toml, trying to force Rust to use 'stdsimd' as per instructions in the Rust Unstable Book and the Cargo Manual's section on Features; I was hoping to be able to find a solution and come to you with a PR, but I'm not there yet. These are some of the errors that I get as a result:
(at first, I tried to 'cherry-pick' features as per the Cargo Manual, and I got this):
(so then, I tried to just declare 'stdsimd' as a feature)
Which is pretty spectacular, as I'm literally following Rust's instructions as to how to enable this unstable feature. I'm sure I'm missing something, and I'll keep plugging away at it, but I wanted to raise the issue, as I know there's a fair amount of interest in deploying filecoin on RPi, and soon Raspberry Pi OS 64-bit will be an officially supported/released distro, so this could be a great tool in terms of increasing accessibility of the network.
If anyone could point me to a solution to this if it already exists, or could help me to understand how to modify the Rust code properly (I'm a total noob with Rust), I'd be happy to submit a PR if I get it running.
The text was updated successfully, but these errors were encountered: