-
Notifications
You must be signed in to change notification settings - Fork 155
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
2.1.0 compile error #141
Comments
Getting the same error after upgrading to rails 6 |
On Alpine you need to install the |
Note also that this is not a compilation error: it's an error while loading the pre-compiled library. Alpine comes with |
Sorry buy installing I am currently installing the gem from source with bundler ( PS: This happened during the upgrade to rails 6 and our Gemfile only contains a reference to Here is an excepert of the
Error message when running
|
No, the following line means you're installing the pre-compiled version:
Here is how you can force bundler to avoid pre-compiled gems:
(This has the same effect as setting Run this in your Alpine container before running |
Because we use the Alpine image, the native extension must be compiled from source sass/sassc-ruby#141 (comment)
Thanks the bundle config worked! |
By the way, this is something you should always do if you're using Alpine. It's not specific to this gem at all. How did you decide to use Alpine? It's designed for power users (https://alpinelinux.org/about/) who understand all the implications of using a non-libc environment. There are small Debian containers as well, such as Minideb, though still much larger than Alpine. |
It's not about not understanding Alpine linux, it's about a not properly documented flag in bundler. Nothing in the docs hints at this and honestly I've never seen it before. |
Nokogiri and ffi don't have pre-compiled gems for Linux, that's why they are always compiled from source on install on Linux. Rails 6.0 depends on a newer version of sass-rails which depends on sassc v2.1.0+. If you're seeing this for the first time, it's only because none of the other dependencies in your application provide precompiled gems for Linux. libc6 should not be linked statically (and basically never is). |
Just to note: I ran into this problem when I upgraded to Jekyll 4, which I run in a Docker container with an Alpine base image. Adding |
@glebm Should we perhaps stop shipping a precompiled gem for linux? We've got a few different issues at this point, and I'm not sure how to debug them. These issues didn't really come up previously. |
I think my issue #144 is also related to this one. The Jekyll Docker image is indeed based off Alpine: https://github.com/envygeeks/jekyll-docker#packages. Will try the |
@bolandrm Yes, I think we should. It's unfortunate that RubyGems doesn't let us to target a particular version of libc and users don't seem to be aware of this distinction because other popular gems don't ship precompiled Linux versions. |
We can't target a particular libc with RubyGems and many users aren't aware of this (sass#141).
2.2.0 release with no precompiled linux gem. Please give that a shot. |
Thanks @glebm! It now works on my Alpine Docker machine without the |
Try to specify postgres-alpine version. Bug/issue with Alpine and the sassc-ruby gems (as per sass/sassc-ruby#141).
2.1.0 doesn't seem to be compile for me on alpine linux systems. It is failing with this error:
LoadError: Could not open library '/codebuild/output/src471049011/src/vendor/bundle/ruby/2.5.0/gems/sassc-2.1.0-x86_64-linux/lib/sassc/libsass.so': Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /codebuild/output/src471049011/src/vendor/bundle/ruby/2.5.0/gems/sassc-2.1.0-x86_64-linux/lib/sassc/libsass.so)
But it seems to compile fine on a OSX / Ubuntu system just fine though!
The text was updated successfully, but these errors were encountered: