FrameworkBenchmarks icon indicating copy to clipboard operation
FrameworkBenchmarks copied to clipboard

Actix failing build

Open sebastienros opened this issue 1 year ago • 9 comments

Log:

   Compiling hostname v0.3.1
   Compiling quick-error v1.2.3
   Compiling rand_core v0.6.4
error[E0635]: unknown feature `stdsimd`
  --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/ahash-0.8.3/src/lib.rs:99:42
   |
99 | #![cfg_attr(feature = "stdsimd", feature(stdsimd))]
   |                                          ^^^^^^^

   Compiling actix-service v2.0.2
   Compiling askama_escape v0.10.3
   Compiling iana-time-zone v0.1.57
   Compiling hashbrown v0.12.3
   Compiling parking_lot v0.12.1
   Compiling simdutf8 v0.1.4
   Compiling ipnet v2.8.0
For more information about this error, try `rustc --explain E0635`.
   Compiling linked-hash-map v0.5.6
   Compiling pq-sys v0.4.8
error: could not compile `ahash` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error[E0635]: unknown feature `stdsimd`
  --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/ahash-0.7.6/src/lib.rs:33:42
   |
33 | #![cfg_attr(feature = "stdsimd", feature(stdsimd))]
   |                                          ^^^^^^^

error: could not compile `ahash` (lib) due to 1 previous error
error: could not compile `ahash` (lib) due to 1 previous error
The command '/bin/sh -c RUSTFLAGS="-C target-cpu=native" cargo build --release' returned a non-zero code: 101

/cc @ecruz-te @robjtede

sebastienros avatar Feb 07 '24 20:02 sebastienros

Could this sudden failure be due to some "floating" version on a dependency? Ideally all dependencies should be pinned. For instance I could find this "nightly" reference, could it make the build fail at some point:

https://github.com/TechEmpower/FrameworkBenchmarks/blob/master/frameworks/Rust/actix/rust-toolchain.toml#L2

sebastienros avatar Feb 07 '24 20:02 sebastienros

There isn't much we could have done about this. Nightly failures happen and libraries that opt in to using those unstable features automatically subscribe to dealing with these kinds of failures at the detriment of transitive dependencies. I trust that they're on it and this will be resolved in a couple of days.

robjtede avatar Feb 07 '24 20:02 robjtede

Do you mean that the [toolchain] argument is not the reason of this failure, or that it can't use a value like stable or 1.8.0?

sebastienros avatar Feb 07 '24 20:02 sebastienros

I haven't looked closely enough at other things other than the message you pasted:

error: could not compile `ahash` (lib) due to 1 previous error

ahash is at fault here, not Actix Web.

robjtede avatar Feb 08 '24 00:02 robjtede

I am definitely not blaming Actix, just wanted to understand why the benchmark started failing overnight as we are expected to pin all dependencies to prevent these issues.

sebastienros avatar Feb 08 '24 00:02 sebastienros

I guess you can only pin as far as the library itself does. Crates in the Rust ecosystem expect semver compatibility within a semver range.

In this case, everything works fine for stable users. However, ahash chose to automatically enable unstable features under nightly compilers, which is not recommended (for exactly this reason).

This issue is kinda surprising to me, because I would expect TFB to use a stable compiler.

robjtede avatar Feb 08 '24 00:02 robjtede

@sebastienros Whenever I see a failure for one of the frameworks I follow closely, I open a GitHub issue in that framework's repo directly. I have found that maintainers of frameworks are sometimes not aware for weeks when this kind of failure occurs. I recommend you try this in the actix repo's Issues page (if you have not yet done this).

mkvalor avatar Mar 24 '24 12:03 mkvalor

@mkvalor there's no need, I'm right here :P

robjtede avatar Mar 24 '24 22:03 robjtede

Oof, I originally suspected so; should've just looked at top contributors to Actix. But the pronoun in the third comment and the reference to the project in the fifth comment tipped my suspicion in a different direction. All good!

mkvalor avatar Mar 25 '24 15:03 mkvalor