2020年的部分电脑硬盘被windows RST设定为Raid模式,极大地增加了安装双系统的成本(必须移除原windows系统修改完后再重装),笔者只能使用WSL2来编译conflux-chain。
全新ubuntu20.04加载完成之后,
笔者输入命令如下:
‘’’
sudo apt-get update
sudo apt-get upgrade
curl --proto ‘=https’ --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env
rustup default 1.42.0
sudo apt-get install clang libsqlite3-dev pkg-config libssl-dev cmake
git clone https://github.com/Conflux-Chain/conflux-rust
cd conflux-rust
git checkout v0.5.0.4
cargo build --release
‘’’
error: failed to run custom build command for librocksdb_sys v0.1.0 (https://github.com/Conflux-Chain/rust-rocksdb.git?rev=6d96482ddb51c1779af615767fd1967da9d98377#6d96482d)
Caused by:
process didn’t exit successfully: /home/zel/conflux-rust/target/release/build/librocksdb_sys-963b76660e5430bf/build-script-build
(exit code: 101)
— stdout
running: “cmake” “-Wdev” “–debug-output” “/home/zel/.cargo/git/checkouts/rust-rocksdb-af7927e7c279bef4/6d96482/librocksdb_sys/rocksdb” “-DWITH_GFLAGS=OFF” “-DWITH_TESTS=OFF” “-DWITH_TOOLS=OFF” “-DWITH_ZLIB=ON” “-DWITH_BZ2=ON” “-DWITH_LZ4=ON” “-DWITH_ZSTD=ON” “-DWITH_SNAPPY=ON” “-DCMAKE_INSTALL_PREFIX=/home/zel/conflux-rust/target/release/build/librocksdb_sys-a09fc5bf839c6863/out” “-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64” “-DCMAKE_C_COMPILER=/usr/bin/cc” “-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64” “-DCMAKE_CXX_COMPILER=/usr/bin/c++” “-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64” “-DCMAKE_ASM_COMPILER=/usr/bin/cc” “-DCMAKE_BUILD_TYPE=Release” “-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON”
Running with debug output on.
本人在另一台原生ubuntu20.04的机器能够成功编译,请问大神这是rust的锅,相关依赖的锅,还是WSL2系统的锅?