compiler icon indicating copy to clipboard operation
compiler copied to clipboard

Cross-platform Docker setup fails on M1 mac while setting up elm using using npm install

Open basghar opened this issue 4 years ago • 6 comments

Quick Summary: We use docker in order to support multi-platform dev environment. On M1 macs, npm install -g elm fails because there is no pre-build binary for linux_arm64. We want to avoid having different docker for different platform.

This is use-case for #2007

> node install.js

-- ERROR -----------------------------------------------------------------------

I am detecting that your computer (linux_arm64) may not be compatible with any
of the official pre-built binaries.

I recommend against using the npm installer for your situation. Check out the
alternative installers at https://github.com/elm/compiler/releases/tag/0.19.1
to see if there is something that will work better for you.

From there I recommend asking for guidance on Slack or Discourse to find someone
who can help with your specific situation.

--------------------------------------------------------------------------------
  • Elm: 0.19.1
  • Browser: N/A
  • Operating System: Docker on M1 Mac using arm64 linux.

Additional Details

None

basghar avatar Nov 07 '21 14:11 basghar

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 Nov 07 '21 14:11 github-actions[bot]

Just ran into this same issue.

A workaround I found is to specify v0.19.1-4, which has a commit that added support for ARM (for macOS Silicon). It also added support for linux_arm64 as a byproduct of this.

The current release, one patch version higher at v0.19.1-5 includes a commit that continues to support apple_arm64 but inadvertently drops support for linux_arm64 (which is what Docker uses on hosts that are Apple Silicon, i.e. apple_arm64).

cllns avatar Dec 01 '21 05:12 cllns

As an alternative nix can be used to build docker images. Because nix has support to build Elm on ARM.

akoppela avatar Jan 17 '22 12:01 akoppela

Hi! Is it possible to merge this PR? Or to say what is the problem with it? Because I need to use a linux_arm64 version of elm with npm, and without this fix, it is currently impossible to do that.

mageekguy avatar Oct 17 '22 13:10 mageekguy

Hello,

Any news regarding this PR? It's still a blocker for us. Is there any way we can help progressing this a bit faster?

Thanks!

gpositive avatar Aug 09 '23 11:08 gpositive

https://github.com/elm/compiler/pull/2287#issuecomment-1632351816

lydell avatar Aug 09 '23 11:08 lydell