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

hello_driver.cpp - "no mapping for imported function" #9

Open
mikelik opened this issue May 30, 2023 · 1 comment
Open

hello_driver.cpp - "no mapping for imported function" #9

mikelik opened this issue May 30, 2023 · 1 comment
Labels
bug Something isn't working 👍 lgtm

Comments

@mikelik
Copy link
Member

mikelik commented May 30, 2023

When I compile and run hello_driver.cpp and removing memset from the example I get the error that: no mapping for imported function for at least 3 functions:

  • set_blockchain_parameters_packed
  • get_blockchain_parameters_packed
  • set_proposed_producers
  • get_active_producers

Exception is thrown from eosio/vm/host_function.hpp:463.

Used leap v3.2.3, CDT v3.2.0.

Example output if I remove try catch from hello_driver.cpp:

mikel@msi:~/repo/eos-vm/build/tools$  ./hello-driver 1 2 3
terminate called after throwing an instance of 'eosio::vm::wasm_link_exception'
  what():  wasm linked function failure
Aborted (core dumped)
@mikelik mikelik added bug Something isn't working 👍 lgtm labels May 30, 2023
@mikelik
Copy link
Member Author

mikelik commented Jun 6, 2023

@larryk85 created a workaround here: https://github.com/larryk85/examples-for-eos-vm

Basically, above functions are implemented and mapped in the example contract.
In the long term, we need to fix the above issue, so the user doesn't have to map those functions.

This issue should be solved when AntelopeIO/cdt#189 will be done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 👍 lgtm
Projects
Status: Todo
Development

No branches or pull requests

2 participants