imac risingwave编译记录:please_compile_with_a_simd_compatible_cpu_setting_read_the_simdjsonrs_readme()

environment

insert image description here

code version

On January 15, 23, git clone code was compiled
Reference document: https://github.com/risingwavelabs/risingwave

# Install Rust toolchain
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Clone the repo
git clone https://github.com/risingwavelabs/risingwave.git && cd risingwave
# Compile and start the playground
./risedev playground

Compilation error:

error[E0308]: mismatched types
–> /Users/odysa/.cargo/git/checkouts/simd-json-0dd937541df12053/fe89a0d/src/lib.rs:228:86
|
228 | fn please_compile_with_a_simd_compatible_cpu_setting_read_the_simdjsonrs_readme() -> ! {}
| ---------------------------------------------------------------------------- ^ expected !, found ()
| |
| implicitly returns () as its body has no tail or return expression
|
= note: expected type !
found unit type ()
insert image description here

fix

Reference: https://github.com/risingwavelabs/risingwave/issues/7375
https://github.com/simd-lite/simd-json/blob/e611d9db0116885f66a1683ee1d6f5537b2cd83a/.cargo/config#L1-L2

  • Modification:
    Compiling the .cargo/config.toml file still reports an error;
  • Test:
    Download https://github.com/simd-lite/simd-json separately and compile OK.
  • Check the target CPUs supported by rustc rustc --print target-cpusand support simd.
    -insert image description here
  • Update the code to compile
    and still report an error
    insert image description here
    insert image description here
  • Delete the code, re-pull, compile

insert image description here

compile successfully

insert image description here
insert image description here
insert image description here
insert image description here
insert image description here

Guess you like

Origin blog.csdn.net/zdsx1104/article/details/128731409