Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

slint compilation error for euclid for pico rp2040 #5263

Closed
MohaBeacon opened this issue May 17, 2024 · 2 comments
Closed

slint compilation error for euclid for pico rp2040 #5263

MohaBeacon opened this issue May 17, 2024 · 2 comments
Labels
needs info Further information from the reporter is requested

Comments

@MohaBeacon
Copy link

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

@tronical
Copy link
Member

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 tronical added the needs info Further information from the reporter is requested label May 17, 2024
@ogoffart
Copy link
Member

ogoffart commented May 24, 2024

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

@ogoffart ogoffart closed this as not planned Won't fix, can't repro, duplicate, stale May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs info Further information from the reporter is requested
Projects
None yet
Development

No branches or pull requests

3 participants