TechEmpower / FrameworkBenchmarks

Source for the TechEmpower Framework Benchmarks project
https://www.techempower.com/benchmarks/
Other
7.46k stars 1.92k forks source link

Actix failing build #8734

Open sebastienros opened 5 months ago

sebastienros commented 5 months ago

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 commented 5 months ago

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

robjtede commented 5 months ago

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.

sebastienros commented 5 months ago

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?

robjtede commented 5 months ago

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.

sebastienros commented 5 months ago

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.

robjtede commented 5 months ago

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.

mkvalor commented 3 months ago

@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).

robjtede commented 3 months ago

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

mkvalor commented 3 months ago

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!