Cannot build with `error[E0308]: mismatched types` in azul-text-layout using x86_64-pc-windows-msvc toolchain
Closed this issue · 2 comments
Description
Some part of Azul's build system is broken maybe. I tried build Azul with a minimal bin-crate but I got these 9 errors in belows:
Pattern 1: expected i32
, found i64
( x3 errors )
C:\Users\usagi\.cargo\git\checkouts\azul-f3b1e21a5e685cad\17b76b0\cargo\azul-text-layout\../../azul-text-layout\text_shaping.rs:309:73
|
309 | let error = FT_New_Memory_Face(ft_library, font_bytes.as_ptr(), buf_len, font_index as i64, &mut ft_face);
| ^^^^^^^ expected `i32`, found `i64`
|
help: you can convert an `i64` to `i32` and panic if the converted value wouldn't fit
|
309 | let error = FT_New_Memory_Face(ft_library, font_bytes.as_ptr(), buf_len.try_into().unwrap(), font_index as i64, &mut
ft_face);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Pattern 2: expected i64
, found i32
( x6 erroes )
error[E0308]: mismatched types
-->
C:\Users\usagi\.cargo\git\checkouts\azul-f3b1e21a5e685cad\17b76b0\cargo\azul-text-layout\../../azul-text-layout\text_shaping.rs:333:22
|
333 | x_scale: metrics.x_scale,
| ^^^^^^^^^^^^^^^ expected `i64`, found `i32`
And, you can see the all errors in here(gist) -> https://gist.github.com/usagi/cf130471216f05aaaf3eed93bd78a462
Version / OS
- azul version: 17b76b0 (
azul = { git = "https://github.com/maps4print/azul" }
) - Operating system: Microsoft Windows 10 ( 64-bit ) 10.0.19041.113
Steps to Reproduce
cargo new a
cd a
- Append line
azul = { git = "https://github.com/maps4print/azul" }
in the[dependencies]
section in theCargo.toml
. cargo build
Additional Information
I think, it is very similar problem in these:
But #203 and #163 is the Harfbuzz issue and it's cleared at least the main problems. And, I tried add the msvc's cmake.exe
path to PATH
environment, and checked using where.exe
, and removed the other CMake installs but the problem is not solved. 😢
Additional researchAdditional informations:
- I checked built freetype.lib's memory model:
dumpbin /headers freetype.lib
in thetarget
directory ->8664 machine (x64)
; The building of the native library level has no problems.
I found the factor. I'll PR in near future about the issue. I think, the factor is complexed windows and msvc's memory layout model (LLP64) but the solution is a little fixing for azul. Wait a moment please. 👍