--solc solc7.6 not found?

certoraRun BankLesson1/Bank.sol:Bank --verify Bank:BankLesson1/IntegrityOfDeposit.spec
–solc solc7.6
–rule integrityOfDeposit
–msg “$1”

gives

argparse.ArgumentTypeError: Solidity executable solc7.6 not found in path

Any idea how to fix? Thanks

2 Likes

The error seem to state that your solc7.6 compiler is not in your $PATH.
Try following the Certora Prover installation here.

Specifically to address your error make sure that you downloaded the relevant solc version to your local pc (you can find it here), and added the folder containing all your solc files to your PATH (step4 in the installation guide).
Make sure to gather all solc files into the same folder that you inserted to the PATH.

Note that you should download the solc file that is compatible with your OS. You do not need to download the zip file (see image).

Another thing that might help is to run chmod +x on the solc folder/files. It might just be the case that the folder does not have execute permissions.

Try those solutions and tell us if and which of them worked for you.
Cheers

Update:
I need to clarify that the --solc <value> flag expect the name of your solidity compiler, i.e. the is the name of your specified compiler. In the image above the name of the downloaded compiler for linux OS is “solc-static-linux”.
We tend to change the name of each compiler we download to “solcX.x”, e.g. solc7.6 which is informative and is exactly what the example shell script shows.

Hope that now this is clearer.

I had the same error. Changing to

> –solc solc-0.7.6

worked for me. This is how solc-select saves compilers on my machine.

Maybe i should’ve clarified that the --solc <value> flag expect the name of your solidity compiler, i.e. the is the name of your specified compiler. In the image above the name of the downloaded compiler for linux OS is “solc-static-linux”.
We tend to change the name of each compiler we download to “solcX.x”, e.g. solc7.6 which is informative and is exactly what the example shell script shows.

Hope that now this is clearer.

I use solc-select tool to install and manage solidity compilers. Just in case you need it for a script that runs multiple tests.

solc-select use 0.7.6

certoraRun ../BankLesson1/Bank.sol:Bank --verify Bank:../BankLesson1/IntegrityOfDeposit.spec \
  --rule integrityOfDeposit \
  --msg "$1"
2 Likes

@mehul This works. Thanks.