Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 768042 - dev-ruby/sassc-2.2.1 loads libsass.so from hardcoded /usr/lib64 path on prefix
Summary: dev-ruby/sassc-2.2.1 loads libsass.so from hardcoded /usr/lib64 path on prefix
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Ruby Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-31 09:28 UTC by Alexey
Modified: 2021-03-09 09:01 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey 2021-01-31 09:28:59 UTC
$ jekyll
Traceback (most recent call last):
	7: from /home/sokolov/gentoo/usr/bin/jekyll:9:in `<main>'
	6: from /home/sokolov/gentoo/usr/bin/jekyll:9:in `load'
	5: from /home/sokolov/gentoo/usr/lib64/ruby/gems/2.6.0/gems/jekyll-4.1.1/exe/jekyll:8:in `<top (required)>'
	4: from /home/sokolov/gentoo/usr/lib64/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
	3: from /home/sokolov/gentoo/usr/lib64/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
	2: from /home/sokolov/gentoo/usr/lib64/ruby/gems/2.6.0/gems/jekyll-4.1.1/lib/jekyll.rb:209:in `<top (required)>'
	1: from /home/sokolov/gentoo/usr/lib64/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
/home/sokolov/gentoo/usr/lib64/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require': cannot load such file -- jekyll-sass-converter (LoadError)
	22: from /home/sokolov/gentoo/usr/bin/jekyll:9:in `<main>'
	21: from /home/sokolov/gentoo/usr/bin/jekyll:9:in `load'
	20: from /home/sokolov/gentoo/usr/lib64/ruby/gems/2.6.0/gems/jekyll-4.1.1/exe/jekyll:8:in `<top (required)>'
	19: from /home/sokolov/gentoo/usr/lib64/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
	18: from /home/sokolov/gentoo/usr/lib64/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
	17: from /home/sokolov/gentoo/usr/lib64/ruby/gems/2.6.0/gems/jekyll-4.1.1/lib/jekyll.rb:209:in `<top (required)>'
	16: from /home/sokolov/gentoo/usr/lib64/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:149:in `require'
	15: from /home/sokolov/gentoo/usr/lib64/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:160:in `rescue in require'
	14: from /home/sokolov/gentoo/usr/lib64/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:160:in `require'
	13: from /home/sokolov/gentoo/usr/lib64/ruby/gems/2.6.0/gems/jekyll-sass-converter-2.1.0/lib/jekyll-sass-converter.rb:4:in `<top (required)>'
	12: from /home/sokolov/gentoo/usr/lib64/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
	11: from /home/sokolov/gentoo/usr/lib64/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
	10: from /home/sokolov/gentoo/usr/lib64/ruby/gems/2.6.0/gems/jekyll-sass-converter-2.1.0/lib/jekyll/converters/scss.rb:3:in `<top (required)>'
	 9: from /home/sokolov/gentoo/usr/lib64/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
	 8: from /home/sokolov/gentoo/usr/lib64/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
	 7: from /home/sokolov/gentoo/usr/lib64/ruby/gems/2.6.0/gems/sassc-2.2.1/lib/sassc.rb:31:in `<top (required)>'
	 6: from /home/sokolov/gentoo/usr/lib64/ruby/gems/2.6.0/gems/sassc-2.2.1/lib/sassc.rb:31:in `require_relative'
	 5: from /home/sokolov/gentoo/usr/lib64/ruby/gems/2.6.0/gems/sassc-2.2.1/lib/sassc/native.rb:5:in `<top (required)>'
	 4: from /home/sokolov/gentoo/usr/lib64/ruby/gems/2.6.0/gems/sassc-2.2.1/lib/sassc/native.rb:6:in `<module:SassC>'
	 3: from /home/sokolov/gentoo/usr/lib64/ruby/gems/2.6.0/gems/sassc-2.2.1/lib/sassc/native.rb:11:in `<module:Native>'
	 2: from /home/sokolov/gentoo/usr/lib64/ruby/gems/2.6.0/gems/ffi-1.14.1/lib/ffi/library.rb:99:in `ffi_lib'
	 1: from /home/sokolov/gentoo/usr/lib64/ruby/gems/2.6.0/gems/ffi-1.14.1/lib/ffi/library.rb:99:in `map'
/home/sokolov/gentoo/usr/lib64/ruby/gems/2.6.0/gems/ffi-1.14.1/lib/ffi/library.rb:145:in `block in ffi_lib': Could not open library '/usr/lib64/libsass.so': /usr/lib64/libsass.so: cannot open shared object file: No such file or directory (LoadError)
	23: from /home/sokolov/gentoo/usr/bin/jekyll:9:in `<main>'
	22: from /home/sokolov/gentoo/usr/bin/jekyll:9:in `load'
	21: from /home/sokolov/gentoo/usr/lib64/ruby/gems/2.6.0/gems/jekyll-4.1.1/exe/jekyll:8:in `<top (required)>'
	20: from /home/sokolov/gentoo/usr/lib64/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
	19: from /home/sokolov/gentoo/usr/lib64/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
	18: from /home/sokolov/gentoo/usr/lib64/ruby/gems/2.6.0/gems/jekyll-4.1.1/lib/jekyll.rb:209:in `<top (required)>'
	17: from /home/sokolov/gentoo/usr/lib64/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:149:in `require'
	16: from /home/sokolov/gentoo/usr/lib64/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:160:in `rescue in require'
	15: from /home/sokolov/gentoo/usr/lib64/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:160:in `require'
	14: from /home/sokolov/gentoo/usr/lib64/ruby/gems/2.6.0/gems/jekyll-sass-converter-2.1.0/lib/jekyll-sass-converter.rb:4:in `<top (required)>'
	13: from /home/sokolov/gentoo/usr/lib64/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
	12: from /home/sokolov/gentoo/usr/lib64/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
	11: from /home/sokolov/gentoo/usr/lib64/ruby/gems/2.6.0/gems/jekyll-sass-converter-2.1.0/lib/jekyll/converters/scss.rb:3:in `<top (required)>'
	10: from /home/sokolov/gentoo/usr/lib64/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
	 9: from /home/sokolov/gentoo/usr/lib64/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
	 8: from /home/sokolov/gentoo/usr/lib64/ruby/gems/2.6.0/gems/sassc-2.2.1/lib/sassc.rb:31:in `<top (required)>'
	 7: from /home/sokolov/gentoo/usr/lib64/ruby/gems/2.6.0/gems/sassc-2.2.1/lib/sassc.rb:31:in `require_relative'
	 6: from /home/sokolov/gentoo/usr/lib64/ruby/gems/2.6.0/gems/sassc-2.2.1/lib/sassc/native.rb:5:in `<top (required)>'
	 5: from /home/sokolov/gentoo/usr/lib64/ruby/gems/2.6.0/gems/sassc-2.2.1/lib/sassc/native.rb:6:in `<module:SassC>'
	 4: from /home/sokolov/gentoo/usr/lib64/ruby/gems/2.6.0/gems/sassc-2.2.1/lib/sassc/native.rb:10:in `<module:Native>'
	 3: from /home/sokolov/gentoo/usr/lib64/ruby/gems/2.6.0/gems/sassc-2.2.1/lib/sassc/native.rb:13:in `rescue in <module:Native>'
	 2: from /home/sokolov/gentoo/usr/lib64/ruby/gems/2.6.0/gems/ffi-1.14.1/lib/ffi/library.rb:99:in `ffi_lib'
	 1: from /home/sokolov/gentoo/usr/lib64/ruby/gems/2.6.0/gems/ffi-1.14.1/lib/ffi/library.rb:99:in `map'
/home/sokolov/gentoo/usr/lib64/ruby/gems/2.6.0/gems/ffi-1.14.1/lib/ffi/library.rb:145:in `block in ffi_lib': Could not open library '/ext/libsass.so': /ext/libsass.so: cannot open shared object file: No such file or directory (LoadError)
Comment 1 Hans de Graaff gentoo-dev Security 2021-03-09 07:07:57 UTC
sassc does this to load libsass.do:

      ffi_lib File.expand_path("libsass.#{dl_ext}", "/usr/lib64")

@prefix: what it the preferred way to fix this? Should we run eprexify on this?
Comment 2 Fabian Groffen gentoo-dev 2021-03-09 07:42:01 UTC
This is up for your preferences.  Either a patch is made to put @GENTOO_EPREFIX@ or something in the code, and sed to replace it with the actual value, or a direct sed is used, for which hprefixify can be used if the location can be isolated well enough, e.g.

 hprefixify -w "/libsass.#/" sassc.rb
Comment 3 Hans de Graaff gentoo-dev Security 2021-03-09 08:59:59 UTC
(In reply to Fabian Groffen from comment #2)
> This is up for your preferences.  Either a patch is made to put
> @GENTOO_EPREFIX@ or something in the code, and sed to replace it with the
> actual value, or a direct sed is used, for which hprefixify can be used if
> the location can be isolated well enough, e.g.
> 
>  hprefixify -w "/libsass.#/" sassc.rb

Thanks. Upon further inspection it turns out we provide that path ourselves so this was more easily fixed directly in the ebuild using EROOT.
Comment 4 Larry the Git Cow gentoo-dev 2021-03-09 09:01:21 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e0ce2477f053db0c4d0dd9f73156a45702979b6a

commit e0ce2477f053db0c4d0dd9f73156a45702979b6a
Author:     Hans de Graaff <graaff@gentoo.org>
AuthorDate: 2021-03-09 09:00:09 +0000
Commit:     Hans de Graaff <graaff@gentoo.org>
CommitDate: 2021-03-09 09:00:30 +0000

    dev-ruby/sassc: fix library loading on prefix
    
    Closes: https://bugs.gentoo.org/768042
    Package-Manager: Portage-3.0.13, Repoman-3.0.2
    Signed-off-by: Hans de Graaff <graaff@gentoo.org>

 dev-ruby/sassc/sassc-2.2.1-r1.ebuild | 48 ++++++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)