E

Incompatibility error on MacBook Pro M3

Summary

The user is experiencing an incompatibility error while using Earthly on their MacBook Pro M3, which has an ARM64 architecture, when trying to build a development environment with x86_64 containers. They face warnings about architecture mismatch and connection reset failures. Their setup typically involves using a native arm64 buildkit image to build amd64 images via emulation. The user notes that their development environment is large, requiring a sizable container with compilers, and they run Earthly inside it. They confirm that the base image for Earthly is amd64 and express concerns about complications with emulation and building within another container. Another user suggests that using the command "earthly --platform linux/amd64 +some-build" resolved a similar issue for them, allowing for conditional target OS flags to work effectively.

Status
resolved
Tags
    Source
    #earthly
      a

      alex804

      9/30/2024

      I had the same issue on m3, but earthly --platform linux/amd64 +some-build worked for me: I even have conditional target os flags inside earthly, which worked perfectly - i.e. quatro tinytex installation only works on amd64, so by adding platform option I managed to compile it

      b

      brandon

      9/13/2024

      So that base image that runs earthly inside is amd64?

      TBH I would think that kind of thing should work in general with emulation, but earthly is complicated and there could be edge cases. Running earthly to do builds inside another container can get tricky too.

      t

      torvik

      9/13/2024

      interesting! i didn't know you could do that! unfortunately, due to the size of our development environment, we use earthly to build a decently sized container with the base of all our compilers, then when you pull that down, we run earthly inside it to build the rest of the environment

      b

      brandon

      9/13/2024

      Hi Ryan, the typical setup would be to use the native buildkit image for your arch (arm64 buildkit image on M3 mac) and then use it to build amd64 images via emulation. E.g. earthly --platform linux/amd64 +some-build

      t

      torvik

      9/11/2024

      Hello! I'm trying to use earthly on my MBP M3, and I'm getting an incompatibility error when trying to use earthly to build my dev environment. My starting containers are all x86_64 . Earthly spits out a couple errors.

      buildkitd | Warning: earthly-buildkitd was started using architecture amd64, but host architecture is arm64; is DOCKER_DEFAULT_PLATFORM accidentally set? and then later

      runc run failed: unable to start container process: waiting for init preliminary setup: read init-p: connection reset by peer