openethereum / pwasm-tutorial

A step-by-step tutorial on how to write contracts in Wasm for Kovan
GNU General Public License v3.0
229 stars 34 forks source link

build pwasm-tutorial/step-0 error #48

Open jmzhuzhonghua opened 5 years ago

jmzhuzhonghua commented 5 years ago

I went to pwasm-tutorial/step-0, and run ./build.sh. But there is error as followings:

jm02@jm02:~/project/pwasm-tutorial/step-0$ ./build.sh Finished release [optimized] target(s) in 0.02s Build error: Packing failed due to module structure error: No exported deploy symbol. Sure used correct libraries for building contracts? jm02@jm02:~/project/pwasm-tutorial/step-0$

Noah-Vincenz commented 5 years ago

running

'cargo build --release --target wasm32-unknown-unknown'

and then

'wasm-build --target=wasm32-unknown-unknown --skip-optimization ./target pwasm_tutorial_contract'

instead of ./build.sh solved the problem for me!

Noah-Vincenz commented 5 years ago

running

'cargo build --release --target wasm32-unknown-unknown'

and then

'wasm-build --target=wasm32-unknown-unknown --skip-optimization ./target pwasm_tutorial_contract'

instead of ./build.sh solved the problem for me!

The above method resulted in some limitations. I have now finally managed to resolve the issue by downgrading pwasm-utils-cli version from 0.7.0 to 0.6.0.