Skip to content
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

Error on seven_zip_ruby gem install #2769

Open
brauliobo opened this issue Nov 5, 2022 · 7 comments
Open

Error on seven_zip_ruby gem install #2769

brauliobo opened this issue Nov 5, 2022 · 7 comments

Comments

@brauliobo
Copy link
Contributor

Installing seven_zip_ruby 1.3.0 with native extensions
--- ERROR REPORT TEMPLATE -------------------------------------------------------

NoMethodError: undefined method `full_name' for nil:NilClass                                                                                                                                     
  /home/braulio/.rvm/rubies/truffleruby-22.3.0/lib/mri/bundler/installer/parallel_installer.rb:124:in `block (2 levels) in check_for_unmet_dependencies'                                         
  /home/braulio/.rvm/rubies/truffleruby-22.3.0/lib/mri/bundler/installer/parallel_installer.rb:123:in `each'                                                                                     
  /home/braulio/.rvm/rubies/truffleruby-22.3.0/lib/mri/bundler/installer/parallel_installer.rb:123:in `block in check_for_unmet_dependencies'                                                    
  /home/braulio/.rvm/rubies/truffleruby-22.3.0/lib/mri/bundler/installer/parallel_installer.rb:122:in `each'                                                                                     
  /home/braulio/.rvm/rubies/truffleruby-22.3.0/lib/mri/bundler/installer/parallel_installer.rb:122:in `check_for_unmet_dependencies'                                                             
  /home/braulio/.rvm/rubies/truffleruby-22.3.0/lib/mri/bundler/installer/parallel_installer.rb:100:in `call'                                                                                     
  /home/braulio/.rvm/rubies/truffleruby-22.3.0/lib/mri/bundler/installer/parallel_installer.rb:71:in `call'                                                                                      
  /home/braulio/.rvm/rubies/truffleruby-22.3.0/lib/mri/bundler/installer.rb:262:in `install_in_parallel'                                                                                         
  /home/braulio/.rvm/rubies/truffleruby-22.3.0/lib/mri/bundler/installer.rb:209:in `install'                                                                                                     
  /home/braulio/.rvm/rubies/truffleruby-22.3.0/lib/mri/bundler/installer.rb:89:in `block in run'                                                                                                 
  /home/braulio/.rvm/rubies/truffleruby-22.3.0/lib/mri/bundler/process_lock.rb:12:in `block in lock'                                                                                             
  <internal:core> core/io.rb:670:in `open'                                                                                                                                                       
  /home/braulio/.rvm/rubies/truffleruby-22.3.0/lib/mri/bundler/process_lock.rb:9:in `lock'                                                                                                       
  /home/braulio/.rvm/rubies/truffleruby-22.3.0/lib/mri/bundler/installer.rb:71:in `run'                                                                                                          
  /home/braulio/.rvm/rubies/truffleruby-22.3.0/lib/mri/bundler/installer.rb:23:in `install'                                                                                                      
  /home/braulio/.rvm/rubies/truffleruby-22.3.0/lib/mri/bundler/cli/install.rb:60:in `run'                                                                                                        
  /home/braulio/.rvm/rubies/truffleruby-22.3.0/lib/mri/bundler/cli.rb:253:in `block in install'                                                                                                  
  /home/braulio/.rvm/rubies/truffleruby-22.3.0/lib/mri/bundler/settings.rb:131:in `temporary'                                                                                                    
  /home/braulio/.rvm/rubies/truffleruby-22.3.0/lib/mri/bundler/cli.rb:252:in `install'                                                                                                           
  /home/braulio/.rvm/rubies/truffleruby-22.3.0/lib/mri/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
  /home/braulio/.rvm/rubies/truffleruby-22.3.0/lib/mri/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'                                                                        
  /home/braulio/.rvm/rubies/truffleruby-22.3.0/lib/mri/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
  /home/braulio/.rvm/rubies/truffleruby-22.3.0/lib/mri/bundler/cli.rb:31:in `dispatch'                                                                                                           
  /home/braulio/.rvm/rubies/truffleruby-22.3.0/lib/mri/bundler/vendor/thor/lib/thor/base.rb:485:in `start'                                                                                       
  /home/braulio/.rvm/rubies/truffleruby-22.3.0/lib/mri/bundler/cli.rb:25:in `start'                                                                                                              
  /home/braulio/.rvm/rubies/truffleruby-22.3.0/lib/gems/gems/bundler-2.2.32/libexec/bundle:49:in `block in <top (required)>'
  /home/braulio/.rvm/rubies/truffleruby-22.3.0/lib/mri/bundler/friendly_errors.rb:103:in `with_friendly_errors'
  /home/braulio/.rvm/rubies/truffleruby-22.3.0/lib/gems/gems/bundler-2.2.32/libexec/bundle:37:in `<top (required)>'                                     
  <internal:core> core/kernel.rb:376:in `load'                                                                                                                                                   
  <internal:core> core/kernel.rb:376:in `load'                                                                                                                                                   
  /home/braulio/.rvm/gems/truffleruby-22.3.0/bin/bundle:23:in `<main>'                                                                                                                           

Environment

Bundler       2.2.32                                                                                                                                                                             
  Platforms   ruby                                                                                                                                                                               
Ruby          3.0.3p0 (2022-10-06 revision 939379fc43785567006ed246850473af50eceec1) [x86_64-linux]
  Full Path   /home/braulio/.rvm/rubies/truffleruby-22.3.0/bin/ruby                       
  Config Dir  /b/b/e/truffleruby/etc                                                                                                                                                             
RubyGems      3.2.32                                                                            
  Gem Home    /home/braulio/.rvm/gems/truffleruby-22.3.0                                 
  Gem Path    /home/braulio/.rvm/gems/truffleruby-22.3.0:/home/braulio/.rvm/rubies/truffleruby-22.3.0/lib/gems
  User Home   /home/braulio                                                                     
  User Path   /home/braulio/.gem/truffleruby/3.0.3.22.3.0                                       
  Bin Dir     /home/braulio/.rvm/gems/truffleruby-22.3.0/bin                                                                                                                                     
OpenSSL                                                                                                                                                                                          
  Compiled    OpenSSL 3.0.7 1 Nov 2022                                                                                                                                                             Loaded      OpenSSL 3.0.7 1 Nov 2022                                                          
  Cert File   /etc/ssl/cert.pem                                                                                                                                                                  
  Cert Dir    /etc/ssl/certs                                                                    
Tools                                                                                                                                                                                            
  Git         2.38.1                                                                                                                                                                             
  RVM         1.29.12-next (master)                                                                                                                                                              
  rbenv       not installed                   
  chruby      not installed                   

Bundler Build Metadata

Built At          2022-11-05
Git SHA           unknown
Released Version  false

Gemfile

Gemfile

source :rubygems                                                                                
                                                                                                
gem 'activesupport'
gem 'httpclient'
gem 'mechanize'
gem 'hashie'
gem 'rasn1'

gem 'iconv'
gem 'seven_zip_ruby'

gem 'sqlite3'
gem 'sequel'

Gemfile.lock

GEM
  remote: http://rubygems.org/
  specs:
    activesupport (7.0.4)
      concurrent-ruby (~> 1.0, >= 1.0.2)
      i18n (>= 1.6, < 2)
      minitest (>= 5.1)
      tzinfo (~> 2.0)
    addressable (2.8.1)
      public_suffix (>= 2.0.2, < 6.0)
    concurrent-ruby (1.1.10)
    connection_pool (2.3.0)
    domain_name (0.5.20190701)
      unf (>= 0.0.5, < 1.0.0)
    hashie (5.0.0)
    http-cookie (1.0.5)
      domain_name (~> 0.5)
    httpclient (2.8.3)
    i18n (1.12.0)
      concurrent-ruby (~> 1.0)
    iconv (1.0.8)
    mechanize (2.8.5)
      addressable (~> 2.8)
      domain_name (~> 0.5, >= 0.5.20190701)
      http-cookie (~> 1.0, >= 1.0.3)
      mime-types (~> 3.0)
      net-http-digest_auth (~> 1.4, >= 1.4.1)
      net-http-persistent (>= 2.5.2, < 5.0.dev)
      nokogiri (~> 1.11, >= 1.11.2)
      rubyntlm (~> 0.6, >= 0.6.3)
      webrick (~> 1.7)
      webrobots (~> 0.1.2)
    mime-types (3.4.1)
      mime-types-data (~> 3.2015)
    mime-types-data (3.2022.0105)
    minitest (5.16.3)
    net-http-digest_auth (1.4.1)
    net-http-persistent (4.0.1)
      connection_pool (~> 2.2)
    nokogiri (1.13.9-x86_64-linux)
      racc (~> 1.4)
    public_suffix (5.0.0)
    racc (1.6.0)
    rasn1 (0.11.0)
    rubyntlm (0.6.3)
    sequel (5.62.0)
    seven_zip_ruby (1.3.0)
    sqlite3 (1.5.3-x86_64-linux)
    tzinfo (2.0.5)
      concurrent-ruby (~> 1.0)
    unf (0.1.4)
      unf_ext
    unf_ext (0.0.8.2)
    webrick (1.7.0)
    webrobots (0.1.2)

PLATFORMS
  x86_64-linux

DEPENDENCIES
  activesupport
  hashie
  httpclient
  iconv
  mechanize
  rasn1
  sequel
  seven_zip_ruby
  sqlite3

BUNDLED WITH
   2.3.23

--- TEMPLATE END ----------------------------------------------------------------

@eregon
Copy link
Member

eregon commented Nov 8, 2022

Thanks for the report.
I cannot reproduce it locally with bundle install.
Did you pass any flags to Bundler, what was your Bundler command?
It looks like it could be a concurrency issue in Bundler, so that might explain why it does not reproduce.

@gogainda
Copy link
Contributor

gogainda commented Nov 8, 2022

I reproduced it:

logs

Installing seven_zip_ruby 1.3.0 with native extensions
zsh:1: command not found: chruby

Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
--- ERROR REPORT TEMPLATE -------------------------------------------------------

NoMethodError: undefined method full_name' for nil:NilClass /Users/novoi/.rubies/truffleruby-dev/lib/mri/bundler/installer/parallel_installer.rb:124:in block (2 levels) in check_for_unmet_dependencies'
/Users/novoi/.rubies/truffleruby-dev/lib/mri/bundler/installer/parallel_installer.rb:123:in each' /Users/novoi/.rubies/truffleruby-dev/lib/mri/bundler/installer/parallel_installer.rb:123:in block in check_for_unmet_dependencies'
/Users/novoi/.rubies/truffleruby-dev/lib/mri/bundler/installer/parallel_installer.rb:122:in each' /Users/novoi/.rubies/truffleruby-dev/lib/mri/bundler/installer/parallel_installer.rb:122:in check_for_unmet_dependencies'
/Users/novoi/.rubies/truffleruby-dev/lib/mri/bundler/installer/parallel_installer.rb:100:in call' /Users/novoi/.rubies/truffleruby-dev/lib/mri/bundler/installer/parallel_installer.rb:71:in call'
/Users/novoi/.rubies/truffleruby-dev/lib/mri/bundler/installer.rb:262:in install_in_parallel' /Users/novoi/.rubies/truffleruby-dev/lib/mri/bundler/installer.rb:209:in install'
/Users/novoi/.rubies/truffleruby-dev/lib/mri/bundler/installer.rb:89:in block in run' /Users/novoi/.rubies/truffleruby-dev/lib/mri/bundler/process_lock.rb:12:in block in lock'
internal:core core/io.rb:671:in open' /Users/novoi/.rubies/truffleruby-dev/lib/mri/bundler/process_lock.rb:9:in lock'
/Users/novoi/.rubies/truffleruby-dev/lib/mri/bundler/installer.rb:71:in run' /Users/novoi/.rubies/truffleruby-dev/lib/mri/bundler/installer.rb:23:in install'
/Users/novoi/.rubies/truffleruby-dev/lib/mri/bundler/cli/install.rb:60:in run' /Users/novoi/.rubies/truffleruby-dev/lib/mri/bundler/cli.rb:253:in block in install'
/Users/novoi/.rubies/truffleruby-dev/lib/mri/bundler/settings.rb:131:in temporary' /Users/novoi/.rubies/truffleruby-dev/lib/mri/bundler/cli.rb:252:in install'
/Users/novoi/.rubies/truffleruby-dev/lib/mri/bundler/vendor/thor/lib/thor/command.rb:27:in run' /Users/novoi/.rubies/truffleruby-dev/lib/mri/bundler/vendor/thor/lib/thor/invocation.rb:127:in invoke_command'
/Users/novoi/.rubies/truffleruby-dev/lib/mri/bundler/vendor/thor/lib/thor.rb:392:in dispatch' /Users/novoi/.rubies/truffleruby-dev/lib/mri/bundler/cli.rb:31:in dispatch'
/Users/novoi/.rubies/truffleruby-dev/lib/mri/bundler/vendor/thor/lib/thor/base.rb:485:in start' /Users/novoi/.rubies/truffleruby-dev/lib/mri/bundler/cli.rb:25:in start'
/Users/novoi/.rubies/truffleruby-dev/lib/gems/gems/bundler-2.2.32/libexec/bundle:49:in block in <top (required)>' /Users/novoi/.rubies/truffleruby-dev/lib/mri/bundler/friendly_errors.rb:103:in with_friendly_errors'
/Users/novoi/.rubies/truffleruby-dev/lib/gems/gems/bundler-2.2.32/libexec/bundle:37:in <top (required)>' <internal:core> core/kernel.rb:376:in load'
internal:core core/kernel.rb:376:in load' /Users/novoi/.rubies/truffleruby-dev/bin/bundle:42:in

'

Environment

Bundler 2.2.32
Platforms ruby
Ruby 3.0.3p0 (2022-11-05 revision 62726e2) [x86_64-darwin19]
Full Path /Users/novoi/.rubies/truffleruby-dev/bin/ruby
Config Dir /Users/runner/work/truffleruby-dev-builder/truffleruby-dev-builder/etc
RubyGems 3.2.32
Gem Home /Users/novoi/.rubies/truffleruby-dev/lib/gems
Gem Path /Users/novoi/.gem/truffleruby/3.0.3.14:/Users/novoi/.rubies/truffleruby-dev/lib/gems
User Home /Users/novoi
User Path /Users/novoi/.gem/truffleruby/3.0.3.14
Bin Dir /Users/novoi/.rubies/truffleruby-dev/bin
OpenSSL
Compiled OpenSSL 1.1.1n 15 Mar 2022
Loaded OpenSSL 1.1.1n 15 Mar 2022
Cert File /usr/local/etc/[email protected]/cert.pem
Cert Dir /usr/local/etc/[email protected]/certs
Tools
Git 2.24.3 (Apple Git-128)
RVM not installed
rbenv not installed
chruby Applied /Users/novoi/Library/bashrc.d/000.keep.sh
Applied /Users/novoi/Library/bashrc.d/001.print-date-time.sh
Applied /Users/novoi/Library/bashrc.d/002.add-aws-cli.sh

Gem.ruby /Users/novoi/.rubies/truffleruby-dev/bin/ruby
bundle #! /usr/bin/env bash

Bundler Build Metadata

Built At 2022-11-08
Git SHA unknown
Released Version false

Bundler settings

build.rugged
Set for the current user (/Users/novoi/.bundle/config): "--use-system-libraries"

Gemfile

Gemfile

source :rubygems

gem 'activesupport'
gem 'httpclient'
gem 'mechanize'
gem 'hashie'
gem 'rasn1'

gem 'iconv'
gem 'seven_zip_ruby'

gem 'sqlite3'

Gemfile.lock

GEM
remote: http://rubygems.org/
specs:
activesupport (7.0.4)
concurrent-ruby (> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (
> 2.0)
addressable (2.8.1)
public_suffix (>= 2.0.2, < 6.0)
concurrent-ruby (1.1.10)
connection_pool (2.3.0)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
hashie (5.0.0)
http-cookie (1.0.5)
domain_name (> 0.5)
httpclient (2.8.3)
i18n (1.12.0)
concurrent-ruby (
> 1.0)
iconv (1.0.8)
mechanize (2.8.5)
addressable (> 2.8)
domain_name (
> 0.5, >= 0.5.20190701)
http-cookie (> 1.0, >= 1.0.3)
mime-types (
> 3.0)
net-http-digest_auth (> 1.4, >= 1.4.1)
net-http-persistent (>= 2.5.2, < 5.0.dev)
nokogiri (
> 1.11, >= 1.11.2)
rubyntlm (> 0.6, >= 0.6.3)
webrick (
> 1.7)
webrobots (> 0.1.2)
mime-types (3.4.1)
mime-types-data (
> 3.2015)
mime-types-data (3.2022.0105)
minitest (5.16.3)
net-http-digest_auth (1.4.1)
net-http-persistent (4.0.1)
connection_pool (> 2.2)
nokogiri (1.13.9-x86_64-linux)
racc (
> 1.4)
public_suffix (5.0.0)
racc (1.6.0)
rasn1 (0.11.0)
rubyntlm (0.6.3)
sequel (5.62.0)
seven_zip_ruby (1.3.0)
sqlite3 (1.5.3-x86_64-linux)
tzinfo (2.0.5)
concurrent-ruby (~> 1.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.8.2)
webrick (1.7.0)
webrobots (0.1.2)

PLATFORMS
x86_64-linux

DEPENDENCIES
activesupport
hashie
httpclient
iconv
mechanize
rasn1
sequel
seven_zip_ruby
sqlite3

BUNDLED WITH
2.3.23

--- TEMPLATE END ----------------------------------------------------------------

Unfortunately, an unexpected error occurred, and Bundler cannot continue.

First, try this link to see if there are any existing issue reports for this error:
https://github.com/rubygems/rubygems/search?q=undefined+method+%60full_name%27+for+nil+NilClass&type=Issues

If there aren't any reports for this error yet, please fill in the new issue form located at https://github.com/rubygems/rubygems/issues/new?labels=Bundler&template=bundler-related-issue.md, and copy and paste the report template above in there.

Interestingly, I dont understand how chruby involves into it:

Installing seven_zip_ruby 1.3.0 with native extensions
zsh:1: command not found: chruby

@brauliobo
Copy link
Contributor Author

It might be related to this bundle config:

✗  cat .bundle/config 
---
BUNDLE_JOBS: 5

@gogainda
Copy link
Contributor

@brauliobo essentially deleting of the old Gemfile.lock should help here

@brauliobo
Copy link
Contributor Author

@brauliobo essentially deleting of the old Gemfile.lock should help here

indeed @gogainda

now it is failing to require it:

/home/braulio/.rvm/gems/truffleruby-22.3.0/gems/seven_zip_ruby-1.3.0/lib/seven_zip_ruby.rb:26:in `<top (required)>': Failed to initialize SevenZipRuby (RuntimeError)
        from <internal:core> core/kernel.rb:234:in `gem_original_require'
        from script.rb:8:in `<main>

@eregon
Copy link
Member

eregon commented Nov 16, 2022

Indeed, that can be reproduced with:

$ gem i seven_zip_ruby
Fetching seven_zip_ruby-1.3.0.gem
Building native extensions. This could take a while...
Successfully installed seven_zip_ruby-1.3.0
1 gem installed

$ruby -w -rseven_zip_ruby -e0
7z library is not found.
/home/eregon/.rubies/truffleruby-dev/lib/gems/gems/seven_zip_ruby-1.3.0/lib/seven_zip_ruby.rb:26:in `<top (required)>': Failed to initialize SevenZipRuby (RuntimeError)
	from <internal:core> core/kernel.rb:234:in `gem_original_require'
	from <internal:/home/eregon/.rubies/truffleruby-dev/lib/mri/rubygems/core_ext/kernel_require.rb>:160:in `require'
	from <internal:core> core/unbound_method.rb:18:in `bind_call'
	from <internal:core> core/kernel.rb:272:in `require'
<internal:core> core/kernel.rb:236:in `gem_original_require': cannot load such file -- seven_zip_ruby (LoadError)
	from <internal:/home/eregon/.rubies/truffleruby-dev/lib/mri/rubygems/core_ext/kernel_require.rb>:85:in `require'
	from <internal:core> core/unbound_method.rb:18:in `bind_call'
	from <internal:core> core/kernel.rb:272:in `require'

which means the dlopen of 7z.so fails for some reason (Sulong/NFI issue maybe? The file does exist).

@andrykonchin
Copy link
Member

Still reproduce it on TruffleRuby 24.0.0:

$ ruby -v
truffleruby 24.0.0, like ruby 3.2.2, Oracle GraalVM Native [x86_64-darwin]

$ truffleruby-gems-to-test ruby -w -rseven_zip_ruby -e0
/Users/andrykonchin/.rbenv/versions/truffleruby-24.0.0/lib/gems/gems/seven_zip_ruby-1.3.0/lib/seven_zip_ruby.rb:12:in `find_external_lib_dir': Failed to find 7z.dll or 7z.so (RuntimeError)
	from /Users/andrykonchin/.rbenv/versions/truffleruby-24.0.0/lib/gems/gems/seven_zip_ruby-1.3.0/lib/seven_zip_ruby.rb:17:in `<module:SevenZipRuby>'
	from /Users/andrykonchin/.rbenv/versions/truffleruby-24.0.0/lib/gems/gems/seven_zip_ruby-1.3.0/lib/seven_zip_ruby.rb:5:in `<top (required)>'
	from <internal:core> core/kernel.rb:229:in `gem_original_require'
	from <internal:/Users/andrykonchin/.rbenv/versions/truffleruby-24.0.0/lib/mri/rubygems/core_ext/kernel_require.rb>:159:in `require'
	from <internal:core> core/unbound_method.rb:18:in `bind_call'
	from <internal:core> core/kernel.rb:267:in `require'
<internal:core> core/kernel.rb:231:in `gem_original_require': cannot load such file -- seven_zip_ruby (LoadError)
	from <internal:/Users/andrykonchin/.rbenv/versions/truffleruby-24.0.0/lib/mri/rubygems/core_ext/kernel_require.rb>:85:in `require'
	from <internal:core> core/unbound_method.rb:18:in `bind_call'
	from <internal:core> core/kernel.rb:267:in `require'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants