-
Notifications
You must be signed in to change notification settings - Fork 677
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
Add fuchsia support #1285
Add fuchsia support #1285
Conversation
@asomers @kamalmarhubi @posborne Friendly bump for code review. Thank you for taking a look. |
@amanda-tait The change looks reasonable to me, is there any reasonable path for adding fuchsia support to CI. Without that, I fear it is pretty easy for other contributors to easily introduce regressions. I do not see CI support (or missed it) within libc either. |
I see that rustup has a fuchsia target. If nothing else, we can add a CI target that cross-compiles to fuchsia, but doesn't run tests. |
@posborne CI support is something we'd like to have, but Fuchsia does not yet provide tools for external CI. We're OK with taking on the burden of fixing regressions. |
The change looks good, but please add a CHANGELOG entry. |
@asomers added a CHANGELOG entry and resolved the merge conflict. |
@asomers I think cross compiling to Fuchsia would be great, do you have a suggestion on how to do that? EDIT: added |
7303358
to
cc46340
Compare
@asomers I added a pair of commits to address upstream deprecations in libc, and this is now green and includes cross compilation to Fuchsia. Can you take a look? |
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.
Your PR now conflicts with #1329. But that PR requires your musl fix in order to build. Could you please split this PR into two? One for the musl fix, one for Fuchsia, and discard the af_alg_iv parts. Also, add Fuchsia to Tier 3 in the README.
.travis.yml
Outdated
- curl --proto '=https' --tlsv1.2 -sSf --output rustup.sh https://sh.rustup.rs | ||
- sh rustup.sh -y --profile=minimal --default-toolchain 1.36.0 --target x86_64-fuchsia | ||
- . $HOME/.cargo/env | ||
- cargo build --all-targets |
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.
You need to add --target x86_64-fuchsia
to these two lines. (you probably copied this from the Redox section, which makes the same mistake; I'll fix that separately).
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.
I don't think this is incorrect; the rustup invocation only installs the fuchsia target, so this does the right thing. The same is true for redox.
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.
It is incorrect. I just checked in a fresh environment. The rustup invocation installs both the native toolchain and the one that you request with --target
. So you need to do one of tho things:
- Use
--default-host
instead of--target
, or - Add
--target x86_64-fuchsia
to thecargo build
line, as I suggested.
I can make the changes you requested, but I think the approach taken in #1329 is incorrect. As I mentioned in that PR, the deprecation is informational, and the approach taken there is far more brittle without any upside. |
Added Fuchsia to Tier 3 in the README. |
CI is passing. |
.travis.yml
Outdated
- curl --proto '=https' --tlsv1.2 -sSf --output rustup.sh https://sh.rustup.rs | ||
- sh rustup.sh -y --profile=minimal --default-toolchain 1.36.0 --target x86_64-fuchsia | ||
- . $HOME/.cargo/env | ||
- cargo build --all-targets |
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.
It is incorrect. I just checked in a fresh environment. The rustup invocation installs both the native toolchain and the one that you request with --target
. So you need to do one of tho things:
- Use
--default-host
instead of--target
, or - Add
--target x86_64-fuchsia
to thecargo build
line, as I suggested.
0f5a57b
to
bef48a2
Compare
Done. |
Another flake.
|
Sigh. This looks like a kernel bug. Or possibly a documentation bug. Is |
Thanks, looks like rerunning it worked. Is this good to land? |
No, not yet. You still have that duped entry in the changelog. |
Ah, sorry. It ended up in the second commit somehow. Done. |
This is green again and I've made all the changes requested. Please have another look. |
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.
bors r+
1285: Add fuchsia support r=asomers a=amanda-tait This change adds support for the Fuchsia operating system to the nix crate. Fuchsia developers have a use case for nix, particularly its safe interfaces to the recvmsg(2) and sendmsg(2). Adding support requires: * incrementing the libc dependency to 0.2.74 * conditionally not compiling nix functionality which depends on libc functionality that does not exist for Fuchsia Co-authored-by: Tamir Duberstein <[email protected]> Co-authored-by: Amanda Tait <[email protected]>
Is something wedged? Looks like this has been "waiting in queue" for 2 days (and I can't see the bors details page). |
Cirrus is fine, but Bors is crashing. |
Looks like that worked. Rebased. |
@asomers looks like a network flake this time
Would you mind retrying it and submitting this once more? Also, I'm not able to edit the PR description, but you might be able to -- could you edit it to reflect the second commit's message? |
What's wrong with the PR description? |
The libc version is not modified. |
This was missed in d363537.
Allow nix to compile on Fuchsia by conditionally avoiding libc functionality that does not exist for Fuchsia.
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.
bors r+
This change adds support for the Fuchsia operating system to the nix
crate. Fuchsia developers have a use case for nix, particularly its safe
interfaces to the recvmsg(2) and sendmsg(2). Adding support requires:
that does not exist for Fuchsia