Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CentOS 7 上安装cargo-liquid时报错 #14

Open
mark26195491 opened this issue Feb 17, 2022 · 3 comments
Open

CentOS 7 上安装cargo-liquid时报错 #14

mark26195491 opened this issue Feb 17, 2022 · 3 comments
Labels
documentation Improvements or additions to documentation

Comments

@mark26195491
Copy link

linux版本:centos 3.10.0-862.14.4.el7.x86_64
安装语句:cargo install --git https://github.com/WeBankBlockchain/cargo-liquid --branch dev --force
cmake version 3.20.0

报错信息:
[ 96%] Building CXX object CMakeFiles/wasm.dir/src/interp/interp-util.cc.o
[ 97%] Building CXX object CMakeFiles/wasm.dir/src/interp/istream.cc.o
[ 98%] Building CXX object CMakeFiles/wasm.dir/src/interp/interp-wasm-c-api.cc.o

--- stderr
CMake Warning (dev) at CMakeLists.txt:328 (add_library):
Policy CMP0115 is not set: Source file extensions must be explicit. Run
"cmake --help-policy CMP0115" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.

File:

  /data/home/test/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/wabt-sys-0.8.0/wabt/src/config.h.in

This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning:
Manually-specified variables were not used by the project:

  CMAKE_ASM_COMPILER
  CMAKE_ASM_FLAGS

gmake: warning: -jN forced in submake: disabling jobserver mode.
/data/home/test/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/wabt-sys-0.8.0/wabt/src/shared-validator.cc: In instantiation of ‘wabt::Result wabt::SharedValidator::CheckIndexWithValue(wabt::Var, const std::vector<RealType>&, T*, const char*) [with T = wabt::SharedValidator::EventType]’:
/data/home/test/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/wabt-sys-0.8.0/wabt/src/shared-validator.cc:486:62: required from here
/data/home/test/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/wabt-sys-0.8.0/wabt/src/shared-validator.cc:432:30: warning: missing initializer for member ‘wabt::SharedValidator::EventType::params’ [-Wmissing-field-initializers]
*out = Succeeded(result) ? values[var.index()] : T{};
^
/data/home/test/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/wabt-sys-0.8.0/wabt/src/interp/binary-reader-interp.cc: In member function ‘virtual wabt::Result wabt::interp::{anonymous}::BinaryReaderInterp::BeginGlobal(wabt::interp::Index, wabt::Type, bool)’:
/data/home/test/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/wabt-sys-0.8.0/wabt/src/interp/binary-reader-interp.cc:551:62: warning: missing initializer for member ‘wabt::interp::InitExpr::kind’ [-Wmissing-field-initializers]
module
.globals.push_back(GlobalDesc{global_type, InitExpr{}});
^
/data/home/test/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/wabt-sys-0.8.0/wabt/src/interp/binary-reader-interp.cc:551:62: warning: missing initializer for member ‘wabt::interp::InitExpr::’ [-Wmissing-field-initializers]
cc1: warning: command line option ‘-Wno-old-style-cast’ is valid for C++/ObjC++ but not for C [enabled by default]
/data/home/test/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/wabt-sys-0.8.0/wabt/src/shared-validator.cc: In instantiation of ‘wabt::Result wabt::SharedValidator::CheckIndexWithValue(wabt::Var, const std::vector<RealType>&, T*, const char*) [with T = wabt::SharedValidator::EventType]’:
/data/home/test/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/wabt-sys-0.8.0/wabt/src/shared-validator.cc:486:62: required from here
/data/home/test/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/wabt-sys-0.8.0/wabt/src/shared-validator.cc:432:30: warning: missing initializer for member ‘wabt::SharedValidator::EventType::params’ [-Wmissing-field-initializers]
out = Succeeded(result) ? values[var.index()] : T{};
^
/data/home/test/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/wabt-sys-0.8.0/wabt/src/interp/interp-wasm-c-api.cc: In constructor ‘wasm_globaltype_t::wasm_globaltype_t(wasm_valtype_t
, wasm_mutability_t)’:
/data/home/test/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/wabt-sys-0.8.0/wabt/src/interp/interp-wasm-c-api.cc:129:22: error: could not convert ‘* type’ from ‘wasm_valtype_t’ to ‘wabt::interp::ValueType {aka wabt::Type}’
valtype{type} {
^
/data/home/test/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/wabt-sys-0.8.0/wabt/src/interp/interp-wasm-c-api.cc: In constructor ‘wasm_tabletype_t::wasm_tabletype_t(wabt::interp::TableType)’:
/data/home/test/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/wabt-sys-0.8.0/wabt/src/interp/interp-wasm-c-api.cc:152:41: error: cannot convert ‘wasm_limits_t’ to ‘uint32_t {aka unsigned int}’ in initialization
limits{FromWabtLimits(tt.limits)} {}
^
/data/home/test/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/wabt-sys-0.8.0/wabt/src/interp/interp-wasm-c-api.cc:152:41: warning: missing initializer for member ‘wasm_limits_t::max’ [-Wmissing-field-initializers]
/data/home/test/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/wabt-sys-0.8.0/wabt/src/interp/interp-wasm-c-api.cc: In constructor ‘wasm_memorytype_t::wasm_memorytype_t(const wasm_limits_t
)’:
/data/home/test/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/wabt-sys-0.8.0/wabt/src/interp/interp-wasm-c-api.cc:162:23: error: cannot convert ‘const wasm_limits_t’ to ‘uint32_t {aka unsigned int}’ in initialization
limits{limits} {}
^
/data/home/test/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/wabt-sys-0.8.0/wabt/src/interp/interp-wasm-c-api.cc:162:23: warning: missing initializer for member ‘wasm_limits_t::max’ [-Wmissing-field-initializers]
/data/home/test/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/wabt-sys-0.8.0/wabt/src/interp/interp-wasm-c-api.cc: In constructor ‘wasm_memorytype_t::wasm_memorytype_t(wabt::interp::MemoryType)’:
/data/home/test/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/wabt-sys-0.8.0/wabt/src/interp/interp-wasm-c-api.cc:166:41: error: cannot convert ‘wasm_limits_t’ to ‘uint32_t {aka unsigned int}’ in initialization
limits{FromWabtLimits(mt.limits)} {}
^
/data/home/test/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/wabt-sys-0.8.0/wabt/src/interp/interp-wasm-c-api.cc:166:41: warning: missing initializer for member ‘wasm_limits_t::max’ [-Wmissing-field-initializers]
/data/home/test/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/wabt-sys-0.8.0/wabt/src/interp/interp-wasm-c-api.cc: In function ‘wasm_frame_t
wasm_frame_copy(const wasm_frame_t*)’:
/data/home/test/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/wabt-sys-0.8.0/wabt/src/interp/interp-wasm-c-api.cc:965:33: error: could not convert ‘* frame’ from ‘const wasm_frame_t’ to ‘wabt::interp::Frame’
return new wasm_frame_t{*frame};
^
gmake[2]: *** [CMakeFiles/wasm.dir/src/interp/interp-wasm-c-api.cc.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
/data/home/test/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/wabt-sys-0.8.0/wabt/src/interp/binary-reader-interp.cc: In member function ‘virtual wabt::Result wabt::interp::{anonymous}::BinaryReaderInterp::BeginGlobal(wabt::interp::Index, wabt::Type, bool)’:
/data/home/test/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/wabt-sys-0.8.0/wabt/src/interp/binary-reader-interp.cc:551:62: warning: missing initializer for member ‘wabt::interp::InitExpr::kind’ [-Wmissing-field-initializers]
module
.globals.push_back(GlobalDesc{global_type, InitExpr{}});
^
/data/home/test/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/wabt-sys-0.8.0/wabt/src/interp/binary-reader-interp.cc:551:62: warning: missing initializer for member ‘wabt::interp::InitExpr::’ [-Wmissing-field-initializers]
gmake[1]: *** [CMakeFiles/wasm.dir/all] Error 2
gmake: *** [all] Error 2
thread 'main' panicked at '
command did not execute successfully, got: exit status: 2

build script failed, must exit now', /data/home/test/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/cmake-0.1.48/src/lib.rs:975:5
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to compile cargo-liquid v1.0.0-rc2 (https://github.com/WeBankBlockchain/cargo-liquid?branch=dev#e051f162), intermediate artifacts can be found at /tmp/cargo-installLEg3Nm

Caused by:
build failed

@bxq2011hust bxq2011hust changed the title linux机器上安装cargo-liquid时报错 CentOS 7 上安装cargo-liquid时报错 Feb 17, 2022
@bxq2011hust
Copy link
Collaborator

  1. 请确保cmake版本大于3.12
  2. 请参考下述命令使用gcc7
sudo yum install -y epel-release centos-release-scl
sudo yum install -y devtoolset-7
source /opt/rh/devtoolset-7/enable
  1. 请参考下述命令使用要求版本的rust工具链
rustup toolchain install nightly-2021-06-23 --component rust-src rustc-dev llvm-tools-preview
rustup default nightly-2021-06-23

确保上述工具版本符合要求后,再次重新安装

@bxq2011hust bxq2011hust added the documentation Improvements or additions to documentation label Jun 17, 2022
@Archerxy
Copy link

1,2,3步都没问题,你们代码有错误
wabt-sys 无法构建
error[E0463]: can't find crate for rustc_mir--> src/analyzer/main.rs:10:1 | 10 | extern crate rustc_mir; | ^^^^^^^^^^^^^^^^^^^^^^^ can't find crate | = help: maybe you need to install the missing components with:rustup component add rust-src rustc-dev llvm-tools-preview`

error[E0432]: unresolved import rustc_middle::ty::subst::Subst
--> src/analyzer/control_flow/builder.rs:23:61
|
23 | subst::{GenericArg, GenericArgKind, InternalSubsts, Subst, SubstsRef},
| ^^^^^ no Subst in ty::subst

error[E0432]: unresolved import rustc_middle::ty::ProjectionTy
--> src/analyzer/control_flow/utils.rs:7:21
|
7 | FnSig, ParamTy, ProjectionTy, Ty, TyCtxt, TyKind, TypeAndMut,
| ^^^^^^^^^^^^
| |
| no ProjectionTy in ty
| help: a similar name exists in the module: Projection

error[E0603]: enum ImplicitSelfKind is private
--> src/analyzer/callbacks.rs:33:45
|
33 | BindingForm, Body, ClearCrossCrate, ImplicitSelfKind, Local, LocalInfo, Operand,
| ^^^^^^^^^^^^^^^^ private enum
|
note: the enum ImplicitSelfKind is defined here
--> /root/.rustup/toolchains/nightly-2023-01-03-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/compiler/rustc_middle/src/mir/mod.rs:21:38

error[E0603]: enum TerminatorKind is private
--> src/analyzer/control_flow/builder.rs:18:34
|
18 | terminator::{Terminator, TerminatorKind},
| ^^^^^^^^^^^^^^ private enum
|
note: the enum TerminatorKind is defined here
--> /root/.rustup/toolchains/nightly-2023-01-03-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/compiler/rustc_middle/src/mir/terminator.rs:3:64

warning: the feature backtrace has been stable since 1.65.0 and no longer requires an attribute to enable
--> src/analyzer/main.rs:3:12
|
3 | #![feature(backtrace)]
| ^^^^^^^^^
|
= note: #[warn(stable_features)] on by default

error[E0107]: this struct takes 1 lifetime argument but 2 lifetime arguments were supplied
--> src/analyzer/control_flow/builder.rs:231:17
|
231 | infcx: &InferCtxt<'_, 'tcx>,
| ^^^^^^^^^ ---- help: remove this lifetime argument
| |
| expected 1 lifetime argument`

@XGrscM
Copy link

XGrscM commented Jun 7, 2023

尝试使用github的链接,不要使用gitee的,我使用gitee链接也是上面的错误

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

4 participants