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

32-bit armv7 build fails #89

Closed
MagaTailor opened this issue Nov 16, 2015 · 8 comments
Closed

32-bit armv7 build fails #89

MagaTailor opened this issue Nov 16, 2015 · 8 comments

Comments

@MagaTailor
Copy link

I think it's part of some systemic breakage (libc?) as I had already seen this error before: jeaye/ncurses-rs#99

Compiling curl v0.2.13
/home/odroid/.cargo/registry/src/github.com-121aea75f9ef2ce2/curl-0.2.13/src/ffi/err.rs:120:28: 120:64 error: mismatched types:
 expected `*const i8`,
    found `*const u8`
(expected i8,
    found u8) [E0308]
/home/odroid/.cargo/registry/src/github.com-121aea75f9ef2ce2/curl-0.2.13/src/ffi/err.rs:120             CStr::from_ptr(ffi::curl_easy_strerror(self.code())).to_bytes()
                                                                                                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/odroid/.cargo/registry/src/github.com-121aea75f9ef2ce2/curl-0.2.13/src/ffi/err.rs:120:28: 120:64 help: run `rustc --explain E0308` to see a detailed explanation
/home/odroid/.cargo/registry/src/github.com-121aea75f9ef2ce2/curl-0.2.13/src/ffi/version.rs:203:39: 203:40 error: mismatched types:
 expected `*const i8`,
    found `*const u8`
(expected i8,
    found u8) [E0308]
/home/odroid/.cargo/registry/src/github.com-121aea75f9ef2ce2/curl-0.2.13/src/ffi/version.rs:203         str::from_utf8(CStr::from_ptr(p).to_bytes()).ok()
                                                                                                                                      ^
/home/odroid/.cargo/registry/src/github.com-121aea75f9ef2ce2/curl-0.2.13/src/ffi/version.rs:203:39: 203:40 help: run `rustc --explain E0308` to see a detailed explanation
/home/odroid/.cargo/registry/src/github.com-121aea75f9ef2ce2/curl-0.2.13/src/ffi/version.rs:215:39: 215:58 error: mismatched types:
 expected `*const i8`,
    found `*const u8`
(expected i8,
    found u8) [E0308]
/home/odroid/.cargo/registry/src/github.com-121aea75f9ef2ce2/curl-0.2.13/src/ffi/version.rs:215         str::from_utf8(CStr::from_ptr(ffi::curl_version()).to_bytes()).unwrap()
                                                                                                                                      ^~~~~~~~~~~~~~~~~~~
/home/odroid/.cargo/registry/src/github.com-121aea75f9ef2ce2/curl-0.2.13/src/ffi/version.rs:215:39: 215:58 help: run `rustc --explain E0308` to see a detailed explanation
error: aborting due to 3 previous errors

Built with rustc 1.6.0-dev (d53496bda 2015-11-06)

My guess about the libc crate was probably right:
https://users.rust-lang.org/t/the-libc-crate-is-now-at-v0-2-0/3509/5

@alexcrichton
Copy link
Owner

Ah actually I think this is basically a case where libc 0.2 isn't compatible with older versions of libstd on ARM due to this change, if you update std the error should go away.

@MagaTailor
Copy link
Author

All right, I'll try that and close the issue if that's all there is to it.

EDIT:
Nope, different place, same error.

/home/odroid/.cargo/registry/src/github.com-121aea75f9ef2ce2/filetime-0.1.6/src/lib.rs:226:19: 226:29 error: mismatched types:
 expected `*const i8`,
    found `*const u8`
(expected i8,
    found u8) [E0308]
/home/odroid/.cargo/registry/src/github.com-121aea75f9ef2ce2/filetime-0.1.6/src/lib.rs:226         if utimes(p.as_ptr(), times.as_ptr()) == 0 {
                                                                                                             ^~~~~~~~~~

@alexcrichton
Copy link
Owner

That's a problem with a different crate, actually, and I just published 0.1.7 of that crate so it should fix that problem. Looks like it fixed it for curl, though, so I'm going to close this issue. Thanks for the report!

@MagaTailor
Copy link
Author

Indeed, the filetime crate update was effective but doesn't fix building cargo on arm. Where should I be posting these incremental reports? (opening a new issue for every broken crate is not my idea of fun)

@alexcrichton
Copy link
Owner

You can also feel free to submit PRs!

@MagaTailor
Copy link
Author

Hopefully you're not suggesting I should be fixing all this stuff myself?

Still, locally speaking, what do you think of this little hack in ncurses-5.73.0/src/ncurses.rs

String::from_c_str(ret as *const u8) at line 1114? (instead of i8)

@alexcrichton
Copy link
Owner

I'm not sure I quite understand, the amount of effort needed to get cargo working again will be proportional to the number of broken crates, and are you basically saying you'd rather not do that yourself? That's ok, no worries!

@MagaTailor
Copy link
Author

What a relief! ;)

I meant keeping these crate-specific reports related to the same issue in one place was definitely a better idea.

Due to the number of cargo's dependencies I'd originally thought that would be the right place to start.

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