ethereum / fe

Emerging smart contract language for the Ethereum blockchain.
https://fe-lang.org
Other
1.61k stars 186 forks source link

Can't run Fe language on M2 MacOS Ventura: bad CPU type in executable #959

Closed 0xferit closed 11 months ago

0xferit commented 11 months ago

I tried installing Fe lang on M2 MacOS Ventura through Homebrew and by downloading the executable but both installation options ended up with me seeing the following error.

zsh: bad CPU type in executable: fe

The following output is from Homebrew.

ferit@mba ~ % brew install fe
==> Downloading https://formulae.brew.sh/api/formula.jws.json ################################################################################################################# 100.0% ==> Downloading https://formulae.brew.sh/api/cask.jws.json ################################################################################################################# 100.0% ==> Fetching fe-lang/tap/fe ==> Downloading https://github.com/ethereum/fe/releases/download/v0.26.0/fe_mac Already downloaded: /Users/ferit/Library/Caches/Homebrew/downloads/955dc269fece2b4f6db697546ef9614b43382239cdc0a351414449104a3927a5--fe_mac ==> Installing fe from fe-lang/tap šŸŗ /opt/homebrew/Cellar/fe/0.26.0: 3 files, 22.0MB, built in 2 seconds ==> Running brew cleanup fe... Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP. Hide these hints with HOMEBREW_NO_ENV_HINTS (see man brew). ferit@mba ~ %

Any ideas about what's happening here? Perhaps M2 chips are unsupported?

Also asked here.

sbillig commented 11 months ago

@0xferit You probably need to install Rosetta 2, Appleā€™s x86-to-ARM translation layer. Weā€™re currently only building Fe on x86, because thatā€™s all GitHub CI supports. It should work fine on M1/M2 macs if Rosetta is installed however.

/usr/sbin/softwareupdate --install-rosetta --agree-to-license

0xferit commented 11 months ago

Thanks @sbillig this solves the problem!