-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
build-style/cargo.sh: add [ci skip] #2837
Conversation
9704541
to
0eb8adb
Compare
0eb8adb
to
b13d6ab
Compare
Does this work for cross-compiling? I thought cargo needs some coaxing to cross-compile packages? |
Cross-compiling can be ignored for now because our rustc builds aren't able to cross-compile. |
Yup, can't test it without being able to cross compile rust. I do plan to work on that in the near future though, I'll add the changes to this build style then (I don't think we should stall this until then though). |
Can you add a commit documenting this build style in Manual.md, mentioning that
Ok, sounds nice. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please modify Manual.md to include a short explaination of this build_style like it is done with the others.
Sure. Seems like work for cross compiling rust is currently being done though, so I'll leave the stuff about nocross out for now |
b13d6ab
to
bc17b0b
Compare
@@ -0,0 +1 @@ | |||
hostmakedepends+=" cargo rust" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cargo already depends on rust, so we can optimize it away.
why not use rustup for the builds so we can enable cross compiling? Rustup supports a ton of targets and would make cross compiling a breeze |
Hm, I'd like to avoid that if possible. With rustup we'd have to download the rust release stuff for every build (I don't think we can save the tarballs in hostdir/sources), which would be rather cumbersome (especially if one's connection is pretty bad). Also, we still need to provide a normal package for rust, some people want a system install of rust (e.g. for development) - although we could (in theory) just repackage rustup's tarballs (not a big fan of that though). |
On Mon, Sep 24, 2018 at 08:06:06AM -0700, Wilson Birney wrote:
why not use rustup for the builds so we can enable cross compiling?
Rustup supports a ton of targets and would make cross compiling a breeze
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#2837 (comment)
Rustup downloads binaries from outside that is a yuck yuck last resort for us and i am more than willing to wait until Rust people figure out cross-compiling like golang does.
|
@maxice8 every |
bc17b0b
to
b18dbea
Compare
This enables the use of the |
b18dbea
to
4f1ca8c
Compare
Alright, everything but a few packages (which I've marked as broken/nocross) compile for aarch64, testing other platforms... |
7d35463
to
52b7247
Compare
Manual.md
Outdated
@@ -734,6 +734,12 @@ The current list of available `build_style` scripts is the following: | |||
`do_configure()`, `do_build()`, etc., and may overwrite default `do_fetch()` and | |||
`do_extract()` that fetch and extract files defined in `distfiles` variable. | |||
|
|||
- `cargo` For packages written in rust that use Cargo for building. Configuration | |||
arguments (such as `--features`) can be passed to cargo in `do_build` via | |||
`configure_args`. Sets the `RUST_TARGET` variable, which can be useful for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Configuration arguments [...] can be passed to cargo in
do_build
viaconfigure_args
.
This looks ambiguous: Could mean you need to pass configure args IN do_build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, how would you write it? I basically only want to express that one uses configure_args
to configure the build (and as such they're used in do_build
instead of the usual do_configure
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Disclaimer: Not a native speaker)
Configuration arguments (such as
--features ...
) can be defined in the variableconfigure_args
which is applied as command line arguments to cargo duringdo_build
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, that does sound better, I'll use something along the lines of that. Did you have a chance to test any of the cross compiled binaries yet?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed it, please take a 2nd look at it.
52b7247
to
b950dfb
Compare
f92d562
to
08d8058
Compare
Also currently testing rust-std splitting, I guess I'll open a PR for that later |
Failing on
|
Needs #3798 now Currently testing all arches with that. |
way-cooler and alacritty already have |
Hows testing? :) |
Currently building all packages affected by this PR, armv6l{,-musl} already worked. Should go a lot faster now since the builders have finished building rust rev 4 :) |
Also currently building a rpi3 root FS to test the cross compiled binaries Ah, that was easier than expected :) |
Alright, at least the aarch64 binaries work AFAICS |
supersedes #2436
[ci skip]