Skip to content
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

bARMy types error #218

Closed
MagaTailor opened this issue Dec 21, 2015 · 15 comments
Closed

bARMy types error #218

MagaTailor opened this issue Dec 21, 2015 · 15 comments

Comments

@MagaTailor
Copy link

This breakage is responsible for errors like these on ARM Linux:

Compiling nix v0.3.9
/home/odroid/.cargo/git/checkouts/nix-rust-410e385daf3c9671/master/src/fcntl.rs:102:28: 102:41 error: mismatched types:
 expected `*const i8`,
    found `*const u8`
(expected i8,
    found u8) [E0308]
/home/odroid/.cargo/git/checkouts/nix-rust-410e385daf3c9671/master/src/fcntl.rs:102         unsafe { ffi::open(cstr.as_ptr(), oflag.bits(), mode.bits() as mode_t) }
                                                                                                               ^~~~~~~~~~~~~
/home/odroid/.cargo/git/checkouts/nix-rust-410e385daf3c9671/master/src/fcntl.rs:101:14: 103:8 note: in this expansion of try! (defined in <std macros>)
/home/odroid/.cargo/git/checkouts/nix-rust-410e385daf3c9671/master/src/fcntl.rs:102:28: 102:41 help: run `rustc --explain E0308` to see a detailed explanation
/home/odroid/.cargo/git/checkouts/nix-rust-410e385daf3c9671/master/src/mount.rs:105:30: 105:43 error: mismatched types:
 expected `*const i8`,
    found `*const u8`
(expected i8,
    found u8) [E0308]
/home/odroid/.cargo/git/checkouts/nix-rust-410e385daf3c9671/master/src/mount.rs:105         unsafe { ffi::umount(cstr.as_ptr()) }
                                                                                                                 ^~~~~~~~~~~~~
/home/odroid/.cargo/git/checkouts/nix-rust-410e385daf3c9671/master/src/mount.rs:104:15: 106:8 note: in this expansion of try! (defined in <std macros>)
/home/odroid/.cargo/git/checkouts/nix-rust-410e385daf3c9671/master/src/mount.rs:105:30: 105:43 help: run `rustc --explain E0308` to see a detailed explanation
/home/odroid/.cargo/git/checkouts/nix-rust-410e385daf3c9671/master/src/mount.rs:113:31: 113:44 error: mismatched types:
 expected `*const i8`,
    found `*const u8`
(expected i8,
    found u8) [E0308]
/home/odroid/.cargo/git/checkouts/nix-rust-410e385daf3c9671/master/src/mount.rs:113         unsafe { ffi::umount2(cstr.as_ptr(), flags.bits) }
                                                                                                                  ^~~~~~~~~~~~~
/home/odroid/.cargo/git/checkouts/nix-rust-410e385daf3c9671/master/src/mount.rs:112:15: 114:8 note: in this expansion of try! (defined in <std macros>)
/home/odroid/.cargo/git/checkouts/nix-rust-410e385daf3c9671/master/src/mount.rs:113:31: 113:44 help: run `rustc --explain E0308` to see a detailed explanation
/home/odroid/.cargo/git/checkouts/nix-rust-410e385daf3c9671/master/src/mqueue.rs:80:37: 80:50 error: mismatched types:
 expected `*const i8`,
    found `*const u8`
(expected i8,
    found u8) [E0308]
/home/odroid/.cargo/git/checkouts/nix-rust-410e385daf3c9671/master/src/mqueue.rs:80     let res = unsafe { ffi::mq_open(name.as_ptr(), oflag.bits(), mode.bits() as mode_t, attr as *const MqAttr) };
                                                                                                                        ^~~~~~~~~~~~~
/home/odroid/.cargo/git/checkouts/nix-rust-410e385daf3c9671/master/src/mqueue.rs:80:37: 80:50 help: run `rustc --explain E0308` to see a detailed explanation
/home/odroid/.cargo/git/checkouts/nix-rust-410e385daf3c9671/master/src/mqueue.rs:90:39: 90:52 error: mismatched types:
 expected `*const i8`,
    found `*const u8`
(expected i8,
    found u8) [E0308]
/home/odroid/.cargo/git/checkouts/nix-rust-410e385daf3c9671/master/src/mqueue.rs:90     let res = unsafe { ffi::mq_unlink(name.as_ptr()) };
                                                                                                                          ^~~~~~~~~~~~~
/home/odroid/.cargo/git/checkouts/nix-rust-410e385daf3c9671/master/src/mqueue.rs:90:39: 90:52 help: run `rustc --explain E0308` to see a detailed explanation
   Compiling env_logger v0.3.2
/home/odroid/.cargo/git/checkouts/nix-rust-410e385daf3c9671/master/src/mqueue.rs:112:31: 112:47 error: mismatched types:
 expected `*const i8`,
    found `*const u8`
(expected i8,
    found u8) [E0308]
/home/odroid/.cargo/git/checkouts/nix-rust-410e385daf3c9671/master/src/mqueue.rs:112     let len = unsafe { strlen(message.as_ptr()) as size_t };
                                                                                                                   ^~~~~~~~~~~~~~~~
/home/odroid/.cargo/git/checkouts/nix-rust-410e385daf3c9671/master/src/mqueue.rs:112:31: 112:47 help: run `rustc --explain E0308` to see a detailed explanation
/home/odroid/.cargo/git/checkouts/nix-rust-410e385daf3c9671/master/src/mqueue.rs:113:44: 113:60 error: mismatched types:
 expected `*const i8`,
    found `*const u8`
(expected i8,
    found u8) [E0308]
/home/odroid/.cargo/git/checkouts/nix-rust-410e385daf3c9671/master/src/mqueue.rs:113     let res = unsafe { ffi::mq_send(mqdes, message.as_ptr(), len, msq_prio) };
                                                                                                                                ^~~~~~~~~~~~~~~~
/home/odroid/.cargo/git/checkouts/nix-rust-410e385daf3c9671/master/src/mqueue.rs:113:44: 113:60 help: run `rustc --explain E0308` to see a detailed explanation
/home/odroid/.cargo/registry/src/github.com-48ad6e4054423464/nix-0.3.9/src/fcntl.rs:74:28: 74:41 error: mismatched types:
 expected `*const i8`,
    found `*const u8`
(expected i8,
    found u8) [E0308]

In most cases they can be fixed by simple casts as *const _

@chengchangwu
Copy link

Same problem here with nix-rust v0.4.2. Please upgrade to libc v0.2.

@MagaTailor
Copy link
Author

The latest master seems to be free of this issue.

@kamalmarhubi
Copy link
Member

Thanks for checking @petevine!

@thkaw
Copy link

thkaw commented Mar 1, 2016

Still have some dependency problem when build ARM

nix still using libc 0.1.12 in nix 0.4.2?

Build in Rust 1.6.0 (c30b771ad 2016-01-19)

@kamalmarhubi
Copy link
Member

The latest master is using 0.2.6, but the latest release is still on 0.1.x as you noticed. We're figuring out how to make a release this week (#269), so hopefully there will soon be a 0.5.0 that uses libc 0.2.x, and includes the ARM fixes.

@MagaTailor
Copy link
Author

It might make sense to fix the < 0.5 series too.

I recently tried overriding this dependency with master and that immediately broke mio.

@thkaw
Copy link

thkaw commented Mar 2, 2016

Ok, I do little modified on mio v0.5.0.
It will make mio able to using latest nix in master.(0.5.1-pre)

Mio:
thkaw/mio@8add138

@kamalmarhubi
Copy link
Member

@petevine sadly there are no git tags for earlier releases. If we could figure out when 0.4.2 was cut, we might be able to make a fix and release a 0.4.3. The bump to libc 0.2 series was in #219, so that could be another alternative to cut a 0.4.3. My personal preference would be leave the 0.4 series behind, but that's biased by me starting to use nix, and joining the team more recently.

Going forward, we should soon have CI on ARM, which we'll then keep green. Track #258 for that.

Reopening for some discussion.

@kamalmarhubi kamalmarhubi reopened this Mar 2, 2016
@posborne
Copy link
Member

posborne commented Mar 2, 2016

0.4.2 is dated Dec 3, 2015, so I would guess b4b76d0 as the next change was a breaking one.

ARM CI support is still a WIP but progress is under way.

@kamalmarhubi
Copy link
Member

@petevine, there is now a 0.5.0. I haven't given fixing 0.4 series a shot yet.

@MagaTailor
Copy link
Author

@kamalmarhubi I've just confirmed the latest nix/mio combo works on ARM; I'd like to update dependencies of the parity project but nix 0.5.0 looks 2 months old already - should I use it anyway or wait for the next release?

@kamalmarhubi
Copy link
Member

If 0.5.0 works, use it. We haven't yet figured out how to do releases without @carllerche. Filed #363 to track the unreleasability.

@kamalmarhubi
Copy link
Member

(@petevine forgot to mention you)

@MagaTailor
Copy link
Author

Is this issue still relevant?

@kamalmarhubi
Copy link
Member

We have released a 0.6 since the last activity on this issue. If it's no longer affecting your projects, we can close it out. I'll leave that to you. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants