-
Notifications
You must be signed in to change notification settings - Fork 27
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 failure, "literal out of range for i32" #22
Comments
The cause of this issue is that the ioctl declaration in musl-libc is:
This conforms to POSIX, but is problematic because glibc and the linux kernel use this:
I was getting started on an Alpine Linux aport for this and some other System76 software There is also another build failure in src/bin/cli.rs and daemon/src/main.rs regarding the |
For the ioctl, a cast to u32:
looks like it will be ok, though a bit murky. The sign bit shouldn't be lost; it will end up being cast to unsigned long The iopl issue is uglier, because it seems it is not even being pulled in for musl targets in the libc crate. |
I have decided to backed off from this issue until rust libc more fully supports musl libc. |
I was able to get it to compile with alpine linux with these changes
iopl() is just a thin wrapper around the syscall in any case |
Distribution: Alpine Linux
Application Version: 1.0.5 and latest Git master, commit 699fd04
Issue/Bug Description: Build failure
The text was updated successfully, but these errors were encountered: