Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Compilation with SMTChecker fails #2132

Open
elenadimitrova opened this issue Jun 26, 2019 · 5 comments
Open

Compilation with SMTChecker fails #2132

elenadimitrova opened this issue Jun 26, 2019 · 5 comments
Labels
Compiler error better issue indicates improvement to error messaging needs reproduced priority5 🌀

Comments

@elenadimitrova
Copy link

Issue

Compilation with SMTChecker fails with InternalCompilerError

Steps to Reproduce

  1. Build custom solc with Z3 support
    Note that installing Z3 for me wasn't exactly straight forward, so I've recorded the steps in point 1 here Add SMTChecker to nightly build JoinColony/colonyNetwork#547

  2. Switch the truffle compiler to use this

compilers: {
    solc: {
      version: "native"
    }
  }
  1. Add pragma experimental "SMTChecker"; to a single contract.
  2. Run truffle compile

Expected Behavior

Contract compiles successfully

Actual Results

$ /Users/Elena/colonyNetwork/node_modules/.bin/truffle compile

Compiling your contracts...
===========================
> Compiling ./contracts/Colony.sol
> Compiling ./contracts/ColonyFunding.sol
> Compiling ./contracts/ColonyPayment.sol
> Compiling ./contracts/ColonyStorage.sol
> Compiling ./contracts/ColonyTask.sol
> Compiling ./contracts/PatriciaTree/Data.sol
> Compiling ./contracts/PatriciaTree/IPatriciaTree.sol
> Compiling ./contracts/PatriciaTree/IPatriciaTreeBase.sol
> Compiling ./contracts/PatriciaTree/IPatriciaTreeNoHash.sol
> Compiling ./contracts/PatriciaTree/PatriciaTree.sol
> Compiling ./contracts/PatriciaTree/PatriciaTreeBase.sol
> Compiling ./contracts/PatriciaTree/PatriciaTreeNoHash.sol
> Compiling ./contracts/PatriciaTree/PatriciaTreeProofs.sol
> Compiling ./contracts/ReputationMiningCycle.sol
> Compiling ./contracts/ReputationMiningCycleRespond.sol
> Compiling ./contracts/testHelpers/FunctionsNotAvailableOnColony.sol
> Compiling ./contracts/testHelpers/NoLimitSubdomains.sol
> Compiling ./contracts/testHelpers/TaskSkillEditing.sol

InternalCompilerError:

Compilation failed. See above.
Truffle v5.0.18 (core: 5.0.18)
Node v10.13.0
error Command failed with exit code 1.

Environment

  • Operating System: OSX
  • Ethereum client: ganache-cli
  • Truffle version (truffle version): 5.0.18
  • node version (node --version): 10.12.0
  • npm version (npm --version): 6.4.1
@CruzMolina
Copy link
Contributor

CruzMolina commented Jun 26, 2019

@elenadimitrova are you able to successfully compile your contracts using the custom solc outside of truffle?

InternalCompilerError looks like a solc compiler specific error.

Edit: See item 9.

@elenadimitrova
Copy link
Author

Yes indeed. I logged it separately, see above. It'll be nice that we actually get the compiler internal output on error with truffle as reproducing it with solc itself is not always as straight forward. For example when running solc --allow-paths I have not found a way to do this sort of thing with the path truffle compile --contracts_directory 'lib/dappsys/[!note][!stop][!proxy][!thing][!token]*.sol'

@haltman-at haltman-at added the error better issue indicates improvement to error messaging label Jun 3, 2020
@fxfactorial
Copy link

Ping - has there been any update to this - would be great if it was straight forward as in truffle config the solc.version could accept something like 0.6.12+z3 or something like that

@eggplantzzz
Copy link
Contributor

I'm not sure there has been any activity on this yet. Are you saying you want to configure your own version of solc? You can indeed do that kind of thing - you can specify a path to a local solc, a docker image, whaterver solc is installed natively, or any version you can find when doing truffle compile --list. I don't know if this is helpful but here are the compiler config docs https://www.trufflesuite.com/docs/truffle/reference/configuration#solc

@fxfactorial
Copy link

ya - something like that - like so that truffle could compile with the version of solidity that was built with smt checking enabled

will check that doc -

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Compiler error better issue indicates improvement to error messaging needs reproduced priority5 🌀
Projects
None yet
Development

No branches or pull requests

6 participants