-
Notifications
You must be signed in to change notification settings - Fork 30
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
bfc does not compile on ARM #4
Comments
Well no, that was an old source file. Nowadays it's going to need more casts: Compiling bfc v1.4.0 (file:///tmp/bfc-master)
src/llvm.rs:53:42: 53:53 error: mismatched types:
expected `*const u8`,
found `*mut i8`
(expected u8,
found i8) [E0308]
src/llvm.rs:53 let llvm_ir = CStr::from_ptr(llvm_ir_ptr);
^~~~~~~~~~~
src/llvm.rs:53:42: 53:53 help: run `rustc --explain E0308` to see a detailed explanation
src/llvm.rs:270:36: 270:66 error: mismatched types:
expected `*const i8`,
found `*const u8`
(expected i8,
found u8) [E0308]
src/llvm.rs:270 LLVMSetTarget(llvm_module, target_triple_cstring.as_ptr());
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/llvm.rs:270:36: 270:66 help: run `rustc --explain E0308` to see a detailed explanation
src/llvm.rs:773:40: 773:57 error: mismatched types:
expected `*const u8`,
found `*mut i8`
(expected u8,
found i8) [E0308]
src/llvm.rs:773 target_triple = CStr::from_ptr(target_triple_ptr).to_owned();
^~~~~~~~~~~~~~~~~
src/llvm.rs:773:40: 773:57 help: run `rustc --explain E0308` to see a detailed explanation
src/llvm.rs:803:41: 803:53 error: mismatched types:
expected `*const i8`,
found `*const u8`
(expected i8,
found u8) [E0308]
src/llvm.rs:803 cpu.as_ptr(),
^~~~~~~~~~~~
src/llvm.rs:803:41: 803:53 help: run `rustc --explain E0308` to see a detailed explanation
src/llvm.rs:804:41: 804:58 error: mismatched types:
expected `*const i8`,
found `*const u8`
(expected i8,
found u8) [E0308]
src/llvm.rs:804 features.as_ptr(),
^~~~~~~~~~~~~~~~~
src/llvm.rs:804:41: 804:58 help: run `rustc --explain E0308` to see a detailed explanation
src/llvm.rs:843:56: 843:65 error: mismatched types:
expected `*const u8`,
found `*mut i8`
(expected u8,
found i8) [E0308]
src/llvm.rs:843 println!("obj_error: {:?}", CStr::from_ptr(obj_error));
^~~~~~~~~
<std macros>:2:25: 2:56 note: in this expansion of format_args!
<std macros>:3:1: 3:54 note: in this expansion of print! (defined in <std macros>)
src/llvm.rs:843:13: 843:68 note: in this expansion of println! (defined in <std macros>)
src/llvm.rs:843:56: 843:65 help: run `rustc --explain E0308` to see a detailed explanation
error: aborting due to 6 previous errors
Could not compile `bfc`. So, after casting |
Yikes. I've upgraded to the latest libc, but sounds like we'll still need those casts. Would you like to send a pull request? |
No problem. Give me a few minutes. |
Closed by #5. |
Hi again, Another one has just popped up ;) src/llvm.rs:795:51: 795:62 error: mismatched types:
expected `*const u8`,
found `*mut i8`
(expected u8,
found i8) [E0308]
src/llvm.rs:795 let err_msg_cstr = CStr::from_ptr(err_msg_ptr); Have you considered a possible switch away from |
OK, I've removed the dependency on libc -- we're not actually using it. |
Regarding the compilation failure, I'm trying to cross-compile to ARM to reproduce the issue. . I've downloaded the .rlib files for rustc from RustBuild to I've also set up
This is the ARM compiler on arch linux as far as I can see. I'm now getting linking errors:
Any ideas? Ideally we'd configure Travis to cross-compile too, to verify that the build isn't broken again in future. |
Yes, you have the linker but not the rest of the multilib/multarch stuff. The failure should still happen in rust, though. |
The libc crate is being added back cause others depend on it (tempfile needs 0.2) and anyway, where are you going to get your Have a look here for a possible solution. |
It's not about bfc at all - it was caused by systemic breakage (called a fix) and there's no sign of a top-down solution. For now I suggest we simply add another cast while investigating the alternative. |
The issue I've been tracking from the beginning says hullo:
Also, please update tempfile in
Cargo.toml
due to the same issue.The text was updated successfully, but these errors were encountered: