Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upDebugger update broke the Android build #14171
Comments
|
@alexcrichton Do you have opinions on the right fix here? Should we push the @ejpbruel @jdm Is it OK if we disable the debugger crate on Android for now? I'm a little afraid that making a change like this might break some theoretically-stable APIs (it did the last time we ran into this |
|
Unfortunately we probably can't change the type in libc itself, so the fix probably needs to go into nix |
|
Makes sense - they have an issue to get working on Android already: nix-rust/nix#313 (comment) |
|
@alexcrichton Why can't android be its own thing instead of 'notbsd' in libc? |
|
Are we talking about the debugger crate or the devtools crate? If the On Thu, Nov 17, 2016 at 11:16 PM, Lars Bergstrom notifications@github.com
|
Unfortunately someone stabilised stuff in libc that is just Plain Wrong(tm) on Android. Can we fix this? The symbols in libc are basically useless on Android. |
|
@nox the libc crate can be reorganized at will, and no a constant cannot change. If it's wrong a bug should be filed for the next major version of libc. In the meantime it needs to be worked around in downstream crates as we're not ready to release a new major version of the libc crate. |
|
@alexcrichton When something was Plain Wrong(tm) in Rust itself, it was changed back. Something was merged that is absolutely wrong on Android, and you say it cannot be changed on Android? Why? |
|
I don't understand why e.g. |
|
@nox I think Alex isn't saying that it can't be changed, but just that it needs to be fixed in the next semver-breaking rev of libc. The more interesting question, to me, is how to handle such changes. Ideally, we'd just bump the version and land it, but that would make it quite challenging to make any other fixes to libc between now and when they want to publish the next breaking version of libc. This is a problem we frequently run into in Servo's dependencies, and often have fixed in pretty ad-hoc ways (e.g., just making a random commit that also has a version bump, publishing that, leaving around a random old-version branch in case more are needed, and then merging the real thing onto master). |
|
@larsbergstrom I understand that. I just differ on the opinion that fixing something that is broken is a breaking change. |
|
@nox As a counterpoint, I'd like to refer you to the inimitable nokusu: i.e., if we did land the fix w/o a breaking change, it would break nix (and presumably others). That's exactly what happened in the libc 0.2 days with a semver-stealth-Android change of a similar nature and the ripple on the ecosystem was far worse for Servo, imo. |
|
@larsbergstrom I think that the only way of using e.g. Edit: but touché quoting my own tweet at me, that made me chuckle. |
|
@nox Yeah, the breakage I've seen in the past is two forms:
So admittedly this is a bit of an ad-hoc statement w/o a crater run but based on previous Rust Android fun, I can almost guarantee you'd break some widely-used packages if you changed it, even from its incorrect definition today. |
Disable the debugger on Android until mio works on Android <!-- Please describe your changes on the following line: --> r? @nox The recent change to `ws-rs` introduced a dependency on `mio`, which depends on `nix`, which does not build on Android (nix-rust/nix#313). I've disabled the debugger in this change. Fixes #14171 cc @mmatyas --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14270) <!-- Reviewable:end -->
A few days ago
rust-websocketwas replaced withws-rsin the debugger, and this change breaks the Android build currently.ws-rsdepends onmio, which in turn depends onnix, a dependency that wants to use the kernel signal definitions. It tries to create asigactionstructure here; the problem is that the type ofsa_flagsis architecture-dependent (int,unsigned intorunsigned long, see here), butnixdefines it as aninthere. (Note: we're using an oldernixcurrently, but the problem still exists upstream).In addition, it seems the type of the flags are defined incorrectly in
libctoo, as for example some of the possible flags are defined globally fornotbsdtargets asinthere, despite that for other valuesulongis used fornotbsd/ android,intfornotbsd/linux/other, and the remaining flags are not even defined fornotbsd/linux/musl.Related/blocks: #13154
cc @larsbergstrom