Closed MagaTailor closed 8 years ago
Thank you for the report. I'll check it out.
Ok, I beleive I got it fixed on 32bit systems.
It still won't build on stable, but that's expected as the code uses 4 features gates.
Almost, using x86 1.7 :
Compiling floki v0.1.0 (file:///home/petevine/floki-master)
src/queue_backend.rs:188:30: 188:38 error: mismatched types:
expected `u32`,
found `u64`
(expected u32,
found u64) [E0308]
src/queue_backend.rs:188 ptr::null_mut(), file_len,
^~~~~~~~
src/queue_backend.rs:187:25: 190:34 note: in this expansion of try! (defined in <std macros>)
src/queue_backend.rs:188:30: 188:38 help: run `rustc --explain E0308` to see a detailed explanation
src/queue_backend.rs:193:13: 193:21 error: mismatched types:
expected `u32`,
found `u64`
(expected u32,
found u64) [E0308]
src/queue_backend.rs:193 file_len,
^~~~~~~~
src/queue_backend.rs:191:9: 194:37 note: in this expansion of try! (defined in <std macros>)
src/queue_backend.rs:193:13: 193:21 help: run `rustc --explain E0308` to see a detailed explanation
src/queue_backend.rs:289:56: 289:74 error: mismatched types:
expected `u32`,
found `u64`
(expected u32,
found u64) [E0308]
src/queue_backend.rs:289 mman::msync(self.file_mmap as *mut c_void, sync_offset as u64, mman::MS_SYNC).unwrap();
^~~~~~~~~~~~~~~~~~
src/queue_backend.rs:289:56: 289:74 help: run `rustc --explain E0308` to see a detailed explanation
src/queue_backend.rs:304:13: 304:36 error: mismatched types:
expected `u32`,
found `u64`
(expected u32,
found u64) [E0308]
src/queue_backend.rs:304 self.sync_offset as u64,
^~~~~~~~~~~~~~~~~~~~~~~
src/queue_backend.rs:302:9: 305:35 note: in this expansion of try! (defined in <std macros>)
src/queue_backend.rs:304:13: 304:36 help: run `rustc --explain E0308` to see a detailed explanation
error: aborting due to 4 previous errors
Could not compile `floki`.
Finally fixed on 8b88891fe3fd109bd7bd87d88a3649cad438366a
I'll leave this open until I add a 32bit compilation job in travis.
Yep, the 32-bit issue is fixed. Now, if you want to allow building on arm, this breakage causes errors like these:
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]
and so on. In most cases they can be fixed by simple casts as *const _
I guess these should go on the nix repository
Well yeah, that was just an illustration of the problem. Or are you saying you're certain the final stage (your own code) would be free of this kind of error?
On 32-bit arm, using stable rust 1.5.0, I'm getting the following error: