环境
代码版本
23年1月15日,git clone代码编译
参考文档: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
编译报错:
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 orreturn
expression
|
= note: expected type!
found unit type()
修正
参考:https://github.com/risingwavelabs/risingwave/issues/7375
https://github.com/simd-lite/simd-json/blob/e611d9db0116885f66a1683ee1d6f5537b2cd83a/.cargo/config#L1-L2
- 修改:
.cargo/config.toml文件编译依旧报错; - 测试:
单独下载 https://github.com/simd-lite/simd-json 编译OK。 - 查看rustc 支持的目标CPU
rustc --print target-cpus
,支持simd。
- - 更新代码编译
依旧报错
- 删除代码,重新pull,编译
编译成功