From 71bb4bc5a9c56109a76e129f9547cf25c0535572 Mon Sep 17 00:00:00 2001 From: Philip Giuliani <giiuliio@gmail.com> Date: Fri, 8 Oct 2021 09:09:32 +0200 Subject: [PATCH 1/2] Add FAQ for Alpine Linux --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index b809f9e..941286b 100644 --- a/README.md +++ b/README.md @@ -138,6 +138,21 @@ alias for deployments, which will also use the `--style=compressed` option: ] ``` +## FAQ +### Compatibility with Alpine Linux (`mix sass default` exited with 2) +Dart-native executables rely on [glibc](https://www.gnu.org/software/libc/) to be present. Because Alpine Linux is uses [musl](https://musl.libc.org/) instead, you have to add the package [alpine-pkg-glibc](https://github.com/sgerrand/alpine-pkg-glibc) to your installation. Follow the installation guide in the README. + +Example for Docker (has to be added before running `mix sass`): +```Dockerfile +RUN wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub +RUN wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.34-r0/glibc-2.34-r0.apk +RUN apk add glibc-2.34-r0.apk +``` + +In case you get the error `../../runtime/bin/eventhandler_linux.cc: 412: error: Failed to start event handler thread 1`, it means that your Docker installation or the used Docker-in-Docker image, is using a version below Docker 20.10.6. This error is related to an [updated version of the musl library](https://about.gitlab.com/blog/2021/08/26/its-time-to-upgrade-docker-engine). It can be resolved by using the [alpine-pkg-glibc](https://github.com/sgerrand/alpine-pkg-glibc) with the version 2.33 instead of 2.34. + +Notes: The Alpine package gcompat vs libc6-compat will not work. + ## Acknowledgements This package is based on the excellent [esbuild](https://github.com/phoenixframework/esbuild) by Wojtek Mach and José Valim. From 91dda2792c247722330f97799a05c495b314e811 Mon Sep 17 00:00:00 2001 From: Philip Giuliani <giiuliio@gmail.com> Date: Sat, 9 Oct 2021 07:21:08 +0200 Subject: [PATCH 2/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 941286b..b372598 100644 --- a/README.md +++ b/README.md @@ -140,7 +140,7 @@ alias for deployments, which will also use the `--style=compressed` option: ## FAQ ### Compatibility with Alpine Linux (`mix sass default` exited with 2) -Dart-native executables rely on [glibc](https://www.gnu.org/software/libc/) to be present. Because Alpine Linux is uses [musl](https://musl.libc.org/) instead, you have to add the package [alpine-pkg-glibc](https://github.com/sgerrand/alpine-pkg-glibc) to your installation. Follow the installation guide in the README. +Dart-native executables rely on [glibc](https://www.gnu.org/software/libc/) to be present. Because Alpine Linux uses [musl](https://musl.libc.org/) instead, you have to add the package [alpine-pkg-glibc](https://github.com/sgerrand/alpine-pkg-glibc) to your installation. Follow the installation guide in the README. Example for Docker (has to be added before running `mix sass`): ```Dockerfile