foundry: forge build result in generic "Solc Error:"
Component
Forge
Have you ensured that all of these are up to date?
- Foundry
- Foundryup
What version of Foundry are you on?
forge 0.2.0 (6cd6618 2022-08-11T00:05:44.416299Z)
What command(s) is the bug in?
forge build
Operating System
macOS (Apple Silicon M1)
Describe the bug
When I try to build and test the project, I get the following error
[⠊] Compiling...
[⠰] installing solc version "0.8.15"
[⠒] Successfully installed solc 0.8.15
Error:
Solc Error:
I’m pretty sure it was working correctly yesterday
Update 1: something to note is that solc 0.8.15 as far as I know is already installed, so it should just directly compile without downloading and installing
Update 2: if I switch all the contracts to pragma solidity 0.8.13; it does compile. And it does not try to download+install solc 0.8.13. With pragma solidity 0.8.15; it tries to do so even if I should have already installed.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 20 (4 by maintainers)
first two points
nuke the ~/.svm/* folder install z3 from brew
should be sufficient, since we handle installs directly via forge,
I think what probably happened here is that we recently added z3 to the apple silicon builds so checksums differ now
right, we now ship with z3 solver. need to document this, thanks, on the book, https://github.com/foundry-rs/book/issues/515
closing this here
I met this error because I used an 4G memory server, the memory is not enough to compile my all contracts, so, when I update a new 8G memory server, the problem is sloved …
awesome, thanks for flagging, will add some troubleshooting docs for M1
this could be related to the recent 0.8.16 we added.
could you please nuke the
~/.svm/*folder, that’s where we install all solc versions and try again?