-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
xous: include prelude to define c_int #4303
Conversation
With the latest changes, libstd no longer builds: ``` Compiling libc v0.2.170 (/opt/Xous/libc) error[E0412]: cannot find type `c_int` in this scope --> /opt/Xous/libc/src/xous.rs:17:20 | 17 | pub const INT_MIN: c_int = -2147483648; | ^^^^^ not found in this scope | help: consider importing one of these type aliases | 5 + use crate::c_int; | 5 + use rustc_std_workspace_core::ffi::c_int; | error[E0412]: cannot find type `c_int` in this scope --> /opt/Xous/libc/src/xous.rs:18:20 | 18 | pub const INT_MAX: c_int = 2147483647; | ^^^^^ not found in this scope | help: consider importing one of these type aliases | 5 + use crate::c_int; | 5 + use rustc_std_workspace_core::ffi::c_int; | For more information about this error, try `rustc --explain E0412`. error: could not compile `libc` (lib) due to 2 previous errors ``` Include the prelude to define `c_int` and fix the build on rust `main`. Signed-off-by: Sean Cross <sean@xobs.io>
An example of a build failure in CI can be found at https://github.com/betrusted-io/rust-nightly/actions/runs/13699992351/job/38311095367 |
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.
Sorry about that, thanks for sending a fix.
@rustbot label +stable-nominated
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.
Sorry I didn't check the branch, could you send this against main instead? I cherry pick to 0.2.
Sure. PR open at #4304 |
Description
Include the prelude on Xous to fix the build in Rust
libstd
.Sources
N/A
Checklist
libc-test/semver
have been updated*LAST
or*MAX
areincluded (see #3131)
cd libc-test && cargo test --target mytarget
);especially relevant for platforms that may not be checked in CI
Extra
With the latest changes, libstd no longer builds: