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

Doesn't run on alpine linux #2148

Closed
farnetto opened this issue Dec 13, 2023 · 6 comments · Fixed by #2149
Closed

Doesn't run on alpine linux #2148

farnetto opened this issue Dec 13, 2023 · 6 comments · Fixed by #2149

Comments

@farnetto
Copy link

farnetto commented Dec 13, 2023

On alpine there's no glibc only musllibc.

Errors:

    /dart-sass # ldd src/dart
            /lib64/ld-linux-x86-64.so.2 (0x7f26ab540000)
            libdl.so.2 => /lib64/ld-linux-x86-64.so.2 (0x7f26ab540000)
            libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x7f26ab540000)
            libm.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7f26ab540000)
            libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7f26ab540000)
    /dart-sass # ls  /lib64/ld-linux-x86-64.so.2
    ls: /lib64/ld-linux-x86-64.so.2: No such file or directory

and here

    [INFO] --- dart-sass:1.2.0:compile-sass (generate-css-using-dart-sass) @ cms ---
    [INFO] Auto-detected operating system: linux
    [INFO] Auto-detected operating system architecture: x64
    [INFO] Auto-detected latest version: 1.69.5
    /tmp/dart-sass-maven-plugin/linux/x64/1.69.5/sass: exec: line 20: /tmp/dart-sass-maven-plugin/linux/x64/1.69.5/src/dart: not found

my system:

    Apache Maven 3.9.5 (57804ffe001d7215b5e7bcb531cf83df38f93546)
    Maven home: /usr/share/maven
    Java version: 1.8.0_372, vendor: IcedTea, runtime: /usr/lib/jvm/java-1.8-openjdk/jre
    Default locale: en_US, platform encoding: UTF-8
    OS name: "linux", version: "6.6.4-100.fc38.x86_64", arch: "amd64", family: "unix"
@nex3
Copy link
Contributor

nex3 commented Dec 13, 2023

Dart itself doesn't currently support Alpine, so there's not much we can do here until that happens.

@ntkme I know you were working on getting Dart itself more Alpine-compatible, what's the current status there?

@farnetto
Copy link
Author

farnetto commented Dec 13, 2023 via email

@ntkme
Copy link
Contributor

ntkme commented Dec 13, 2023

We have very reliable builds of dart-sdk for musl, however, currently it is not possible for dart-sdk builds to be interchangeable between glibc and musl. So dart-sass for glibc and musl need to be built separately. I have been building dart-sass for musl based on the dart-sdk for musl and they have been serving ruby community for almost a year (roughly 20% of linux downloads are from musl platforms e.g. alpine-linux) and there wasn't any issue reported so it has been very stable.

@nex3 I wanted to discuss with you about what should we do as next steps as the dart team is not interested to take over the maintenance of dart-sdk for musl, specifically in terms of providing official builds on dart team's CI/CD. I'm fine with maintaining the musl builds for dart-sdk myself as it is 100% automated (including beta and dev builds) for every single release and requires nearly no human intervention. The question is, would the sass team be ok with providing "official" builds of dart-sass with unofficial builds of dart-sdk? If so, I'm happy to send a PR to move the build process dart-sass for musl into this repo. If the sass team is not ready for using unofficial builds of dart-sdk at this moment, I think an alternative approach we can take is to still build dart-sass for musl as a separate unofficial project, but we can setup a CI hook to automate the release of unofficial musl builds (similar to how we release embedded-host-node). I've created a github org account @sass-contrib and moved all related projects there. I'd like to have you as backup admin for that org, which would make it easier for collaboration between official and unofficial sass projects.

What do you think?

@nex3
Copy link
Contributor

nex3 commented Dec 14, 2023

I'm fine using your build of the Dart SDK for musl. How would we handle Homebrew, where we currently rely on the dart-sdk tap? Just say you can't install Sass via brew on musl linux?

@ntkme
Copy link
Contributor

ntkme commented Dec 14, 2023

We can modify the dart-sass formula to download the prebuilt binary from GitHub release instead of actually building dart-sass, just like the dart sdk tap does not really build dart sdk.

@ntkme
Copy link
Contributor

ntkme commented Dec 14, 2023

In fact, as far as I can remember for Linuxbrew ships its own glibc and so that it should just work.

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

Successfully merging a pull request may close this issue.

3 participants