Skip to content

build failed #3

@liuxiaohui1221

Description

@liuxiaohui1221

I don't know how to fix it, When I execute:Z3_SYS_Z3_HEADER="/home/xhh/work/z3-4.13.0-x64-glibc-2.31/include/z3.h" cargo build command, it trigger error log here:
warning: field0is never read --> src/main.rs:37:11 | 37 | ParseErr(serde_json::Error), | -------- ^^^^^^^^^^^^^^^^^ | | | field in this variant | = note:#[warn(dead_code)]` on by default
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
|
37 | ParseErr(()),
| ~~

warning: field 0 is never read
--> src/main.rs:38:8
|
38 | Panic(Box<dyn Any + Send>),
| ----- ^^^^^^^^^^^^^^^^^^^
| |
| field in this variant
|
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
|
38 | Panic(()),
| ~~

error: linking with cc failed: exit status: 1
|

......

= note: /usr/bin/ld: /home/xhh/db_workspace/prover/target/debug/deps/libz3-9a55690bb2eb3d97.rlib(z3-9a55690bb2eb3d97.z3.ae782fb530f4bb14-cgu.03.rcgu.o): in function z3::ast::String::from_str': /home/xhh/.cargo/git/checkouts/z3.rs-f03f12d7fb4d45ec/2551894/z3/src/ast.rs:1116: undefined reference to Z3_mk_string'
/usr/bin/ld: /home/xhh/db_workspace/prover/target/debug/deps/libz3-9a55690bb2eb3d97.rlib(z3-9a55690bb2eb3d97.z3.ae782fb530f4bb14-cgu.03.rcgu.o): in function z3::ast::Dynamic::as_string': /home/xhh/.cargo/git/checkouts/z3.rs-f03f12d7fb4d45ec/2551894/z3/src/ast.rs:1676: undefined reference to Z3_is_string_sort'
/usr/bin/ld: /home/xhh/db_workspace/prover/target/debug/deps/libz3-9a55690bb2eb3d97.rlib(z3-9a55690bb2eb3d97.z3.ae782fb530f4bb14-cgu.03.rcgu.o): in function z3::ast::String::concat': /home/xhh/.cargo/git/checkouts/z3.rs-f03f12d7fb4d45ec/2551894/z3/src/ast.rs:185: undefined reference to Z3_mk_seq_concat'
/usr/bin/ld: /home/xhh/db_workspace/prover/target/debug/deps/libz3-9a55690bb2eb3d97.rlib(z3-9a55690bb2eb3d97.z3.ae782fb530f4bb14-cgu.03.rcgu.o): in function z3::ast::String::contains': /home/xhh/.cargo/git/checkouts/z3.rs-f03f12d7fb4d45ec/2551894/z3/src/ast.rs:143: undefined reference to Z3_mk_seq_contains'
/usr/bin/ld: /home/xhh/db_workspace/prover/target/debug/deps/libz3-9a55690bb2eb3d97.rlib(z3-9a55690bb2eb3d97.z3.ae782fb530f4bb14-cgu.03.rcgu.o): in function z3::ast::String::prefix': /home/xhh/.cargo/git/checkouts/z3.rs-f03f12d7fb4d45ec/2551894/z3/src/ast.rs:143: undefined reference to Z3_mk_seq_prefix'
/usr/bin/ld: /home/xhh/db_workspace/prover/target/debug/deps/libz3-9a55690bb2eb3d97.rlib(z3-9a55690bb2eb3d97.z3.ae782fb530f4bb14-cgu.03.rcgu.o): in function z3::ast::String::suffix': /home/xhh/.cargo/git/checkouts/z3.rs-f03f12d7fb4d45ec/2551894/z3/src/ast.rs:143: undefined reference to Z3_mk_seq_suffix'
/usr/bin/ld: /home/xhh/db_workspace/prover/target/debug/deps/libz3-9a55690bb2eb3d97.rlib(z3-9a55690bb2eb3d97.z3.ae782fb530f4bb14-cgu.03.rcgu.o): in function z3::ast::String::le': /home/xhh/.cargo/git/checkouts/z3.rs-f03f12d7fb4d45ec/2551894/z3/src/ast.rs:143: undefined reference to Z3_mk_str_le'
/usr/bin/ld: /home/xhh/db_workspace/prover/target/debug/deps/libz3-9a55690bb2eb3d97.rlib(z3-9a55690bb2eb3d97.z3.ae782fb530f4bb14-cgu.03.rcgu.o): in function z3::ast::String::lt': /home/xhh/.cargo/git/checkouts/z3.rs-f03f12d7fb4d45ec/2551894/z3/src/ast.rs:143: undefined reference to Z3_mk_str_lt'
/usr/bin/ld: /home/xhh/db_workspace/prover/target/debug/deps/libz3-9a55690bb2eb3d97.rlib(z3-9a55690bb2eb3d97.z3.ae782fb530f4bb14-cgu.05.rcgu.o): in function z3::sort::<impl z3::Sort>::string': /home/xhh/.cargo/git/checkouts/z3.rs-f03f12d7fb4d45ec/2551894/z3/src/sort.rs:51: undefined reference to Z3_mk_string_sort'
collect2: error: ld returned 1 exit status

= note: some extern functions couldn't be found; some native libraries may need to be installed or have their path specified
= note: use the -l flag to specify native libraries to link
= note: use the cargo:rustc-link-lib directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#rustc-link-lib)

warning: qed-prover (bin "qed-prover") generated 2 warnings
error: could not compile qed-prover (bin "qed-prover") due to 1 previous error; 2 warnings emitted
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions