eos icon indicating copy to clipboard operation
eos copied to clipboard

Can't find .wast or .abi file - WASM compiler error

Open danwadeloo opened this issue 9 years ago • 20 comments

Hi,

I'm stuck trying to setup local nodes and mine on the same blockchain. I get stuck at the following command to setup smart contracts: ./eosc set contract currency ../../contracts/currency/currency.wast ../../contracts/currency/currency.abi

This .wast and .abi file don't exist, and I think its because the WASM compiler wasn't properly installed and run. I've tried reinstalling WASM and restarting the blockchain, but it still doesn't work.

Anyone know how to get past this?

Thanks!

danwadeloo avatar Oct 06 '17 13:10 danwadeloo

Do you have currency.abi and currency.wast?

liderako avatar Oct 06 '17 14:10 liderako

No I don't. Could you give them to me if you have them?

danwadeloo avatar Oct 06 '17 15:10 danwadeloo

@danwadeloo it is unlikely to help

liderako avatar Oct 06 '17 15:10 liderako

send the file log.txt

cd ~/eos/build 
cmake -DBINARYEN_BIN=~/binaryen/bin -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOPENSSL_LIBRARIES=/usr/local/opt/openssl/lib .. >> log.txt
make -j2  >> log.txt

liderako avatar Oct 06 '17 15:10 liderako

log.txt

danwadeloo avatar Oct 07 '17 03:10 danwadeloo

Here is the log.txt file from running that command!

danwadeloo avatar Oct 07 '17 03:10 danwadeloo

@danwadeloo


-- No WASM compiler could be found ... (skipping building of contracts)


This can help.

echo "export BINARYEN_ROOT=~/binaryen" >> ~/.bash_profile
echo "export WASM_LLVM_CONFIG=~/wasm-compiler/llvm/bin/llvm-config" >> ~/.bash_profile
echo "export LLVM_DIR=/usr/local/Cellar/llvm/4.0.1/lib/cmake/llvm" >> ~/.bash_profile
source ~/.bash_profile

Try it now.

liderako avatar Oct 07 '17 16:10 liderako

i meet this too, in dawin-v1.0.0, MacOS Sierra(all env setup ok)

tlightsky avatar Oct 08 '17 16:10 tlightsky

@tlightsky make log.txt file

liderako avatar Oct 09 '17 10:10 liderako

@asvirido in mac, it won't recognize the env i setup. i manually write the env to the CMakeLists.txt file. it works then.

strangely i met the problem under ubuntu now, maybe could only change the CMakeLists.txt file. again

tlightsky avatar Oct 10 '17 12:10 tlightsky

maybe i should use the ./build.sh ubuntu full rather than setup env by myself

tlightsky avatar Oct 10 '17 12:10 tlightsky

@asvirido I tried running the commands you suggested, but still get the same error (.wast and .abi not found)

danwadeloo avatar Oct 11 '17 23:10 danwadeloo

Well, I get this error: File does not exist: ../../contracts/currency/currency.wast ERROR: ValidationError: wast-file=../../contracts/currency/currency.wast Create or update the contract on an account Usage: ./eosc set contract [OPTIONS] account wast-file [abi-file]

danwadeloo avatar Oct 11 '17 23:10 danwadeloo

@tlightsky
Did using this work? ./build.sh ubuntu full

danwadeloo avatar Oct 12 '17 20:10 danwadeloo

@danwadeloo not for mac(edit the file manually), yes for ubuntu

tlightsky avatar Oct 13 '17 08:10 tlightsky

@tlightsky How did you get it to work with ubuntu ? I still can't find the .wast file when I try to run a test node.

danwadeloo avatar Oct 13 '17 13:10 danwadeloo

@danwadeloo you must install those dependencies : https://github.com/EOSIO/eos#manual-installation-of-the-dependencies or it won't compile wast contract files could be done by ./build.sh ubuntu full

tlightsky avatar Oct 15 '17 11:10 tlightsky

There is definitely an issue here with the MacOS Sierra 10.12.6 automated build script.

Just like with some of the other folks here - I ran the script, etc. and I got the .abi files, but i did not get the .wast files - so the example currency contract walkthrough fails with the error that eosc can not find the .wast file

The script needs to be fixed - or the .wast files need to be made available - right? Where can I get them?

comtechnet avatar Dec 04 '17 20:12 comtechnet

I have the same problem. The .wast file does not show up. I reinstalled mutiple times.

cartmarsh avatar Dec 21 '17 11:12 cartmarsh

Update ur Xcode / which updates the pre-reqs / that fixed it for me

Dave

Sent from my iPhone

On Dec 21, 2017, at 6:11 AM, cartmarsh [email protected] wrote:

I have the same problem. The .wast file does not show up. I reinstalled mutiple times.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

comtechnet avatar Dec 21 '17 16:12 comtechnet