prove-rs / z3.rs

Rust bindings for the Z3 solver.
338 stars 105 forks source link

z3 0.12.0 built failed on aarch64 musl #245

Closed Xuanwo closed 1 year ago

Xuanwo commented 1 year ago

Failed workflow: https://github.com/datafuselabs/databend/actions/runs/5653267959/job/15314175252?pr=12190

error[E0308]: mismatched types
    --> /opt/rust/cargo/registry/src/index.crates.io-6f17d22bba15001f/z3-0.12.0/src/params.rs:72:50
     |
72   |     if unsafe { Z3_global_param_get(ks.as_ptr(), &mut ptr as *mut *const i8) } {
     |                 -------------------              ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `*mut *const u8`, found `*mut *const i8`
     |                 |
     |                 arguments to this function are incorrect
     |
     = note: expected raw pointer `*mut *const u8`
                found raw pointer `*mut *const i8`
note: function defined here
    --> /opt/rust/cargo/registry/src/index.crates.io-6f17d22bba15001f/z3-sys-0.8.0/src/lib.rs:1626:12
     |
1626 |     pub fn Z3_global_param_get(param_id: Z3_string, param_value: Z3_string_ptr) -> bool;
     |            ^^^^^^^^^^^^^^^^^^^

error[E0606]: casting `&mut *const u8` as `*mut *const i8` is invalid
  --> /opt/rust/cargo/registry/src/index.crates.io-6f17d22bba15001f/z3-0.12.0/src/params.rs:72:50
   |
72 |     if unsafe { Z3_global_param_get(ks.as_ptr(), &mut ptr as *mut *const i8) } {
   |                                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^

Some errors have detailed explanations: E0308, E0606.
For more information about an error, try `rustc --explain E0308`.
error: could not compile `z3` (lib) due to 2 previous errors
Error: Process completed with exit code 101.

Could be reproduced on an aarch64 machine.

waywardmonkeys commented 1 year ago

One moment. I will publish 0.8.1 that fixes this shortly.

Xuanwo commented 1 year ago

One moment. I will publish 0.8.1 that fixes this shortly.

Wow, bravo! Thank you so much!

waywardmonkeys commented 1 year ago

I meant to publish z3 0.12.1, not z3-sys 0.8.1 ... oh well.

Z3 0.12.1 published now.