-
Notifications
You must be signed in to change notification settings - Fork 136
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
Linker error from primitive cast in no_std #167
Comments
That's basically just casting an |
I'm able to trigger the same link error with What's your recommended approach to solving this? Is this something |
I think In the shorter term, maybe you could try copying that code as your own |
Yeah reading the docs of |
I also encountered this issue. I'm trying to instrument my no_std kernel for code coverage and I'm also passing the rustflag
I'm going to workaround this for now by providing an empty stub for the method, but it would be nice if you (@dbeckwith ) could post a short update once you solved your problem. |
Hello,
I'm using
num-rational
in ano_std
project (target is custom, based onx86_64-unknown-none
) and am getting a linker error when usingRational32::approximate_float
. It seems to be coming from a cast in this crate in an impl ofToPrimitive
(I'm guessing specifically<f64 as ToPrimitive>::to_f32
). I've tried explicitly enabling thelibm
feature fornum-traits
in myCargo.toml
, but that didn't help because it seems like theToPrimitive
definitions don't havelibm
versions.Is the solution to this just to provide a
libm
version of theToPrimitive
impls? Does one already exist that I'm missing and I'm just not enabling thelibm
feature correctly? Any advice is appreciated.The text was updated successfully, but these errors were encountered: