On Sun, Mar 17, 2019 at 08:23:31PM +0530, Manas Kashyap wrote:
> Hola ,
> I am Manas Kashyap and i was working on ruby-sassc package , i am
> encountering an error , http://paste.debian.net/1073485/ (error log),
The paste will expire in 24h. It's usually better to just paste the
relevant part of the log in the email directly. I will do that here:
┌──────────────────────────────────────────────────────────────────────────────┐
│ Run tests for ruby2.5 from debian/ruby-tests.rake │
└──────────────────────────────────────────────────────────────────────────────┘
RUBYLIB=/home/manas/packagin-work/sassc/ruby-sassc/debian/ruby-sassc/usr/lib/ruby/vendor_ruby:. GEM_PATH=debian/ruby-sassc/usr/share/rubygems-integration/2.5.0:/home/manas/.gem/ruby/2.5.0:/var/lib/gems/2.5.0:/usr/lib/x86_64-linux-gnu/rubygems-integration/2.5.0:/usr/share/rubygems-integration/2.5.0:/usr/share/rubygems-integration/all ruby2.5 -S rake -f debian/ruby-tests.rake
/usr/bin/ruby2.5 -w -I"test" -I"/var/lib/gems/2.5.0/gems/rake-12.3.2/lib" "/var/lib/gems/2.5.0/gems/rake-12.3.2/lib/rake/rake_test_loader.rb" "test/custom_importer_test.rb" "test/engine_test.rb" "test/error_test.rb" "test/functions_test.rb" "test/native_test.rb" "test/output_style_test.rb" "test/sass_2_scss_test.rb" "test/test_helper.rb" -v
WARN: Unresolved specs during Gem::Specification.reset:
i18n (< 2, >= 0.7)
concurrent-ruby (>= 1.0.2, ~> 1.0)
rack-test (>= 0.6.3)
loofah (>= 2.2.2, ~> 2.2)
nokogiri (>= 1.6)
erubi (~> 1.4)
thor (< 2.0, >= 0.19.0)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
/usr/lib/ruby/vendor_ruby/ffi/library.rb:333: warning: assigned but unused variable - s
Traceback (most recent call last):
14: from /var/lib/gems/2.5.0/gems/rake-12.3.2/lib/rake/rake_test_loader.rb:5:in `<main>'
13: from /var/lib/gems/2.5.0/gems/rake-12.3.2/lib/rake/rake_test_loader.rb:5:in `select'
12: from /var/lib/gems/2.5.0/gems/rake-12.3.2/lib/rake/rake_test_loader.rb:17:in `block in <main>'
11: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
10: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
9: from /home/manas/packagin-work/sassc/ruby-sassc/test/custom_importer_test.rb:3:in `<top (required)>'
8: from /home/manas/packagin-work/sassc/ruby-sassc/test/custom_importer_test.rb:3:in `require_relative'
7: from /home/manas/packagin-work/sassc/ruby-sassc/test/test_helper.rb:9:in `<top (required)>'
6: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
5: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
4: from /home/manas/packagin-work/sassc/ruby-sassc/debian/ruby-sassc/usr/lib/ruby/vendor_ruby/sassc.rb:7:in `<top (required)>'
3: from /home/manas/packagin-work/sassc/ruby-sassc/debian/ruby-sassc/usr/lib/ruby/vendor_ruby/sassc.rb:7:in `require_relative'
2: from /home/manas/packagin-work/sassc/ruby-sassc/debian/ruby-sassc/usr/lib/ruby/vendor_ruby/sassc/native.rb:5:in `<top (required)>'
1: from /home/manas/packagin-work/sassc/ruby-sassc/debian/ruby-sassc/usr/lib/ruby/vendor_ruby/sassc/native.rb:6:in `<module:SassC>'
/home/manas/packagin-work/sassc/ruby-sassc/debian/ruby-sassc/usr/lib/ruby/vendor_ruby/sassc/native.rb:10:in `<module:Native>': undefined method `gem_dir' for nil:NilClass (NoMethodError)
rake aborted!
Command failed with status (1): [ruby -w -I"test" -I"/var/lib/gems/2.5.0/gems/rake-12.3.2/lib" "/var/lib/gems/2.5.0/gems/rake-12.3.2/lib/rake/rake_test_loader.rb" "test/custom_importer_test.rb" "test/engine_test.rb" "test/error_test.rb" "test/functions_test.rb" "test/native_test.rb" "test/output_style_test.rb" "test/sass_2_scss_test.rb" "test/test_helper.rb" -v]
/var/lib/gems/2.5.0/gems/rake-12.3.2/exe/rake:27:in `<top (required)>'
Tasks: TOP => default
(See full trace by running task with --trace)
ERROR: Test "ruby2.5" failed. Exiting.
dh_auto_install: dh_ruby --install /home/manas/packagin-work/sassc/ruby-sassc/debian/ruby-sassc returned exit code 1
make: *** [debian/rules:6: binary] Error 1
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
> and i
> am clueless about it , any guide on how to resolve it would be greatly
> appreciated.
> Link to the package https://salsa.debian.org/Manas-kashyap-guest/ruby-sassc
This package contains an embedded copy of libsass. It should instead use the
libsass we already have instead of building it's own copy. The ext/ directory
only contains that copy so it should probably be dropped entirely, and the
extensions field should be dropped from the gemspec.
And the error you are seeing
$ cat -n debian/ruby-sassc/usr/lib/ruby/vendor_ruby/sassc/native.rb | head -n 20
1 # frozen_string_literal: true
2
3 require "ffi"
4
5 module SassC
6 module Native
7 extend FFI::Library
8
9 spec = Gem.loaded_specs["sassc"]
10 gem_root = spec.gem_dir
11 ffi_lib "#{gem_root}/ext/libsass/lib/libsass.so"
Line 9 assumes that the library has been loaded from a Rubygems directory, so
you should probably use `export DH_RUBY = --gem-install` in debian/rules to make the
package install using the Rubygems layout.
But, line 11 loads the embedded copy of libsass, which should be dropped.
It should probably be changed to
ffi_lib "/usr/lib/#{RbConfig::CONFIG['arch']}/libsass.so"
(with a dependency on libsass-dev)