Skip to content

Native version doesn't build since version 1.6.6 and Ruby 3.1.4 #411

@sirux88

Description

@sirux88

When trying to use the native version e.g. gem 'sqlite3', force_ruby_platform: true' in gemfile the build is not successfull.

Steps to reproduce:

  • install ruby v3.1.4
  • try to run gem install sqlite3:1.6.6 --platform=ruby

results in

Details

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /home/matthias/PasswordPusher/tmp/bundle/ruby/3.1.0/gems/sqlite3-1.6.6/ext/sqlite3
/usr/local/rvm/rubies/ruby-3.1.4/bin/ruby -I /usr/local/rvm/rubies/ruby-3.1.4/lib/ruby/3.1.0 extconf.rb
Building sqlite3-ruby using packaged sqlite3.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=/usr/local/rvm/rubies/ruby-3.1.4/bin/$(RUBY_BASE_NAME)
        --help
        --download-dependencies
        --with-sqlcipher
        --without-sqlcipher
        --with-sqlcipher-dir
        --without-sqlcipher-dir
        --with-sqlcipher-include
        --without-sqlcipher-include
        --with-sqlcipher-lib
        --without-sqlcipher-lib
        --enable-system-libraries
        --disable-system-libraries
        --with-sqlcipher
        --without-sqlcipher
        --with-sqlcipher-dir
        --without-sqlcipher-dir
        --with-sqlcipher-include
        --without-sqlcipher-include
        --with-sqlcipher-lib
        --without-sqlcipher-lib
/usr/local/rvm/rubies/ruby-3.1.4/lib/ruby/3.1.0/psych.rb:455:in `parse_stream': undefined method `parse' for #<Psych::Parser:0x00007f39c70342a8 @handler=#<Psych::Handlers::DocumentStream:0x00007f39c70343c0 @stack=[], @last=nil, @root=nil, @start_line=nil, @start_column=nil,
@end_line=nil, @end_column=nil, @block=#<Proc:0x00007f39c70342f8 /usr/local/rvm/rubies/ruby-3.1.4/lib/ruby/3.1.0/psych.rb:399>>, @external_encoding=0> (NoMethodError)

      parser.parse yaml, filename
            ^^^^^^
        from /usr/local/rvm/rubies/ruby-3.1.4/lib/ruby/3.1.0/psych.rb:399:in `parse'
        from /usr/local/rvm/rubies/ruby-3.1.4/lib/ruby/3.1.0/psych.rb:323:in `safe_load'
        from /usr/local/rvm/rubies/ruby-3.1.4/lib/ruby/3.1.0/psych.rb:369:in `load'
        from /usr/local/rvm/rubies/ruby-3.1.4/lib/ruby/3.1.0/psych.rb:671:in `block in load_file'
        from /usr/local/rvm/rubies/ruby-3.1.4/lib/ruby/3.1.0/psych.rb:670:in `open'
        from /usr/local/rvm/rubies/ruby-3.1.4/lib/ruby/3.1.0/psych.rb:670:in `load_file'
        from extconf.rb:157:in `mini_portile_config'
        from extconf.rb:152:in `sqlite3_config'
        from extconf.rb:136:in `minimal_recipe'
        from extconf.rb:51:in `configure_packaged_libraries'
        from extconf.rb:17:in `configure'
        from extconf.rb:280:in `<main>'

extconf failed, exit code 1

Gem files will remain installed in /home/matthias/PasswordPusher/tmp/bundle/ruby/3.1.0/gems/sqlite3-1.6.6 for inspection.
Results logged to /home/matthias/PasswordPusher/tmp/bundle/ruby/3.1.0/extensions/x86_64-linux/3.1.0/sqlite3-1.6.6/gem_make.out

  /usr/local/rvm/rubies/ruby-3.1.4/lib/ruby/3.1.0/rubygems/ext/builder.rb:102:in `run'
  /usr/local/rvm/rubies/ruby-3.1.4/lib/ruby/3.1.0/rubygems/ext/ext_conf_builder.rb:28:in `build'
  /usr/local/rvm/rubies/ruby-3.1.4/lib/ruby/3.1.0/rubygems/ext/builder.rb:171:in `build_extension'
  /usr/local/rvm/rubies/ruby-3.1.4/lib/ruby/3.1.0/rubygems/ext/builder.rb:205:in `block in build_extensions'
  /usr/local/rvm/rubies/ruby-3.1.4/lib/ruby/3.1.0/rubygems/ext/builder.rb:202:in `each'
  /usr/local/rvm/rubies/ruby-3.1.4/lib/ruby/3.1.0/rubygems/ext/builder.rb:202:in `build_extensions'
  /usr/local/rvm/rubies/ruby-3.1.4/lib/ruby/3.1.0/rubygems/installer.rb:843:in `build_extensions'
  /usr/local/rvm/gems/ruby-3.1.4/gems/bundler-2.4.18/lib/bundler/rubygems_gem_installer.rb:72:in `build_extensions'
  /usr/local/rvm/gems/ruby-3.1.4/gems/bundler-2.4.18/lib/bundler/rubygems_gem_installer.rb:28:in `install'
  /usr/local/rvm/gems/ruby-3.1.4/gems/bundler-2.4.18/lib/bundler/source/rubygems.rb:202:in `install'
  /usr/local/rvm/gems/ruby-3.1.4/gems/bundler-2.4.18/lib/bundler/installer/gem_installer.rb:54:in `install'
  /usr/local/rvm/gems/ruby-3.1.4/gems/bundler-2.4.18/lib/bundler/installer/gem_installer.rb:16:in `install_from_spec'
  /usr/local/rvm/gems/ruby-3.1.4/gems/bundler-2.4.18/lib/bundler/installer/parallel_installer.rb:156:in `do_install'
  /usr/local/rvm/gems/ruby-3.1.4/gems/bundler-2.4.18/lib/bundler/installer/parallel_installer.rb:147:in `block in worker_pool'
  /usr/local/rvm/gems/ruby-3.1.4/gems/bundler-2.4.18/lib/bundler/worker.rb:62:in `apply_func'
  /usr/local/rvm/gems/ruby-3.1.4/gems/bundler-2.4.18/lib/bundler/worker.rb:57:in `block in process_queue'
  /usr/local/rvm/gems/ruby-3.1.4/gems/bundler-2.4.18/lib/bundler/worker.rb:54:in `loop'
  /usr/local/rvm/gems/ruby-3.1.4/gems/bundler-2.4.18/lib/bundler/worker.rb:54:in `process_queue'
  /usr/local/rvm/gems/ruby-3.1.4/gems/bundler-2.4.18/lib/bundler/worker.rb:90:in `block (2 levels) in create_threads'

An error occurred while installing sqlite3 (1.6.6), and Bundler cannot continue.

In Gemfile:
  sqlite3

I did some testing and it seems this is tied to psych version >4.0.x

Two sidemarks:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions