eos icon indicating copy to clipboard operation
eos copied to clipboard

eosiocpp error: "you must specify a file."

Open paul-mesnilgrente opened this issue 8 years ago • 9 comments

Hi everybody !

I have installed eosio through Docker. As said in the documentation, I've put these aliases:

alias runeos='docker run --rm \
--name eosio -d \
-p 8888:8888 \
-p 9876:9876 \
-v /tmp/work:/work \
-v /tmp/eosio/data:/mnt/dev/data \
-v /tmp/eosio/config:/mnt/dev/config \
eosio/eos-dev  /bin/bash -c \
"nodeos -e -p eosio \
--plugin eosio::wallet_api_plugin \
--plugin eosio::wallet_plugin \
--plugin eosio::producer_plugin \
--plugin eosio::history_plugin \
--plugin eosio::chain_api_plugin \
--plugin eosio::history_api_plugin \
--plugin eosio::http_plugin \
-d /mnt/dev/data \
--config-dir /mnt/dev/config \
--http-server-address=0.0.0.0:8888 \
--access-control-allow-origin=* \
--contracts-console"'
alias cleos='docker exec eosio /opt/eosio/bin/cleos --wallet-url http://localhost:8888'

And now, I am following the tutorial "tic tac toe" for the smart contracts. My problem is here: I have to compile tic_tac_toe.hpp into a .abi with this command: eosiocpp -g tic_tac_toe.abi tic_tac_toe.hpp. So I have set this alias: alias eosiocpp='docker exec eosio /opt/eosio/bin/eosiocpp' to have eosiocpp as a command. But the resulting output is only: You must specify a file.

I saw that the error is raised here on line 73. So I have checked my filename tic_tac_toe.hpp and it's alright. Is it because I am launching it through docker? So the third parameter is actually /opt/eosio/bin/eosiocpp in the script?

I would be happy to debug this problem but I am not very familiar with Docker.

paul-mesnilgrente avatar Jun 28 '18 16:06 paul-mesnilgrente

Can you try to compile a cpp file instead of a header file?

taokayan avatar Jul 05 '18 03:07 taokayan

Same result... I have tried directly in eos/contracts/tic_tac_toe instead of my personal files.

paul-mesnilgrente avatar Jul 05 '18 09:07 paul-mesnilgrente

It's impossible that I am the only one that is trying to compile its code using the docker image. Is there any documentation about this?

My configuration is: OS: Ubuntu 18.04 Docker: Docker version 18.03.1-ce, build 9ee9f40

paul-mesnilgrente avatar Jul 06 '18 16:07 paul-mesnilgrente

same question, can anyone tell us how to use eosiocpp command in docker?

liufuhu avatar Jul 13 '18 15:07 liufuhu

@paul-mesnilgrente did you got any solution?

vijaytabhatt avatar Jul 23 '18 09:07 vijaytabhatt

No, I've managed to compile eos with 3.87GB of RAM, that's all I can say ^^

paul-mesnilgrente avatar Jul 23 '18 11:07 paul-mesnilgrente

Use eosio/eos-dev:v1.1.1 for now.

ghost avatar Aug 12 '18 16:08 ghost

same error

Justin-ye avatar Oct 26 '18 00:10 Justin-ye

I closed this issue as it is out-of-date. The new CDT binary should free your guys from this hassle.

if not feel free to ask the same question at https://eosio.stackexchange.com

dixia avatar Oct 31 '18 07:10 dixia