slither icon indicating copy to clipboard operation
slither copied to clipboard

[Bug-Candidate]: `ERROR:Slither-simil:Compilation failed for C.sol using solc-0.4.25`

Open iirekm opened this issue 11 months ago • 1 comments

Describe the issue:

I'm even unable to run the tutorial from https://github.com/crytic/slither/wiki/Code-Similarity-detector, I'm getting ERROR:Slither-simil:Compilation failed for C.sol using solc-0.4.25 And no further information, I can't even find in slither a switch to enable verbose mode. When I manually run SOLC_VERSION=0.4.25 solc C.sol - it works.

Code example to reproduce the issue:

Version:

0.10.4

Relevant log output:

No response

iirekm avatar Jan 05 '25 09:01 iirekm

Hi! Do you have a binary called solc-0.4.25 on your system and in PATH? The --solc flag takes a path to the solc compiler.

I'm assuming you wanted to run this from the tutorial:

slither-simil test etherscan_verified_contracts.bin --filename MetaCoin.sol --fname MetaCoin.sendCoin --input cache.npz --ntop 25 --solc solc-0.4.25

As it sounds like you're using solc-select you probably would need to drop the --solc flag (it defaults to just solc) and then have SOLC_VERSION=0.4.25 on the environment or run solc-select use 0.4.25 beforehand

elopez avatar Jan 06 '25 08:01 elopez