Skip to content
This repository has been archived by the owner on Jun 5, 2020. It is now read-only.

Build error with broken dependency: backtrace #55

Closed
xiaoniu-578fa6bff964d005 opened this issue Dec 14, 2018 · 3 comments
Closed

Build error with broken dependency: backtrace #55

xiaoniu-578fa6bff964d005 opened this issue Dec 14, 2018 · 3 comments

Comments

@xiaoniu-578fa6bff964d005
Copy link

xiaoniu-578fa6bff964d005 commented Dec 14, 2018

Local compiler:
rustc --version
rustc 1.31.0 (abe02cefd 2018-12-04)
rustc +nightly --version
rustc 1.32.0-nightly (f4a421ee3 2018-12-13)

errors:

error[E0308]: mismatched types
   --> /home/xiaoniu/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.12/src/symbolize/libbacktrace.rs:156:60
    |
156 |         STATE = bt::backtrace_create_state(ptr::null(), 0, error_cb,
    |                                                            ^^^^^^^^ expected enum `std::os::raw::c_void`, found enum `libc::c_void`                                                                                                                                    
    |
    = note: expected type `extern "C" fn(*mut std::os::raw::c_void, *const i8, i32)`
               found type `extern "C" fn(*mut libc::c_void, *const i8, i32) {symbolize::libbacktrace::error_cb}`

error[E0308]: mismatched types
   --> /home/xiaoniu/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.12/src/symbolize/libbacktrace.rs:172:36
    |
172 |                                    pcinfo_cb, error_cb,
    |                                    ^^^^^^^^^ expected enum `std::os::raw::c_void`, found enum `libc::c_void`
    |
    = note: expected type `extern "C" fn(*mut std::os::raw::c_void, usize, *const i8, i32, *const i8) -> i32`
               found type `extern "C" fn(*mut libc::c_void, usize, *const i8, i32, *const i8) -> i32 {symbolize::libbacktrace::pcinfo_cb}`

error[E0308]: mismatched types
   --> /home/xiaoniu/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.12/src/symbolize/libbacktrace.rs:172:47
    |
172 |                                    pcinfo_cb, error_cb,
    |                                               ^^^^^^^^ expected enum `std::os::raw::c_void`, found enum `libc::c_void`
    |
    = note: expected type `extern "C" fn(*mut std::os::raw::c_void, *const i8, i32)`
               found type `extern "C" fn(*mut libc::c_void, *const i8, i32) {symbolize::libbacktrace::error_cb}`
@sfackler
Copy link
Owner

That seems like an issue with the backtrace crate, though I can't reproduce that issue: https://circleci.com/gh/sfackler/cargo-tree/50

@xiaoniu-578fa6bff964d005
Copy link
Author

In your CI environment, you use image: rust:1.30.0 rather than rustc 1.31.0 which belong to 2018edition.

I searched for the error "expected enum std::os::raw::c_void, found enum libc::c_void", and found the issue is solved in rustc 1.32.0-nightly, according to rust-lang/rust#53856. So cargo +nightly install cargo-tree would do the trick.

@sfackler
Copy link
Owner

It looks like backtrace published a new release that may have fixed your issue. If not, I'd open an issue on its repository.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants