Contract sample "currency" not found
I didn't find currency.wast in contract directory. As a result:
Docker leonid$ ./eosc.sh set contract currency ../../contracts/currency/currency.wast ../../contracts/currency/currency.abi
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]
Did you follow the instructions about building the WASM build target and providing WASM_LLVM_CONFIG?
If you did not then you need to follow those directions and recompile to be able to use the currency contract.
If you did, when you run cmake, do you see output like:
Using WASM clang => .... Using WASM llc => .... Using WASM llvm-link => ....
or do you see: No WASM compiler could be found ... (skipping building of contracts)
On Wed, Sep 20, 2017 at 10:53 AM, 0x83043 [email protected] wrote:
I didn't find currency.wast in contract directory. As a result:
Docker leonid$ ./eosc.sh set contract currency ../../contracts/currency/currency.wast ../../contracts/currency/currency.abi 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]
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/EOSIO/eos/issues/479, or mute the thread https://github.com/notifications/unsubscribe-auth/AJy1Wy2WauJFDbtrdND8ffkOAqHbEDvzks5skTT0gaJpZM4PeF6E .
I assembled eos in docker by dockerfile.
from previous building log
...
-- Using WASM clang => /opt/wasm/bin/clang
-- Using WASM llc => /opt/wasm/bin/llc
-- Using WASM llvm-link => /opt/wasm/bin/llvm-link
...
from rebuilding log
...
Step 9/19 : RUN cd /tmp && mkdir wasm-compiler && cd wasm-compiler && git clone --depth 1 --single-branch --branch release_40 https://github.com/llvm-mirror/llvm.git && cd llvm/tools && git clone --depth 1 --single-branch --branch release_40 https://github.com/llvm-mirror/clang.git && cd .. && mkdir build && cd build && cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/opt/wasm -DLLVM_TARGETS_TO_BUILD= -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly -DCMAKE_BUILD_TYPE=Release ../ && make install && rm -rf /tmp/wasm-compiler
---> Using cache
---> 1817f9c6100a
Step 10/19 : RUN cd /tmp && wget https://github.com/WebAssembly/binaryen/archive/1.37.21.tar.gz && tar zxf 1.37.21.tar.gz && cd binaryen-1.37.21 && cmake . && make && mkdir /opt/binaryen && mv /tmp/binaryen-1.37.21/bin /opt/binaryen && ln -s /opt/binaryen/bin/* /usr/local && rm -rf /tmp/*
---> Using cache
---> 16d8e16d7608
Step 11/19 : RUN mkdir -p /opt/eos/bin/data-dir && mkdir -p /tmp/eos/build/
---> Using cache
---> 775ee56be832
Step 12/19 : COPY . /tmp/eos/
---> Using cache
---> 5c365c3021d1
Step 13/19 : RUN cd /tmp/eos/build && cmake -DWASM_LLVM_CONFIG=/opt/wasm/bin/llvm-config -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_INSTALL_PREFIX=/opt/eos ../ && make && make install && mv ../contracts / && ln -s /opt/eos/bin/eos* /usr/local/bin && rm -rf /tmp/eos*
...
UPDATE
I have found error in Dockerfile:
&& make && make install && mv ../contracts / ->&& make && make install && mv contracts /
I confirm the same issue when using docker. The wast files are not copied to /data/store/eos folder. This needs a fix.
In the interim can you run build.sh in eos folder and copy the generated wast files to /data/store/eos/contracts/currency folder?
Contract folder didn't copy from /tmp/eos/build but copied from src /tmp/eos while assemble image. I fixed it and rebuilt image, it's ok.
For reference for people who also encounter this problem
After the Dockerfile is fixed, the wast and abi can be found inside /opt/eos/bin/data-dir/contracts/currency/
./eosc.sh set contract /opt/eos/bin/data-dir/contracts/currency/currency.wast /opt/eos/bin/data-dir/contracts/currency/currency.abi
meet this in dawn-v1.0.0 too, thanks for the pr