Haskell Stack Ports on Apple Silicon

Ken Cunningham ken.cunningham.webuse at gmail.com
Fri Aug 13 16:04:36 UTC 2021


I don't think it's overly simple to guess what might actually happen, or
work.

You have to try it various ways, and as Ryan says, I guess also try it when
pandoc is pulled in as a dependency rather than directly installed, and see.

The automatic fallback to other supported arches (eg arm64 -> x86_64) part
of macports base remains opaque to me  and I would suspect many. I guess I
should go find and read the relevant TCL to see what it is trying to do and
how.

K

On Fri, Aug 13, 2021 at 8:58 AM Steven Smith <steve.t.smith at gmail.com>
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?
>
>
> On Aug 13, 2021, at 09:21, Ryan Schmidt <ryandesign at macports.org> wrote:
>
> The stack port's +prebuilt variant installs a prebuilt binary of a
> particular architecture or architectures. In that variant, the port must
> declare using supported_archs what the architectures of that prebuilt
> binary are.
>
>
> On Aug 13, 2021, at 07:59, Christopher Jones <jonesc at hep.phy.cam.ac.uk>
> wrote:
>
>
>
> That line is indeed limiting support to intel machines. If it works on arm
> add that to the list, or probably better just remove it and rely on the
> defaults.
>
>
> Chris
>
>
> On 13 Aug 2021, at 1:55 pm, Steven Smith <steve.t.smith at gmail.com> wrote:
>
>
> Is this line in the stack Portfile the issue? Ports (like pandoc) that are
> built using stack depend on the stack port, and port stack says that x86_64
> is supported, but not arm64. However, stack installs and runs just fine on
> an M1 box.
>
>
> supported_archs     x86_64
>
>
>
> https://github.com/macports/macports-ports/blob/4cccce94528cf34ba0ac86ee26d8f33b43351214/lang/stack/Portfile#L31
>
>
>
> On Aug 13, 2021, at 5:27 AM, Ryan Schmidt <ryandesign at macports.org> wrote:
>
>
> As far as I could tell, this applies to individual ports, but not to a
> port's dependencies. See:
>
>
> https://trac.macports.org/ticket/63092
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20210813/1ee4de54/attachment.htm>


More information about the macports-dev mailing list