-
Notifications
You must be signed in to change notification settings - Fork 41
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
Cross-compiling for ARMV7? #21
Comments
You might not necessarily need to specify the sysroot. (It depends on how the compiler was configured/built.) For Ubuntu Focal something like this should work I think:
|
Thanks, yeah I eventually managed to compile it but I had to spend many hours scourging stack overflow confused posts from a lot of other people who also had problems cross-compiling with Rust :) (not compiling not-perf in particular) The main issue is that when you install the Ubuntu 20.04 rust packages you don't get rustup and they don't provide the necessary pre-built std/core crates for armv7 either, so you get confused and nothing works and the various tutorials on the net are confusing if you try to use the Debian packages; there are multiple ways to set this up it seems. And you just get weird error messages from rust about the std/core crates missing and if you don't know anything about Rust this just adds to the confusion :) I ended up having to remove all of the Ubuntu rust-related packages, and instead use the rust shell script to set it up, do the rustup target add and added the cross compiler to the .config like you wrote and then it compiled. |
However, while it compiled properly, I never got any binaries. In the release dir there are only a couple of libs it seems, any suggestions?
|
Try |
Ah, right, I forgot to update README after that change! Yes, the bin crate is no longer in the root; if you go into the |
Thanks both, going into cli/ and running the build with the appropriate --target produced the nperf binary (in the top-level target/ structure). And it seems to execute on my target. Now for finding out how to use the tool :) |
Hi! There are some suggestions in the README that this perf-version was designed with cross compilation in mind etc and there are some very brief instructions on how to cross compile it. Could you please expand this into a working example?
For example, on Ubuntu 20.04 you can install gcc-9-arm-linux-gnueabihf and in it you can find a gcc (the "linker" for Rust .config) but where do you find the "sys-root"?
The text was updated successfully, but these errors were encountered: