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

Won't compile on ARM #3

Closed
MagaTailor opened this issue Jan 1, 2016 · 1 comment
Closed

Won't compile on ARM #3

MagaTailor opened this issue Jan 1, 2016 · 1 comment

Comments

@MagaTailor
Copy link

rust-lang/rust#29867 says hello:

Compiling capstone v0.0.0 (https://github.com/ebfe/rust-capstone.git#487e5951)  
/home/odroid/.cargo/git/checkouts/rust-capstone-4618044b7fb862b2/master/src/lib.rs:68:81: 68:85 error: mismatched types:
 expected `*const u8`,
    found `*const i8`
(expected u8,
    found i8) [E0308]
/home/odroid/.cargo/git/checkouts/rust-capstone-4618044b7fb862b2/master/src/lib.rs:68             Error{ code: err, desc: Some(String::from_utf8_lossy(CStr::from_ptr(cstr).to_bytes()).to_string()) }
                                                                                                                                                                      ^~~~
/home/odroid/.cargo/git/checkouts/rust-capstone-4618044b7fb862b2/master/src/lib.rs:68:81: 68:85 help: run `rustc --explain E0308` to see a detailed explanation
/home/odroid/.cargo/git/checkouts/rust-capstone-4618044b7fb862b2/master/src/lib.rs:116:64: 116:97 error: mismatched types:
 expected `*const u8`,
    found `*const i8`
(expected u8,
    found i8) [E0308]
/home/odroid/.cargo/git/checkouts/rust-capstone-4618044b7fb862b2/master/src/lib.rs:116                             mnemonic: from_utf8(CStr::from_ptr(ci.mnemonic.as_ptr() as *const i8).to_bytes()).unwrap_or("<invalid utf8>").to_string(),
                                                                                                                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/odroid/.cargo/git/checkouts/rust-capstone-4618044b7fb862b2/master/src/lib.rs:116:64: 116:97 help: run `rustc --explain E0308` to see a detailed explanation
/home/odroid/.cargo/git/checkouts/rust-capstone-4618044b7fb862b2/master/src/lib.rs:117:64: 117:95 error: mismatched types:
 expected `*const u8`,
    found `*const i8`
(expected u8,
    found i8) [E0308]
/home/odroid/.cargo/git/checkouts/rust-capstone-4618044b7fb862b2/master/src/lib.rs:117                             op_str:   from_utf8(CStr::from_ptr(ci.op_str.as_ptr() as *const i8).to_bytes()).unwrap_or("<invalid utf8>").to_string(),
                                                                                                                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/odroid/.cargo/git/checkouts/rust-capstone-4618044b7fb862b2/master/src/lib.rs:117:64: 117:95 help: run `rustc --explain E0308` to see a detailed explanation
error: aborting due to 3 previous errors
Build failed, waiting for other jobs to finish...
Could not compile `capstone`.

In most cases it's enough to do a cast as *const _ while the rest might require coercion via a variable.

I was using a 1.7 armv7 nightly.

@ebfe ebfe closed this as completed in 3eafb84 Jan 1, 2016
@ebfe
Copy link
Owner

ebfe commented Jan 1, 2016

Should be fixed.

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

2 participants