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

cross compiling failed #54

Closed
cyrixSpec opened this issue Feb 18, 2021 · 1 comment · Fixed by #55
Closed

cross compiling failed #54

cyrixSpec opened this issue Feb 18, 2021 · 1 comment · Fixed by #55

Comments

@cyrixSpec
Copy link

Hi there,
I tried to cross-compile rummqtt and got the following output.

roker/target/armv7-unknown-linux-gnueabihf/release/deps/libthiserror-eef2e33c746f6e56.rmeta --cap-lints allow`
error[E0308]: mismatched types
   --> /home/xx/.cargo/registry/src/github.com-1ecc6299db9ec823/pprof-0.4.1/src/profiler.rs:143:47
    |
143 |             write_thread_name(current_thread, &mut name);
    |                                               ^^^^^^^^^ expected slice `[u8]`, found array `[i8; 16]`
    |
    = note: expected mutable reference `&mut [u8]`
               found mutable reference `&mut [i8; 16]`

error[E0606]: casting `&mut [i8; 16]` as `*mut [u8]` is invalid
   --> /home/fwa/.cargo/registry/src/github.com-1ecc6299db9ec823/pprof-0.4.1/src/profiler.rs:141:28
    |
141 |             let name_ptr = &mut name as *mut [libc::c_char] as *mut libc::c_char;
    |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0308, E0606.
For more information about an error, try `rustc --explain E0308`.
error: could not compile `pprof`

Can you verify this?
Thanks in advance.

@YangKeao
Copy link
Member

It has been fixed in v0.4.2. Thanks for your report 🍻

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

Successfully merging a pull request may close this issue.

2 participants