sassc-ruby
sassc-ruby copied to clipboard
Native code doesn't compile anymore since version 2.1.0 on FreeBSD
Native code doesn't compile anymore since version 2.1.0 on FreeBSD
linking shared-object sassc/libsass.so
/usr/bin/ld: unrecognized option '-plugin'
/usr/bin/ld: use the --help option for usage information
c++: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1
It looks like the FreeBSD linker /usr/bin/ld doesn't know the option -plugin
https://github.com/sass/sassc-rails/issues/133
No, -flto flag couses this error. Try to upgrade to 12.x FreeBSD. Or do the following hack trip.
gem fetch sassc -v 2.2.1
gem unpack sassc-2.2.1.gem
gem spec sassc-2.2.1.gem --ruby > sassc-2.2.1/sassc.gemspec
sed -i.bak 's/$LDFLAGS << '\'' -flto'\''/$LDFLAGS << '\'' -fuse-ld=lld -flto/' sassc-2.2.1/ext/extconf.rb
cd sassc-2.2.1/
gem build
gem install sassc-2.2.1.gem
Thanks @zblsv! I successfully installed it on two machines with FreeBSD 11.3.
The sed command is not perfect. I had to manually add the closing singe quote on line 31. At first I thought this could be a issue withzsh but it was the same in bash...
And to build the gem I need to enter gem build sassc.