Haskell Stack Ports on Apple Silicon

Joshua Root jmr at macports.org
Sat Aug 14 23:26:53 UTC 2021


On 2021-8-15 05:43 , Ken Cunningham wrote:
> You could override it, in pandoc or in the PortGroup:
> 
> depends_skip_archcheck-append stack

What architecture is the pandoc binary you end up with though? It seems 
unlikely that an x86_64 stack would generate an arm64 binary, and if it 
generates an x86_64 binary, calling it arm64 is wrong.

The situation with arm64 and x86_64 is almost the same as x86_64 and 
i386 on earlier systems. Suppose port A depends on port B and B sets a 
supported_archs that doesn't include $new_arch. If A uses B in such a 
way that its architecture matters, like if A's executable links with B's 
library, then A usually needs to set the same supported_archs as B. This 
is because you can't mix archs in an executable. (Yes, universal 
binaries exist, but only the slice for one architecture can actually be 
loaded into a given process.)

- Josh


More information about the macports-dev mailing list