tremor-rs / tremor-runtime

Main Tremor Project Rust Codebase
https://www.tremor.rs
Apache License 2.0
852 stars 125 forks source link

Doesn't compile #249

Closed 0xdeafbeef closed 4 years ago

0xdeafbeef commented 4 years ago

Problem

Doesn't compile due to error in simd-jons.

simd-json-0.3.9/src/lib.rs:216:86
    |
216 | fn please_compile_with_a_simd_compatible_cpu_setting_read_the_simdjonsrs_readme() -> ! {}
    |    ----------------------------------------------------------------------------      ^ expected `!`, found `()`
    |    |
    |    implicitly returns `()` as its body has no tail or `return` expression
    |
    = note:   expected type `!`
            found unit type `()`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0308`.
error: could not compile `simd-json`.

Steps

  1. cargo build .

Possible Solution(s)

Use another version of simd-jsons

m0n0chr0m3 commented 4 years ago

Which of the libraries or binaries are you trying to compile when you get the error? Just the main tremor-runtime?

Note that the error you are getting is one that is purposefully triggered when you compile for a target which doesn't offer the SIMD features which simd-json uses. Support for AVX2, SSE4.2 or NEON is required, as explained futher in the Readme.

Normally, all Tremor libs set the build setting rustc-args = [ "-C target-cpu=native" ], for instance in Tremor Script's Cargo.toml or in the one of Tremor Influx.

To help in solving this issue, could you determine whether one of the following is the case?

  1. You're trying to build normal Tremor libs using the official guidelines, on a platform whose ISA offers AVX2, SSE4.2 or NEON.
  2. You're trying to build normal Tremor libs using the official guidelines, on an incompatible platform. (In this case, the solution will probably be to explicitly request the non-simd fallback using allow-non-simd as outlined in the Readme. Note that this will likely harm performance.)
  3. You're trying to build parts of Tremor for inclusion in another codebase. (In this case, the solution will probably be to add either rustc-args = [ "-C target-cpu=native" ] in your Cargo.toml, or allow the fallback using the allow-non-simd feature to simd-json.)
0xdeafbeef commented 4 years ago

My fault. I was building on vm with generic CPU. Set it to host CPU type and it's working as a charm. Excuse me for troubling :)