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

build failed on all x32 target(including i686, armv7) #105

Closed
greenhat616 opened this issue Sep 11, 2024 · 1 comment · Fixed by #106
Closed

build failed on all x32 target(including i686, armv7) #105

greenhat616 opened this issue Sep 11, 2024 · 1 comment · Fixed by #106

Comments

@greenhat616
Copy link

build compiled failted with:

error[E0308]: mismatched types
   --> /cargo/registry/src/rsproxy.cn-0dccff568467c15b/global-hotkey-0.6.1/src/platform_impl/x11/mod.rs:126:21
    |
122 |                 (xlib.XGrabKey)(
    |                 --------------- arguments to this function are incorrect
...
126 |                     root,
    |                     ^^^^ expected `u32`, found `u64`
    |
help: you can convert a `u64` to a `u32` and panic if the converted value doesn't fit
    |
126 |                     root.try_into().unwrap(),
    |                         ++++++++++++++++++++

error[E0308]: mismatched types
   --> /cargo/registry/src/rsproxy.cn-0dccff568467c15b/global-hotkey-0.6.1/src/platform_impl/x11/mod.rs:135:86
    |
135 |                     unsafe { (xlib.XUngrabKey)(display, keycode as _, modifiers | m, root) };
    |                              -----------------                                       ^^^^ expected `u32`, found `u64`
    |                              |
    |                              arguments to this function are incorrect
    |
help: you can convert a `u64` to a `u32` and panic if the converted value doesn't fit
    |
135 |                     unsafe { (xlib.XUngrabKey)(display, keycode as _, modifiers | m, root.try_into().unwrap()) };
    |                                                                                          ++++++++++++++++++++

error[E0308]: mismatched types
   --> /cargo/registry/src/rsproxy.cn-0dccff568467c15b/global-hotkey-0.6.1/src/platform_impl/x11/mod.rs:175:78
    |
175 |             unsafe { (xlib.XUngrabKey)(display, keycode as _, modifiers | m, root) };
    |                      -----------------                                       ^^^^ expected `u32`, found `u64`
    |                      |
    |                      arguments to this function are incorrect
    |
help: you can convert a `u64` to a `u32` and panic if the converted value doesn't fit
    |
175 |             unsafe { (xlib.XUngrabKey)(display, keycode as _, modifiers | m, root.try_into().unwrap()) };
    |                                                                                  ++++++++++++++++++++

error[E0308]: mismatched types
   --> /cargo/registry/src/rsproxy.cn-0dccff568467c15b/global-hotkey-0.6.1/src/platform_impl/x11/mod.rs:253:33
    |
250 | ...                   let _ = tx.send(register_hotkey(
    |                                       --------------- arguments to this function are incorrect
...
253 | ...                       root,
    |                           ^^^^ expected `u64`, found `u32`
    |
note: function defined here
   --> /cargo/registry/src/rsproxy.cn-0dccff568467c15b/global-hotkey-0.6.1/src/platform_impl/x11/mod.rs:105:4
    |
105 | fn register_hotkey(
    |    ^^^^^^^^^^^^^^^
...
108 |     root: u64,
    |     ---------
help: you can convert a `u32` to a `u64`
    |
253 |                                 root.into(),
    |                                     +++++++

error[E0308]: mismatched types
   --> /cargo/registry/src/rsproxy.cn-0dccff568467c15b/global-hotkey-0.6.1/src/platform_impl/x11/mod.rs:261:69
    |
261 | ...                   register_hotkey(&xlib, display, root, &mut hotkeys, hotkey)
    |                       ---------------                 ^^^^ expected `u64`, found `u32`
    |                       |
    |                       arguments to this function are incorrect
    |
note: function defined here
   --> /cargo/registry/src/rsproxy.cn-0dccff568467c15b/global-hotkey-0.6.1/src/platform_impl/x11/mod.rs:105:4
    |
105 | fn register_hotkey(
    |    ^^^^^^^^^^^^^^^
...
108 |     root: u64,
    |     ---------
help: you can convert a `u32` to a `u64`
    |
261 |                                     register_hotkey(&xlib, display, root.into(), &mut hotkeys, hotkey)
    |                                                                         +++++++

   Compiling os_info v3.8.2
error[E0308]: mismatched types
   --> /cargo/registry/src/rsproxy.cn-0dccff568467c15b/global-hotkey-0.6.1/src/platform_impl/x11/mod.rs:272:33
    |
269 | ...                   let _ = tx.send(unregister_hotkey(
    |                                       ----------------- arguments to this function are incorrect
...
272 | ...                       root,
    |                           ^^^^ expected `u64`, found `u32`
    |
note: function defined here
   --> /cargo/registry/src/rsproxy.cn-0dccff568467c15b/global-hotkey-0.6.1/src/platform_impl/x11/mod.rs:159:4
    |
159 | fn unregister_hotkey(
    |    ^^^^^^^^^^^^^^^^^
...
162 |     root: u64,
    |     ---------
help: you can convert a `u32` to a `u64`
    |
272 |                                 root.into(),
    |                                     +++++++

error[E0308]: mismatched types
   --> /cargo/registry/src/rsproxy.cn-0dccff568467c15b/global-hotkey-0.6.1/src/platform_impl/x11/mod.rs:280:71
    |
280 | ...                   unregister_hotkey(&xlib, display, root, &mut hotkeys, hotkey)
    |                       -----------------                 ^^^^ expected `u64`, found `u32`
    |                       |
    |                       arguments to this function are incorrect
    |
note: function defined here
   --> /cargo/registry/src/rsproxy.cn-0dccff568467c15b/global-hotkey-0.6.1/src/platform_impl/x11/mod.rs:159:4
    |
159 | fn unregister_hotkey(
    |    ^^^^^^^^^^^^^^^^^
...
162 |     root: u64,
    |     ---------
help: you can convert a `u32` to a `u64`
    |
280 |                                     unregister_hotkey(&xlib, display, root.into(), &mut hotkeys, hotkey)
error: could not compile `global-hotkey` (lib) due to 7 previous errors
@greenhat616 greenhat616 changed the title build failed on target armv7-unknown-linux-gnueabihf build failed on all x32 target(including i686, armv7) Sep 11, 2024
@greenhat616
Copy link
Author

I have tested on i686-unknown-linux-gnu. The same issue occurred.

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.

1 participant