Haskell Stack Ports on Apple Silicon

Ryan Schmidt ryandesign at macports.org
Sat Aug 14 04:48:35 UTC 2021


On Aug 13, 2021, at 10:58, Steven Smith wrote:
> 
> If the Macports-compiled stack runs on arm64, then the prebuilt download will too.
> 
> The issue as far as I can tell from the internet is that stack will generate x86_64 binaries, even if running on an M1. https://www.haskell.org/ghc/blog/20200515-ghc-on-arm.html
> 
> These x86_64 binaries should run on an M1.
> 
> If so, is the best approach to remove the supported_archs line from the stack Portfile, or add arm64?
> 

The supported_archs line must accurately convey the set of architectures for which this port can be installed (i.e. the actual architectures of the files that get installed by the port), so that MacPorts can accurately record the architecture for which the port was installed in the registry. If the port installs only an x86_64 binary, then it must set supported_archs x86_64. (That was the case when this port was created and why the port did this at the time.) The fact that x86_64 binaries can run on Apple Silicon via Rosetta 2 is not relevant; MacPorts base already knows this and allows the port to be installed on Apple Silicon even when it says supported_archs x86_64.


More information about the macports-dev mailing list