Closed kroist closed 8 months ago
this is not a problem with non-local contracts, but with the fact, that psp22 lib is built by drink macros without the contract
feature
closing this issue, as it seems non-local contracts are supported; I will support build feature in a separate issue
1.75
5.0.0-rc
x86-64
Tried to import another smart contract as dependency in
Cargo.toml
:psp22 = { git = "https://github.com/Cardinal-Cryptography/PSP22.git", branch = "ink5", default-features = false, features = ["contract", "ink-as-dependency"] }
when running
cargo test --release
I get following errors:Stacktrace
``` error: linking with `cc` failed: exit status: 1 | = note: LC_ALL="C" PATH="......" = note: /usr/bin/ld: /home/user/.cargo/git/checkouts/psp22-38a68ab568348ac0/2330b07/target/ink/release/deps/metadata_gen-bf7ddbc074b5cbec.metadata_gen.12ff4bc3d4a64004-cgu.5.rcgu.o: in function `metadata_gen::main': metadata_gen.12ff4bc3d4a64004-cgu.5:(.text._ZN12metadata_gen4main17hec59d71e2f886443E+0x11): undefined reference to `__ink_generate_metadata' 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#cargorustc-link-libkindname) error: could not compile `metadata-gen` (bin "metadata-gen") due to previous error error: custom attribute panicked --> drink_tests/mod.rs:10:1 | 10 | #[drink::contract_bundle_provider] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: message: Error building contract: command ["/home/user/.rustup/toolchains/1.75-x86_64-unknown-linux-gnu/bin/cargo", "run", "--color=always", "--package", "metadata-gen", "--manifest-path=/tmp/cargo-contract_fLH7zx/Cargo.toml", "--target-dir", "/home/user/.cargo/git/checkouts/psp22-38a68ab568348ac0/2330b07/target/ink", "--release"] exited with code 101 Stack backtrace: 0: anyhow::error::