tokenika / eosfactory

Python-based EOS smart-contract development & testing framework
http://eosfactory.io/
Other
243 stars 62 forks source link

fatal error: 'eosiolib/eosio.hpp' file not found #47

Closed ricktobacco closed 5 years ago

ricktobacco commented 6 years ago

This occurs when I attempt python3 tests/01_hello_world.py

The output of my eval $eosf get config is { "EOSIO_SOURCE_DIR": "../eos", "EOSIO_EOSFACTORY_DIR": "/home/ricardo/Documents/eosfactory", "EOSIO_DATA_DIR": "/home/ricardo/Documents/eosfactory/build/daemon/data-dir/", "EOSIO_CONFIG_DIR": "/home/ricardo/Documents/eosfactory/build/daemon/data-dir/", "KEOSD_WALLET_DIR": "${HOME}/eosio-wallet/", "nodeExe": "../eos/build/programs/nodeos/nodeos", "cleosExe": "../eos/build/programs/cleos/cleos", "genesisJson": "/home/ricardo/Documents/eosfactory/build/daemon/data-dir/genesis.json", "EOSIO_DAEMON_ADDRESS": "127.0.0.1:8888", "EOSIO_KEY_PRIVATE":"5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3", "EOSIO_KEY_PUBLIC":"EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV", "EOSIO_WALLET_ADDRESS": "127.0.0.1:8888", "EOSIO_DAEMON_NAME": "nodeos", "EOSIO_WASM_CLANG": "/home/ricardo/opt/wasm/bin/clang", "EOSIO_BOOST_INCLUDE_DIR": "/home/ricardo/opt/boost/include", "EOSIO_WASM_LLVM_LINK": "/home/ricardo/opt/wasm/bin/llvm-link", "EOSIO_WASM_LLC": "/home/ricardo/opt/wasm/bin/llc", "EOSIO_S2WASM": "/usr/local/bin/eosio-s2wasm", "EOSIO_WAST2WASM": "/usr/local/bin/eosio-wast2wasm", "sharedMemory": "200", "contractWorkspace": "/home/ricardo/Documents/contracts/", "workspaceEosio": "../eos/build/contracts/" }

jakub-zarembinski commented 6 years ago

Hi, have you installed EOSIO after building it?

If not, you need to do it like this:

sudo ./eosio_install.sh

Please let me know if it helped.

ricktobacco commented 6 years ago

Yes I have done that.

jakub-zarembinski commented 6 years ago

Mine looks like this:

#  {
#      "EOSIO_SOURCE_DIR": "/mnt/x/Workspaces/EOS/eos",
#      "EOSIO_EOSFACTORY_DIR": "/mnt/x/Workspaces/EOS/eosfactory",
#      "EOSIO_DATA_DIR": "/mnt/x/Workspaces/EOS/eosfactory/build/daemon/data-dir/",
#      "EOSIO_CONFIG_DIR": "/mnt/x/Workspaces/EOS/eosfactory/build/daemon/data-dir/",
#      "KEOSD_WALLET_DIR": "${HOME}/eosio-wallet/",
#      "nodeExe": "/mnt/x/Workspaces/EOS/eos/build/programs/nodeos/nodeos",
#      "cleosExe": "/mnt/x/Workspaces/EOS/eos/build/programs/cleos/cleos",
#      "genesisJson": "/mnt/x/Workspaces/EOS/eosfactory/build/daemon/data-dir/genesis.json",
#      "EOSIO_DAEMON_ADDRESS": "127.0.0.1:8888",
#      "EOSIO_KEY_PRIVATE": "5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3",
#      "EOSIO_KEY_PUBLIC": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
#      "EOSIO_WALLET_ADDRESS": "127.0.0.1:8888",
#      "EOSIO_DAEMON_NAME": "nodeos",
#      "EOSIO_WASM_CLANG": "/home/sygnet/opt/wasm/bin/clang",
#      "EOSIO_BOOST_INCLUDE_DIR": "/home/sygnet/opt/boost/include",
#      "EOSIO_WASM_LLVM_LINK": "/home/sygnet/opt/wasm/bin/llvm-link",
#      "EOSIO_WASM_LLC": "/home/sygnet/opt/wasm/bin/llc",
#      "EOSIO_S2WASM": "/usr/local/bin/eosio-s2wasm",
#      "EOSIO_WAST2WASM": "/usr/local/bin/eosio-wast2wasm",
#      "sharedMemory": "200",
#      "contractWorkspace": "/mnt/x/Workspaces/EOS/contracts",
#      "workspaceEosio": "/mnt/x/Workspaces/EOS/eos/build/contracts/"
#  }

Some of your paths seem to be relative, instead of absolute, e.g.

"EOSIO_SOURCE_DIR": "../eos",
"nodeExe": "../eos/build/programs/nodeos/nodeos",
"cleosExe": "../eos/build/programs/cleos/cleos",

Please let me know the content of your ~/.profile file (or source ~/.bash_profile if you are on a MacOS). I mean the bottom part where EOSFactory paths are defined, run nano ~/.profile (or nano ~/.bash_profile if you are on a MacOS)

Mine looks like this:

export EOSIO_SOURCE_DIR=/mnt/x/Workspaces/EOS/eos
export EOSIO_EOSFACTORY_DIR=/mnt/x/Workspaces/EOS/eosfactory
export U_HOME=/home/sygnet
export eosf=/mnt/x/Workspaces/EOS/eosfactory/teos/build/teos/teos
export EOSIO_CONTRACT_WORKSPACE=/mnt/x/Workspaces/EOS/contracts
export PYTHONPATH=/mnt/x/Workspaces/EOS/eosfactory/pyteos:/mnt/x/Workspaces/EOS/eosfactory/tests:

If you have relative paths there, try to remove all those export statements and reinstall EOSFactory by running:

./build.sh -e /mnt/d/Workspaces/EOS/eos -w /mnt/d/Workspaces/EOS/contracts

Of course change the paths to fit your configuration and make sure to use absolute paths. I'm assuming here that your problems are caused by using relative paths during EOSFactory installation.

When EOSFactory is reinstalled make sure to run source ~/.profile (or source ~/.bash_profile if you are on a MacOS).

Let me know if it helped.

ricktobacco commented 5 years ago

Thank you so much, yes the issue was the relative path I had for "nodeExe" and "cleosExe". I should probably open a new issue for this, and I am sorry but I really need to figure out all the steps for how to run on Jungle with EOSFactory. I saw that you omitted some detail in your summary...

"To complete the process, use the suggested account name and public keys (ignore the private keys) to register a new account on a public testnet. This account will serve as a master account for the EOSFactory testnet object.

NOTE: Make sure to use the testnet’s faucet to fund the newly created account with enough liquid EOS to be able to spawn other accounts, delegate CPU & NET and buy RAM for them.

When you are ready, type go to let the script verify that the newly created account has been registered properly with the testnet. Once this is done, the script proceeds to register the testnet with EOSFactory."

I'm sorry, but would it be possible to be a bit more verbose in your tutorial?

jakub-zarembinski commented 5 years ago

To register an account on the Jungle testnet, you need to come up with an account name and and two public keys. EOSFactory gives you those, so that you can copy them into the Create Account form on the Jungle website.

Next, you need to fund the newly created account using the Faucet form on the Jungle website.

Next, switch back to EOSFactory, type go to finish the proces and let EOSFactory verify that the new account was successfully registered on the testnet.

Feel free to ask any further questions.