jekyll / jekyll-sass-converter

A Sass converter for Jekyll.

Home Page:http://rubygems.org/gems/jekyll-sass-converter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

jekyll-sass-converter v3 doesn't build on Alpine (musl)

nmarley opened this issue · comments

This is apparently because the dependency dart-sass-embedded has not been built or supported for musl at https://github.com/sass/dart-sass-embedded/releases/tag/1.57.1.

Here's my error message:

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /app/vendor/ruby/3.1.0/gems/sass-embedded-1.57.1/ext/sass
/usr/bin/ruby -I/usr/local/lib/site_ruby/3.1.0 -rrubygems /app/vendor/ruby/3.1.0/gems/rake-13.0.6/exe/rake
RUBYARCHDIR\=/app/vendor/ruby/3.1.0/extensions/x86_64-linux-musl/3.1.0/sass-embedded-1.57.1
RUBYLIBDIR\=/app/vendor/ruby/3.1.0/extensions/x86_64-linux-musl/3.1.0/sass-embedded-1.57.1
rake aborted!
NotImplementedError: sass_embedded for x86_64-linux-musl not available at
https://github.com/sass/dart-sass-embedded/releases/tag/1.57.1
/app/vendor/ruby/3.1.0/gems/sass-embedded-1.57.1/ext/sass/Rakefile:226:in `default_sass_embedded'
/app/vendor/ruby/3.1.0/gems/sass-embedded-1.57.1/ext/sass/Rakefile:21:in `block (2 levels) in <top (required)>'
/app/vendor/ruby/3.1.0/gems/sass-embedded-1.57.1/ext/sass/Rakefile:21:in `fetch'
/app/vendor/ruby/3.1.0/gems/sass-embedded-1.57.1/ext/sass/Rakefile:21:in `block in <top (required)>'
/app/vendor/ruby/3.1.0/gems/rake-13.0.6/exe/rake:27:in `<main>'
Tasks: TOP => default => install => embedded.rb => sass_embedded
(See full trace by running task with --trace)

rake failed, exit code 1

This is expected. The Dart VM still do not have support for musl-libc at this point: dart-lang/sdk#40906

Please consider switch to a glibc based linux. If you cannot switch somehow, you can lock jekyll-sass-converter to 2.x in Gemfile, but you’re stuck with the old version of sass that way.

Thanks for the suggestion! I was able to lock to version 2 in the Gemfile and get the gem installed as usual.

Hi! Just found this issue when searching for jekyll/jekyll#9132. I had to dig into the Rakefile to understand the error, as there was no documentation on how the Dart Sass executable was sourced.

Would it be possible for this to get listed in the 3.x migration checklist, so that others don't run into the same problem?

Updated the README to mention lack of Dart VM support on linux-musl platform.

commented

is there any way to be able to specify the location of the Dart Sass executable? I use NixOS which can't run arbitrary unpatched binaries, but there's a package that provides the version transpiled to Node.

ping @ntkme for inputs regarding above query 👆

is there any way to be able to specify the location of the Dart Sass executable? I use NixOS which can't run arbitrary unpatched binaries, but there's a package that provides the version transpiled to Node.

Discussion here: sass-contrib/sass-embedded-host-ruby#91

Alpine (musl) will be supported in next release of sass-embedded gem. I will send a PR to update README once it is available.