compiler icon indicating copy to clipboard operation
compiler copied to clipboard

Provide a 0.19.1 binary for linux_arm64 to be used in containers on Apple Silicon (M1)

Open jsynacek opened this issue 3 years ago • 8 comments

Quick Summary: Please, provide a binary that can be used in a linux container running on an Apple Silicon (arm64) host.

Currently, the binary asset binary-for-linux-64-bit.gz is usable, but it's really slow and can't be used if elm is specified as a project dependency:

<inside the container>

$ which elm
/usr/local/bin/elm

$ npm run build
...
npm ERR! command sh -c node install.js
npm ERR! -- ERROR -----------------------------------------------------------------------
npm ERR! 
npm ERR! I am detecting that your computer (linux_arm64) may not be compatible with any
npm ERR! of the official pre-built binaries.
npm ERR! 
npm ERR! I recommend against using the npm installer for your situation. Check out the
npm ERR! alternative installers at https://github.com/elm/compiler/releases/tag/0.19.1
npm ERR! to see if there is something that will work better for you.
npm ERR! 
npm ERR! From there I recommend asking for guidance on Slack or Discourse to find someone
npm ERR! who can help with your specific situation.
npm ERR! 
npm ERR! --------------------------------------------------------------------------------

SSCCE

  • Elm: 0.19.1
  • Browser: N/A
  • Operating System: MacOS arm64 + Ubuntu 20.04 container

Additional Details

See also https://github.com/elm/compiler/pull/2234.

jsynacek avatar Oct 26 '22 12:10 jsynacek

Thanks for reporting this! To set expectations:

  • Issues are reviewed in batches, so it can take some time to get a response.
  • Ask questions in a community forum. You will get an answer quicker that way!
  • If you experience something similar, open a new issue. We like duplicates.

Finally, please be patient with the core team. They are trying their best with limited resources.

github-actions[bot] avatar Oct 26 '22 12:10 github-actions[bot]

I just tried to compile the project using docker on a Debian arm64 VM (M1 MacBook) with no luck. I am not familiar with Haskell so I wasn't able to do more

alshdavid avatar Nov 03 '22 06:11 alshdavid

Have you tried installing via nix? That has worked for me on arm64 (pinebook) but not specifically an M1.

bburdette avatar Nov 03 '22 19:11 bburdette

@jsynacek if you've not seen it already, I built linux_arm64 binaries and Simon has made them available with @lydell/elm: https://github.com/elm/compiler/pull/2287

supermario avatar Aug 25 '23 09:08 supermario

Any updates to this? :)

alshdavid avatar Oct 02 '23 14:10 alshdavid

@alshdavid you can find linux-arm64 binaries here: https://github.com/lydell/compiler/releases/tag/0.19.1

supermario avatar Oct 02 '23 19:10 supermario

Is there a way to tell the install script for the elm package not to download the binaries?

https://github.com/elm/compiler/blob/master/installers/npm/download.js#L27

It seems npm install elm will fail when running on Linux arm, even if the binaries are supplied externally, because the script will fail to match the permitted platforms.

alshdavid avatar Oct 03 '23 03:10 alshdavid

@alshdavid If you go to https://github.com/elm/compiler/pull/2287 and scroll to the end of the PR description and expand “Aside about unsupported platforms” you can see how the discussion went about that.

lydell avatar Oct 03 '23 05:10 lydell