algon-320 / vime

Using Vim as an input method for X11 apps
Apache License 2.0
229 stars 2 forks source link

errors building xcb-imdkit-rs #2

Open joh6nn opened 1 year ago

joh6nn commented 1 year ago

I got the following errors when running cargo install --path ./vime

error[E0432]: unresolved import `std::ffi::c_char`
  --> xcb-imdkit-rs/src/lib.rs:15:16
   |
15 | use std::ffi::{c_char, c_void};
   |                ^^^^^^ no `c_char` in `ffi`

error[E0282]: type annotations needed
   --> xcb-imdkit-rs/src/lib.rs:345:46
    |
345 |                 self.inner.preedit_string as _,
    |                                              ^ cannot infer type
    |
    = note: type must be known at this point

error[E0658]: use of unstable library feature 'box_into_pin'
   --> xcb-imdkit-rs/src/lib.rs:770:9
    |
770 |         Box::into_pin(im_server)
    |         ^^^^^^^^^^^^^
    |
    = note: see issue #62370 <https://github.com/rust-lang/rust/issues/62370> for more information

Some errors have detailed explanations: E0282, E0432, E0658.
For more information about an error, try `rustc --explain E0282`.
The following warnings were emitted during compilation:

warning: deps/xcb-imdkit/src/imdkit.c: In function ‘_xcb_im_init’:
warning: deps/xcb-imdkit/src/imdkit.c:248:5: warning: ignoring return value of ‘asprintf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
warning:   248 |     asprintf(&buf, "@server=%s", im->serverName);
warning:       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

error: could not compile `xcb-imdkit` due to 3 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile `vime v0.1.0 (/home/joh6nn/Code/vime/vime)`, intermediate artifacts can be found at `/home/joh6nn/Code/vime/target
algon-320 commented 1 year ago

Could you try it again with the latest Rust compiler (or version 1.65+) ?

If you are using rustup, you can switch the compliler by placing a "rust-toolchain" file with the content "1.65".

joh6nn commented 1 year ago

Yup, compiles successfully with rust 1.65 :)