Replies: 1 comment
-
Thank for this heads-up @MihaiHng |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am leaving here the solution to this failure, maybe it will save time when you get to this lesson.
Means you’re trying to run a x86 (Intel) build of solc on your Apple Silicon.
The issue is Apple Silicon + old Solidity versions.
Solc pre-0.8.24 on macOS is Intel-only. On Apple Silicon, trying to run 0.7.6 gives the “Bad CPU type” error.
Solidity compiler binaries before 0.8.24 (like 0.7.6) are Intel-only builds.
This explains the forge build failure.
✅ Solution:
By installing Rosetta 2, macOS can now run Intel-only binaries on Apple Silicon.
softwareupdate --install-rosetta --agree-to-license
brew unlink solidity
brew install
solc-select
solc-select install 0.7.6
solc-select use 0.7.6
solc --version
should print 0.7.6
forge clean
forge build
Beta Was this translation helpful? Give feedback.
All reactions