rust-lexical icon indicating copy to clipboard operation
rust-lexical copied to clipboard

[BUG] compile error on i586: expected `()`, found `FPUControlWord`

Open jvdd opened this issue 10 months ago • 2 comments

Description

When compiling this crate in GitHub actions on a i586-unknown-linux-gnu target, the following error occurs

   Compiling lexical-parse-float v1.0.5
error[E0308]: mismatched types
  --> /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/lexical-parse-float-1.0.5/src/number.rs:77:23
   |
77 |         let _cw: () = set_precision::<F>();
   |                  --   ^^^^^^^^^^^^^^^^^^^^ expected `()`, found `FPUControlWord`
   |                  |
   |                  expected due to this

For more information about this error, try `rustc --explain E0308`.
error: could not compile `lexical-parse-float` (lib) due to 1 previous error

https://github.com/Alexhuszagh/rust-lexical/blob/5af823ff8643527057746153841777449b03d3ca/lexical-parse-float/src/number.rs#L77

Prerequisites

  • Rust version: nightly-x86_64-unknown-linux-gnu unchanged - rustc 1.86.0-nightly (bef3c3b01 2025-02-04)
  • lexical version: lexical-parse-float v1.0.5 (lexical-util is v1.0.6)
  • lexical compilation features used: (default?)

Additional Context

The link to the GitHub CI that fails:

https://github.com/jvdd/argminmax/actions/runs/13158734781/job/36726072805

jvdd avatar Feb 06 '25 08:02 jvdd

I was able to replicate this using cross build --target i586-unknown-linux-gnu, so this is confirmed and likely should be added to CI as well. I'll have to check if this affects correctness so this must be tested in CI as well. This does not affect the i686-unknown-linux-gnu target, so this is fully confirmed.

Thank you for discovering this.

Alexhuszagh avatar Feb 06 '25 15:02 Alexhuszagh

Reopening this until a release is published.

Alexhuszagh avatar Feb 06 '25 21:02 Alexhuszagh

Hello @Alexhuszagh, we are having this issue when building rustpython for Redox OS on i586. It would be a great help to release the fix. Thank you!

jackpot51 avatar Sep 07 '25 19:09 jackpot51

I'll create a separate branch and apply this patch and release. Thanks for notifying me.

Alexhuszagh avatar Sep 07 '25 19:09 Alexhuszagh

Thanks!

jackpot51 avatar Sep 07 '25 19:09 jackpot51

Thanks!

Just released, sorry for the delay.

Alexhuszagh avatar Sep 21 '25 03:09 Alexhuszagh