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

mismatched types error on armv7 linux #99

Closed
MagaTailor opened this Issue Nov 3, 2015 · 1 comment

Comments

Projects
None yet
1 participant
@MagaTailor
Copy link
Contributor

MagaTailor commented Nov 3, 2015

Trying to compile ncurses using rustc 1.5.0-dev (e518c057f 2015-10-23) on arm as part of a thyme build fails with:

Compiling ncurses v5.73.0
     Running `rustc /home/odroid/.cargo/registry/src/github.com-121aea75f9ef2ce2/ncurses-5.73.0/src/ncurses.rs --crate-name ncurses --crate-type lib -C opt-level=3 --cfg feature=\"default\" --cfg feature=\"wide\" -C metadata=086a089f5500fcfb -C extra-filename=-086a089f5500fcfb --out-dir /tmp/thyme-master/target/release/deps --emit=dep-info,link -L dependency=/tmp/thyme-master/target/release/deps -L dependency=/tmp/thyme-master/target/release/deps --extern libc=/tmp/thyme-master/target/release/deps/liblibc-ba87e8a144a58f65.rlib --cap-lints allow`
/home/odroid/.cargo/registry/src/github.com-121aea75f9ef2ce2/ncurses-5.73.0/src/ncurses.rs:43:40: 43:41 error: mismatched types:
 expected `*const i8`,
    found `*const u8`
(expected i8,
    found u8) [E0308]
/home/odroid/.cargo/registry/src/github.com-121aea75f9ef2ce2/ncurses-5.73.0/src/ncurses.rs:43             let bytes = CStr::from_ptr(s).to_bytes();

.
.
.
.

/home/odroid/.cargo/registry/src/github.com-121aea75f9ef2ce2/ncurses-5.73.0/src/ncurses.rs:43:40: 43:41 help: run `rustc --explain E0308` to see a detailed explanation
/home/odroid/.cargo/registry/src/github.com-121aea75f9ef2ce2/ncurses-5.73.0/src/ncurses.rs:1546:27: 1546:48 error: mismatched types:
 expected `*const u8`,
    found `*const i8`
(expected u8,
    found i8) [E0308]
/home/odroid/.cargo/registry/src/github.com-121aea75f9ef2ce2/ncurses-5.73.0/src/ncurses.rs:1546 { unsafe { ll::wprintw(w, s.to_c_str().as_ptr()) } }
                                                                                                                          ^~~~~~~~~~~~~~~~~~~~~
/home/odroid/.cargo/registry/src/github.com-121aea75f9ef2ce2/ncurses-5.73.0/src/ncurses.rs:1546:27: 1546:48 help: run `rustc --explain E0308` to see a detailed explanation

error: aborting due to 25 previous errors
Could not compile `ncurses`.

Is this related to the recent libc crate update? (0.2)

@MagaTailor

This comment has been minimized.

Copy link
Contributor Author

MagaTailor commented Nov 17, 2015

After some updates, there's just one error now:

/home/odroid/.cargo/registry/src/github.com-121aea75f9ef2ce2/ncurses-5.73.0/src/ncurses.rs:1114:24: 1114:40 error: mismatched types:
 expected `*const u8`,
    found `*const i8`
(expected u8,
    found i8) [E0308]
/home/odroid/.cargo/registry/src/github.com-121aea75f9ef2ce2/ncurses-5.73.0/src/ncurses.rs:1114     String::from_c_str(ret as *const i8)
                                                                                                                       ^~~~~~~~~~~~~~~~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.