trufflesuite / truffle

:warning: The Truffle Suite is being sunset. For information on ongoing support, migration options and FAQs, visit the Consensys blog. Thank you for all the support over the years.
https://consensys.io/blog/consensys-announces-the-sunset-of-truffle-and-ganache-and-new-hardhat?utm_source=github&utm_medium=referral&utm_campaign=2023_Sep_truffle-sunset-2023_announcement_
MIT License
14.02k stars 2.32k forks source link

What does "abort(5) at Error" mean? #473

Closed JustinDrake closed 7 years ago

JustinDrake commented 7 years ago

I am new to Truffle. I have tried posting this question (and another) to Gitter but didn't get an answer. My contract is not compiling. I am trying to decipher the output:

Justins-MacBook-Pro:learnTruffle justin$ truffle compile -s ASSERTIONS=1
Compiling ./contracts/Escrow.sol...
5
5

/usr/local/lib/node_modules/truffle/node_modules/solc/wrapper.js:48
        throw e;
        ^
abort(5) at Error
    at jsStackTrace (/usr/local/lib/node_modules/truffle/node_modules/solc/soljson.js:1:19718)
    at stackTrace (/usr/local/lib/node_modules/truffle/node_modules/solc/soljson.js:1:19901)
    at abort (/usr/local/lib/node_modules/truffle/node_modules/solc/soljson.js:19:15285)
    at Array.dXb (/usr/local/lib/node_modules/truffle/node_modules/solc/soljson.js:11:585101)
    at Array.tX (/usr/local/lib/node_modules/truffle/node_modules/solc/soljson.js:8:557453)
    at Array.eea (/usr/local/lib/node_modules/truffle/node_modules/solc/soljson.js:6:495332)
    at Object.wOb [as dynCall_ii] (/usr/local/lib/node_modules/truffle/node_modules/solc/soljson.js:11:540050)
    at invoke_ii (/usr/local/lib/node_modules/truffle/node_modules/solc/soljson.js:1:1275129)
    at Array.ixa (/usr/local/lib/node_modules/truffle/node_modules/solc/soljson.js:7:494308)
    at Object.bVb [as dynCall_viii] (/usr/local/lib/node_modules/truffle/node_modules/solc/soljson.js:11:577232)
If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.

I have done as suggested and used the -s ASSERTIONS=1 option, but this does not seem to change anything. What does "abort(5) at Error" mean?

vacavaca commented 7 years ago

You probably forgot a semicolon somewhere, the error message is really confusing.

tcoulter commented 7 years ago

This means you have a solidity syntax error somewhere.

Unfortunately, the confusing error message comes from the most recent version of solidity. I've filed an issue here. It should be fixed in the next release.

macbem commented 6 years ago

Are you guys sure that this comes from a Solidity syntax error? I have this error while compiling OpenZeppelin's ERC20 StandardToken contract, which is highly unlikely to contain any syntax errors.

tiennm-ibl commented 5 years ago

solc version error, I changed the solc version in truffle-config file which is corresponding to the smart contract version.. it works!