-
Notifications
You must be signed in to change notification settings - Fork 24
Description
Background
As part of the work on house of stake contracts, we've discovered that ABI generation fails when using sys crate for direct API access.
To reproduce:
git clone https://github.com/fastnear/house-of-stake-contracts
git checkout 23ac7b4051ffa01670e0651c9eb54624178e22cb
cd venear-contract
cargo near build non-reproducible-wasmError:
error: linking with `cc` failed: exit status: 1
│ |
= note: env -u IPHONEOS_DEPLOYMENT_TARGET -u TVOS_DEPLOYMENT_TARGET -u XROS_DEPLOYMENT_TARGET LC_ALL="C" PATH="/....
...
...
...
│ = note: Undefined symbols for architecture arm64:
│ "_attached_deposit", referenced from:
│ near_sdk::environment::env::attached_deposit::he82e1719fa48c466 in libnear_sdk-964dec7928e15740.rlib[3](near_sdk-964dec7928e15740.near_sdk.3f5c6dd446e6932f-cgu.0.rcgu.o)
│ "_current_account_id", referenced from:
│ near_sdk::environment::env::current_account_id::hc703cfdbcc6af662 in libnear_sdk-964dec7928e15740.rlib[3](near_sdk-964dec7928e15740.near_sdk.3f5c6dd446e6932f-cgu.0.rcgu.o)
│ "_input", referenced from:
│ _upgrade in venear_contract.2pp6nk6emeeherydhwfo9kbae.rcgu.o
│ _prepare_lockup_code in venear_contract.7qsrv4khoo1u2dgycn4aj57gj.rcgu.o
│ "_panic_utf8", referenced from:
│ near_sdk::environment::env::panic_str::he66a955fc6285268 in libnear_sdk-964dec7928e15740.rlib[3](near_sdk-964dec7928e15740.near_sdk.3f5c6dd446e6932f-cgu.0.rcgu.o)
│ "_predecessor_account_id", referenced from:
│ near_sdk::environment::env::predecessor_account_id::h3ad3fec5c378db42 in libnear_sdk-964dec7928e15740.rlib[3](near_sdk-964dec7928e15740.near_sdk.3f5c6dd446e6932f-cgu.0.rcgu.o)
│ "_promise_batch_action_deploy_contract", referenced from:
│ _upgrade in venear_contract.2pp6nk6emeeherydhwfo9kbae.rcgu.o
│ "_promise_batch_action_function_call", referenced from:
│ _upgrade in venear_contract.2pp6nk6emeeherydhwfo9kbae.rcgu.o
│ "_promise_batch_action_function_call_weight", referenced from:
│ _upgrade in venear_contract.2pp6nk6emeeherydhwfo9kbae.rcgu.o
│ "_promise_batch_create", referenced from:
│ _upgrade in venear_contract.2pp6nk6emeeherydhwfo9kbae.rcgu.o
│ "_promise_return", referenced from:
│ _upgrade in venear_contract.2pp6nk6emeeherydhwfo9kbae.rcgu.o
│ "_read_register", referenced from:
│ near_sdk::environment::env::read_register::h3369f9c10274d905 in libnear_sdk-964dec7928e15740.rlib[3](near_sdk-964dec7928e15740.near_sdk.3f5c6dd446e6932f-cgu.0.rcgu.o)
│ "_register_len", referenced from:
│ near_sdk::environment::env::register_len::hcd0e142d5bdd2155 in libnear_sdk-964dec7928e15740.rlib[3](near_sdk-964dec7928e15740.near_sdk.3f5c6dd446e6932f-cgu.0.rcgu.o)
│ "_sha256", referenced from:
│ venear_contract::lockup::internal_get_hash_and_size::h6a73e28e8ab4d24c in venear_contract.7qsrv4khoo1u2dgycn4aj57gj.rcgu.o
│ "_storage_read", referenced from:
│ near_sdk::environment::env::storage_read::h732e154eecb17557 in libnear_sdk-964dec7928e15740.rlib[3](near_sdk-964dec7928e15740.near_sdk.3f5c6dd446e6932f-cgu.0.rcgu.o)
│ "_storage_remove", referenced from:
│ near_sdk::environment::env::storage_remove::hf4f3d2d05f5e41ec in libnear_sdk-964dec7928e15740.rlib[3](near_sdk-964dec7928e15740.near_sdk.3f5c6dd446e6932f-cgu.0.rcgu.o)
│ "_storage_write", referenced from:
│ _prepare_lockup_code in venear_contract.7qsrv4khoo1u2dgycn4aj57gj.rcgu.o
│ near_sdk::environment::env::storage_write::h188107ab1de4908c in libnear_sdk-964dec7928e15740.rlib[3](near_sdk-964dec7928e15740.near_sdk.3f5c6dd446e6932f-cgu.0.rcgu.o)
│ "_value_return", referenced from:
│ _prepare_lockup_code in venear_contract.7qsrv4khoo1u2dgycn4aj57gj.rcgu.o
│ ld: symbol(s) not found for architecture arm64
│ clang: error: linker command failed with exit code 1 (use -v to see invocation)
│
│
│ error: could not compile `venear-contract` (lib) due to 1 previous error
Here is the console command if you ever need to re-run it again:
cargo near build non-reproducible-wasm
User Story
Acceptance Criteria
Resources & Additional Notes
No response
Priority
🟡 P2 : Medium
Reactions are currently unavailable