slint icon indicating copy to clipboard operation
slint copied to clipboard

slint compilation error for euclid for pico rp2040

Open MohaBeacon opened this issue 1 year ago • 1 comments
trafficstars

Compiling euclid v0.22.9 Compiling slint-build v1.6.0 Compiling slint-macros v1.6.0 error[E0432]: unresolved import num_traits::real --> /home/mohan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/euclid-0.22.9/src/angle.rs:16:17 | 16 | use num_traits::real::Real; | ^^^^ could not find real in num_traits

error[E0432]: unresolved import num_traits::Float --> /home/mohan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/euclid-0.22.9/src/angle.rs:17:18 | 17 | use num_traits::{Float, FloatConst, NumCast, One, Zero}; | ^^^^^ | | | no Float in the root | help: a similar name exists in the module (notice the capitalization): float | note: found an item that was configured out --> /home/mohan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/num-traits-0.2.19/src/lib.rs:32:23 | 32 | pub use crate::float::Float; | ^^^^^

error[E0432]: unresolved import num_traits::Float --> /home/mohan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/euclid-0.22.9/src/box2d.rs:20:27 | 20 | use num_traits::{NumCast, Float}; | ^^^^^ | | | no Float in the root | help: a similar name exists in the module (notice the capitalization): float | note: found an item that was configured out --> /home/mohan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/num-traits-0.2.19/src/lib.rs:32:23 | 32 | pub use crate::float::Float; | ^^^^^

error[E0432]: unresolved import num_traits::Float --> /home/mohan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/euclid-0.22.9/src/box3d.rs:18:27 | 18 | use num_traits::{NumCast, Float}; | ^^^^^ | | | no Float in the root | help: a similar name exists in the module (notice the capitalization): float | note: found an item that was configured out --> /home/mohan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/num-traits-0.2.19/src/lib.rs:32:23 | 32 | pub use crate::float::Float; | ^^^^^

error[E0432]: unresolved import num_traits::real --> /home/mohan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/euclid-0.22.9/src/point.rs:25:17 | 25 | use num_traits::real::Real; | ^^^^ could not find real in num_traits

error[E0432]: unresolved import num_traits::Float --> /home/mohan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/euclid-0.22.9/src/point.rs:26:18 | 26 | use num_traits::{Float, NumCast, Euclid}; | ^^^^^ | | | no Float in the root | help: a similar name exists in the module (notice the capitalization): float | note: found an item that was configured out --> /home/mohan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/num-traits-0.2.19/src/lib.rs:32:23 | 32 | pub use crate::float::Float; | ^^^^^

error[E0432]: unresolved import num_traits::Float --> /home/mohan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/euclid-0.22.9/src/rect.rs:19:27 | 19 | use num_traits::{NumCast, Float}; | ^^^^^ | | | no Float in the root | help: a similar name exists in the module (notice the capitalization): float | note: found an item that was configured out --> /home/mohan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/num-traits-0.2.19/src/lib.rs:32:23 | 32 | pub use crate::float::Float; | ^^^^^

error[E0432]: unresolved import num_traits::real --> /home/mohan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/euclid-0.22.9/src/rigid.rs:8:17 | 8 | use num_traits::real::Real; | ^^^^ could not find real in num_traits

error[E0432]: unresolved import num_traits::real --> /home/mohan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/euclid-0.22.9/src/rotation.rs:19:17 | 19 | use num_traits::real::Real; | ^^^^ could not find real in num_traits

error[E0432]: unresolved import num_traits::Float --> /home/mohan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/euclid-0.22.9/src/size.rs:26:35 | 26 | use num_traits::{NumCast, Signed, Float}; | ^^^^^ | | | no Float in the root | help: a similar name exists in the module (notice the capitalization): float | note: found an item that was configured out --> /home/mohan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/num-traits-0.2.19/src/lib.rs:32:23 | 32 | pub use crate::float::Float; | ^^^^^

error[E0432]: unresolved import num_traits::real --> /home/mohan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/euclid-0.22.9/src/vector.rs:30:17 | 30 | use num_traits::real::Real; | ^^^^ could not find real in num_traits

error[E0432]: unresolved import num_traits::Float --> /home/mohan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/euclid-0.22.9/src/vector.rs:31:18 | 31 | use num_traits::{Float, NumCast, Signed}; | ^^^^^ | | | no Float in the root | help: a similar name exists in the module (notice the capitalization): float | note: found an item that was configured out --> /home/mohan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/num-traits-0.2.19/src/lib.rs:32:23 | 32 | pub use crate::float::Float; | ^^^^^

error[E0433]: failed to resolve: could not find Float in num_traits --> /home/mohan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/euclid-0.22.9/src/approxeq.rs:35:29 | 35 | num_traits::Float::abs(*self - *other) < *approx_epsilon | ^^^^^ could not find Float in num_traits ... 41 | approx_eq!(f32, 1.0e-6); | ----------------------- in this macro invocation | note: found an item that was configured out --> /home/mohan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/num-traits-0.2.19/src/lib.rs:32:23 | 32 | pub use crate::float::Float; | ^^^^^ = note: this error originates in the macro approx_eq (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find Float in num_traits --> /home/mohan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/euclid-0.22.9/src/approxeq.rs:35:29 | 35 | num_traits::Float::abs(*self - *other) < *approx_epsilon | ^^^^^ could not find Float in num_traits ... 42 | approx_eq!(f64, 1.0e-6); | ----------------------- in this macro invocation | note: found an item that was configured out --> /home/mohan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/num-traits-0.2.19/src/lib.rs:32:23 | 32 | pub use crate::float::Float; | ^^^^^ = note: this error originates in the macro approx_eq (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find Float in num_traits --> /home/mohan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/euclid-0.22.9/src/num.rs:107:29 | 107 | num_traits::Float::floor(self) | ^^^^^ could not find Float in num_traits ... 127 | num_float!(f32); | --------------- in this macro invocation | note: found an item that was configured out --> /home/mohan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/num-traits-0.2.19/src/lib.rs:32:23 | 32 | pub use crate::float::Float; | ^^^^^ = note: this error originates in the macro num_float (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find Float in num_traits --> /home/mohan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/euclid-0.22.9/src/num.rs:113:29 | 113 | num_traits::Float::ceil(self) | ^^^^^ could not find Float in num_traits ... 127 | num_float!(f32); | --------------- in this macro invocation | note: found an item that was configured out --> /home/mohan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/num-traits-0.2.19/src/lib.rs:32:23 | 32 | pub use crate::float::Float; | ^^^^^ = note: this error originates in the macro num_float (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find Float in num_traits --> /home/mohan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/euclid-0.22.9/src/num.rs:107:29 | 107 | num_traits::Float::floor(self) | ^^^^^ could not find Float in num_traits ... 128 | num_float!(f64); | --------------- in this macro invocation | note: found an item that was configured out --> /home/mohan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/num-traits-0.2.19/src/lib.rs:32:23 | 32 | pub use crate::float::Float; | ^^^^^ = note: this error originates in the macro num_float (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find Float in num_traits --> /home/mohan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/euclid-0.22.9/src/num.rs:113:29 | 113 | num_traits::Float::ceil(self) | ^^^^^ could not find Float in num_traits ... 128 | num_float!(f64); | --------------- in this macro invocation | note: found an item that was configured out --> /home/mohan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/num-traits-0.2.19/src/lib.rs:32:23 | 32 | pub use crate::float::Float; | ^^^^^ = note: this error originates in the macro num_float (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find Float in num_traits --> /home/mohan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/euclid-0.22.9/src/trig.rs:25:29 | 25 | num_traits::Float::sin(self) | ^^^^^ could not find Float in num_traits ... 79 | trig!(f32); | ---------- in this macro invocation | note: found an item that was configured out --> /home/mohan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/num-traits-0.2.19/src/lib.rs:32:23 | 32 | pub use crate::float::Float; | ^^^^^ = note: this error originates in the macro trig (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find Float in num_traits --> /home/mohan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/euclid-0.22.9/src/trig.rs:29:29 | 29 | num_traits::Float::cos(self) | ^^^^^ could not find Float in num_traits ... 79 | trig!(f32); | ---------- in this macro invocation | note: found an item that was configured out --> /home/mohan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/num-traits-0.2.19/src/lib.rs:32:23 | 32 | pub use crate::float::Float; | ^^^^^ = note: this error originates in the macro trig (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find Float in num_traits --> /home/mohan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/euclid-0.22.9/src/trig.rs:33:29 | 33 | num_traits::Float::tan(self) | ^^^^^ could not find Float in num_traits ... 79 | trig!(f32); | ---------- in this macro invocation | note: found an item that was configured out --> /home/mohan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/num-traits-0.2.19/src/lib.rs:32:23 | 32 | pub use crate::float::Float; | ^^^^^ = note: this error originates in the macro trig (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find Float in num_traits --> /home/mohan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/euclid-0.22.9/src/trig.rs:47:41 | 47 | let x_abs = num_traits::Float::abs(x); | ^^^^^ could not find Float in num_traits ... 79 | trig!(f32); | ---------- in this macro invocation | note: found an item that was configured out --> /home/mohan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/num-traits-0.2.19/src/lib.rs:32:23 | 32 | pub use crate::float::Float; | ^^^^^ = note: this error originates in the macro trig (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find Float in num_traits --> /home/mohan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/euclid-0.22.9/src/trig.rs:48:41 | 48 | let y_abs = num_traits::Float::abs(y); | ^^^^^ could not find Float in num_traits ... 79 | trig!(f32); | ---------- in this macro invocation | note: found an item that was configured out --> /home/mohan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/num-traits-0.2.19/src/lib.rs:32:23 | 32 | pub use crate::float::Float; | ^^^^^ = note: this error originates in the macro trig (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find Float in num_traits --> /home/mohan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/euclid-0.22.9/src/trig.rs:25:29 | 25 | num_traits::Float::sin(self) | ^^^^^ could not find Float in num_traits ... 80 | trig!(f64); | ---------- in this macro invocation | note: found an item that was configured out --> /home/mohan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/num-traits-0.2.19/src/lib.rs:32:23 | 32 | pub use crate::float::Float; | ^^^^^ = note: this error originates in the macro trig (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find Float in num_traits --> /home/mohan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/euclid-0.22.9/src/trig.rs:29:29 | 29 | num_traits::Float::cos(self) | ^^^^^ could not find Float in num_traits ... 80 | trig!(f64); | ---------- in this macro invocation | note: found an item that was configured out --> /home/mohan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/num-traits-0.2.19/src/lib.rs:32:23 | 32 | pub use crate::float::Float; | ^^^^^ = note: this error originates in the macro trig (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find Float in num_traits --> /home/mohan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/euclid-0.22.9/src/trig.rs:33:29 | 33 | num_traits::Float::tan(self) | ^^^^^ could not find Float in num_traits ... 80 | trig!(f64); | ---------- in this macro invocation | note: found an item that was configured out --> /home/mohan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/num-traits-0.2.19/src/lib.rs:32:23 | 32 | pub use crate::float::Float; | ^^^^^ = note: this error originates in the macro trig (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find Float in num_traits --> /home/mohan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/euclid-0.22.9/src/trig.rs:47:41 | 47 | let x_abs = num_traits::Float::abs(x); | ^^^^^ could not find Float in num_traits ... 80 | trig!(f64); | ---------- in this macro invocation | note: found an item that was configured out --> /home/mohan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/num-traits-0.2.19/src/lib.rs:32:23 | 32 | pub use crate::float::Float; | ^^^^^ = note: this error originates in the macro trig (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: could not find Float in num_traits --> /home/mohan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/euclid-0.22.9/src/trig.rs:48:41 | 48 | let y_abs = num_traits::Float::abs(y); | ^^^^^ could not find Float in num_traits ... 80 | trig!(f64); | ---------- in this macro invocation | note: found an item that was configured out --> /home/mohan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/num-traits-0.2.19/src/lib.rs:32:23 | 32 | pub use crate::float::Float; | ^^^^^ = note: this error originates in the macro trig (in Nightly builds, run with -Z macro-backtrace for more info)

Some errors have detailed explanations: E0432, E0433. For more information about an error, try rustc --explain E0432. error: could not compile euclid (lib) due to 28 previous errors

MohaBeacon avatar May 17 '24 11:05 MohaBeacon

Could it be that you're compiling on a system without floating point arithmetic? Then you need to enable the libm feature of the Slint crate to enable the floating point arithmetic emulation.

tronical avatar May 17 '24 13:05 tronical

Assuming the problem was because the libm feature of the slint crate was missing.

ogoffart avatar May 24 '24 08:05 ogoffart