Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

137 exit status on Cabal package installations with DOCKER_DEFAULT_PLATFORM=linux/amd64 on an M1 Mac #79

Closed
jonkri opened this issue Jun 25, 2022 · 3 comments

Comments

@jonkri
Copy link

jonkri commented Jun 25, 2022

Hello!

My goal is to prepare a linux/amd64 Docker image using DOCKER_DEFAULT_PLATFORM on an M1 Mac, but cabal seems to fail to install any package.

For example, running DOCKER_DEFAULT_PLATFORM=linux/amd64 docker run -it --rm haskell:9-slim bash -c "cabal update && cabal install array"; echo $? prints 137 indicating an out-of-memory error (even though I have made 12 GB of memory available to Docker). (I arbitrarily picked the array package since it has no dependencies (except for base), but any package that I've tried has failed.)

The cabal-install version is 3.6.2.0.

I'm using a fully updated M1 MacBook Pro (14-inch, 2021) with an Apple M1 Pro chip, 16 GB of RAM and macOS Monterey.

I have the latest version of Docker Desktop (4.9.1). The Docker version is 20.10.16 (build aa7e414).

I have tried both version 8 and version 9 of the images (with and without “-slim”).

Thanks!

@jonkri
Copy link
Author

jonkri commented Jun 25, 2022

I noticed that this 137 exit status can occur with apt (with DOCKER_DEFAULT_PLATFORM=linux/amd64 docker run -it --rm debian bash -c "apt update && apt-get install -y cabal-install"; echo $?) and on Arch Linux (with DOCKER_DEFAULT_PLATFORM=linux/amd64 docker run -it --rm archlinux bash -c "pacman --noconfirm -Suy cabal-install && cabal update && cabal install array"; echo $?) as well, so it's not specific to this repository. Closing.

@jonkri jonkri closed this as completed Jun 25, 2022
@DaQuirm
Copy link

DaQuirm commented Nov 28, 2022

Hi @jonkri, did you manage to find a workaround for this?

@jonkri
Copy link
Author

jonkri commented Nov 29, 2022

Hi @jonkri, did you manage to find a workaround for this?

Hi, @DaQuirm! I guess it depends on the definition of workaround... 😅 I decided to use a GNU/Linux VPS in the end. I got virtualization with UTM to work as well (installing x86 Arch), but it's very slow, and I never got sharing files between the host and guest system to work in a satisfactory way either. Hope that helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants