hyperledger-web3j / web3j-maven-plugin

web3j Maven plugin
Apache License 2.0
117 stars 83 forks source link

trying to use your generator : problem of solidity compiler version #5

Closed flefevre closed 7 years ago

flefevre commented 7 years ago

Dear web3j-maven-plugin developer, I have tried to use your maven plugin. I am encountering one error:

[ERROR] Failed to execute goal org.web3j:web3j-maven-plugin:0.1.2:generate-sources (default) on project cf-smartcontracts: Could not compile solidity files [ERROR] :1:1: Error: Source file requires different compiler version (current compiler is 0.4.8+commit.60cc1668.Linux.g++ - note that nightly builds are considered to be strictly less than the released version [ERROR] pragma solidity ^0.4.17; [ERROR] ^----------------------^ [ERROR] :109:9: Error: Undeclared identifier. [ERROR] require(stakeholderList[supplierID].isRegistered == true); <<<

I am under Linux centOS 7 I have adapted my PATH to go to the solc-static-linux file

solc --version solc, the solidity compiler commandline interface Version: 0.4.18+commit.9cf6e910.Linux.g++

How your plugin is finding the solc compiler ? Thanks for your help. Francois

h2mch commented 7 years ago

SolC is taken from the "org.ethereum" "solcJ-all" library. this is extracted automatically into the java tmp folder and the maven plugin takes the version of this temp folder. So you have to stick to the solc version, which is provided by org.ethereum.solcJ-all library.

Within the next few days, I plan to update the code to the newest version. Moreover I try to take the solc version which is in the system path first.

conor10 commented 7 years ago

👍for going with system path first

flefevre commented 7 years ago

Yes +1 for system path

I have proposed a patch to integrate solar 0.14.0 in solcj-all

François

Le 31 oct. 2017 9:12 AM, "Conor Svensson" notifications@github.com a écrit :

👍for going with system path first

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/web3j/web3j-maven-plugin/issues/5#issuecomment-340689924, or mute the thread https://github.com/notifications/unsubscribe-auth/AFWYlPRKgl9OmMBiCS_-7takHICvJfadks5sxtZ_gaJpZM4QHcAw .

h2mch commented 7 years ago

Version 0.1.3 is released. It support solc installed on system path and web3j version 3.0.1