Closed3

servoセットアップ時の`Non floating-type complex? Type`を解決する

itkrt2yitkrt2y

servo のセットアップをしていたら、 ./mach check にて以下のエラーが発生した。これを解決したい。

thread 'main' panicked at 'Non floating-type complex? Type(_Complex _Float16, kind: Complex, cconv: 100, decl: Cursor( kind: NoDeclFound, loc: builtin definitions, usr: None), canon: Cursor( kind: NoDeclFound, loc: builtin definitions, usr: None)), Type(_Float16, kind: Float16, cconv: 100, decl: Cursor( kind: NoDeclFound, loc: builtin definitions, usr: None), canon: Cursor( kind: NoDeclFound, loc: builtin definitions, usr: None))', /home/itkrt2y/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bindgen-0.68.1/ir/context.rs:2020:26
itkrt2yitkrt2y

これらのコメントに従いbindgenにpatchを当て、 ./mach clean した上でまた ./mach check したら直った

--- a/~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bindgen-0.68.1/ir/context.rs
+++ b/~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bindgen-0.68.1/ir/context.rs
@@ -2008,6 +2008,7 @@ If you encounter an error missing from this list, please file an issue or a PR!"
             CXType_Float => TypeKind::Float(FloatKind::Float),
             CXType_Double => TypeKind::Float(FloatKind::Double),
             CXType_LongDouble => TypeKind::Float(FloatKind::LongDouble),
+            CXType_Float16 => TypeKind::Float(FloatKind::Float),
             CXType_Float128 => TypeKind::Float(FloatKind::Float128),
             CXType_Complex => {
                 let float_type =
@@ -2016,6 +2017,7 @@ If you encounter an error missing from this list, please file an issue or a PR!"
                     CXType_Float => FloatKind::Float,
                     CXType_Double => FloatKind::Double,
                     CXType_LongDouble => FloatKind::LongDouble,
+                    CXType_Float16 => FloatKind::Float,
                     CXType_Float128 => FloatKind::Float128,
                     _ => panic!(
                         "Non floating-type complex? {:?}, {:?}",
このスクラップは2023/11/09にクローズされました