bkmgit opened a new issue, #13492:
URL: https://github.com/apache/tvm/issues/13492

   ### Expected behavior
   
   When running Cargo check on the Rust API code, it should pass.
   
   
   ### Actual behavior
   
   It fails with the following:
   ```
     Compiling tvm-sys v0.1.1-alpha (/home/ubuntu/check_TVM/TVM/rust/tvm-sys)
   error[E0308]: mismatched types
      --> tvm-sys/src/packed_func.rs:161:56
       |
   161 |         TVMArgTypeCode_kTVMStr => { Str(CStr::from_ptr(value.v_handle 
as *const i8)
   ) }
       |                                         -------------- 
^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
   expected `u8`, found `i8`
       |                                         |
       |                                         arguments to this function are 
incorrect
       |
       = note: expected raw pointer `*const u8`
                  found raw pointer `*const i8`
   note: associated function defined here
   
   error[E0308]: mismatched types
      --> tvm-sys/src/packed_func.rs:194:56
       |
   194 |         TVMArgTypeCode_kTVMStr => { Str(CStr::from_ptr(value.v_handle 
as *mut i8)) 
   }
       |                                         -------------- 
^^^^^^^^^^^^^^^^^^^^^^^^^ ex
   pected `u8`, found `i8`
       |                                         |
       |                                         arguments to this function are 
incorrect
       |
       = note: expected raw pointer `*const u8`
                  found raw pointer `*mut i8`
   note: associated function defined here
   
   For more information about this error, try `rustc --explain E0308`.
   error: could not compile `tvm-sys` due to 2 previous errors
   make[2]: *** [CMakeFiles/rust_ext.dir/build.make:73: 
../rust/target/release/libcompiler_ext.a] Error 101
   make[1]: *** [CMakeFiles/Makefile2:204: CMakeFiles/rust_ext.dir/all] Error 2
   make: *** [Makefile:136: all] Error 2
   ```
   
   ### Environment
   
   Ubuntu 22.04
   Arm 64
   Gcc 11.3.0
   rustc 1.65
   Python 3.10.6
   Commit 
https://github.com/apache/tvm/commit/9098b497bbbe20fb6c3b3ea6e062d2372cb0c8c9
   
   
   ### Steps to reproduce
   
   Clone the repository. Install TVM from source with LLVM 14 enabled including 
Python modules.
   Run `cargo check` in the rust subdirectory.
   
   ### Triage
   
   
   * ? rust
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to