-
Notifications
You must be signed in to change notification settings - Fork 158
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
FFI::NotFoundError: Function 'libsass_version' not found when using nix #148
Comments
I have just seen the same thing from |
Same here, also using nix on MacOS.
|
I built the gem manually and compared to the bundle being used by nix, and there's clearly a problem in the compilation step:
|
do other folks have the same issues when using bundix? |
I've found the problem: libsass is being compiled with
If I change
then we get
and I don't know why this isn't a problem on other platforms. I don't have time to think about how to solve this properly right now, but hopefully this information helps someone else. |
related upstream issue: NixOS/nixpkgs#19098 |
see sass#148 for more context
see sass#148 for more context thanks @michaelglass
Interesting datapoint: attempting to build
|
Temporary workaround for those who can't wait for #192 to show up in sassc and whatever packages you're using that depend on it. If you use bundler (not bundix) for gem management, you can run |
I had this error too, very grateful for the your workaround with the build flag 🙏 . rubyEnv = pkgs.bundlerEnv {
inherit ruby;
gemfile = ./Gemfile;
lockfile = ./Gemfile.lock;
gemset = ./gemset.nix;
gemConfig = pkgs.defaultGemConfig // {
sassc = attrs: { buildFlags = [ "--disable-lto" ]; };
};
}; |
Thanks for the tip, @michaelglass! In the 5 years since, the upstream issue has been resolved and merged into The remaining issue is that, in the currently released gem, LTO is enabled only on Darwin+Nix. I opened #247 to enable LTO by default again on all platforms. Hopefully there will be another release, so we could enjoy LTO e.g. on Linux as well. |
Looks like
nix
won't build thelibsass.bundle
correctly for some reason. Any ideas?here's a full backtrace.
The text was updated successfully, but these errors were encountered: