4

We are compile the eosio.contract v1.2.0 using Clion by following that:

Dependencies:
eosio v1.1.2
eosio.wasmsdk v1.1.0

Cannot get compiler information:
Compiler exited with error code 1: /usr/local/eosio.wasmsdk/bin/eosio-cpp -xc++ -I/include -I/Users/mac/Desktop/b1/smart_contract/eosio.contracts/eosio.msig/include -O3 -I/usr/local/include -O3 -DNDEBUG -fpch-preprocess -v -dD -E
eosio-cpp: Unknown command line argument '-xc++'.  Try: '/usr/local/eosio.wasmsdk/bin/eosio-cpp -help'
eosio-cpp: Did you mean '-c'?
eosio-cpp: Unknown command line argument '-fpch-preprocess'.  Try: '/usr/local/eosio.wasmsdk/bin/eosio-cpp -help'
eosio-cpp: Did you mean '-fno-post-pass'?


Compiler exited with error code 1: /usr/local/eosio.wasmsdk/bin/eosio-cpp -xc++ -I/include -I/Users/mac/Desktop/b1/smart_contract/eosio.contracts/eosio.sudo/include -O3 -I/usr/local/include -O3 -DNDEBUG -fpch-preprocess -v -dD -E
eosio-cpp: Unknown command line argument '-xc++'.  Try: '/usr/local/eosio.wasmsdk/bin/eosio-cpp -help'
eosio-cpp: Did you mean '-c'?
eosio-cpp: Unknown command line argument '-fpch-preprocess'.  Try: '/usr/local/eosio.wasmsdk/bin/eosio-cpp -help'
eosio-cpp: Did you mean '-fno-post-pass'?


Compiler exited with error code 1: /usr/local/eosio.wasmsdk/bin/eosio-cpp -xc++ -I/include -I/Users/mac/Desktop/b1/smart_contract/eosio.contracts/eosio.system/include -I/Users/mac/Desktop/b1/smart_contract/eosio.contracts/eosio.system/../eosio.token/include -O3 -I/usr/local/include -O3 -DNDEBUG -fpch-preprocess -v -dD -E
eosio-cpp: Unknown command line argument '-xc++'.  Try: '/usr/local/eosio.wasmsdk/bin/eosio-cpp -help'
eosio-cpp: Did you mean '-c'?
eosio-cpp: Unknown command line argument '-fpch-preprocess'.  Try: '/usr/local/eosio.wasmsdk/bin/eosio-cpp -help'
eosio-cpp: Did you mean '-fno-post-pass'?


Compiler exited with error code 1: /usr/local/eosio.wasmsdk/bin/eosio-cpp -xc++ -I/include -I/Users/mac/Desktop/b1/smart_contract/eosio.contracts/eosio.token/include -O3 -I/usr/local/include -O3 -DNDEBUG -fpch-preprocess -v -dD -E
eosio-cpp: Unknown command line argument '-xc++'.  Try: '/usr/local/eosio.wasmsdk/bin/eosio-cpp -help'
eosio-cpp: Did you mean '-c'?
eosio-cpp: Unknown command line argument '-fpch-preprocess'.  Try: '/usr/local/eosio.wasmsdk/bin/eosio-cpp -help'
eosio-cpp: Did you mean '-fno-post-pass'?

The CMake Options that I am using to execute is: -G Ninja -DLLVM_DIR=/usr/local/Cellar/llvm@4/4.0.1/lib/cmake -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DWASM_ROOT=/usr/local/wasm -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DBUILD_MONGO_DB_PLUGIN=true -DENABLE_COVERAGE_TESTING=false -DBUILD_DOXYGEN=false

  • What's the exact command you use to invoke cmake? – James Moore Aug 11 '18 at 19:13
  • Thanks James for reminding, I have added in the question – Sheldon Aug 12 '18 at 0:51
0

I think there are two things going on:

  1. I've run into problems with Ninja and eosio.wasmsdk. Give make a shot instead of ninja.

  2. Those options look like they're for compiling the compiler, not for compiling a smart contract. Can you build something like the exchange example (https://github.com/EOSIO/eosio.wasmsdk/tree/master/examples/exchange) without those extra cmake options?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.