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
Lock sqlite3 gem to 1.4 to run Rails CI using rubylang/ruby:master-nightly-focal #46711
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ghtly-focal Managed to reproduce https://buildkite.com/rails/rails/builds/90045#01839e89-85d4-4ef5-a443-6b2993f08f36 - Steps to reproduce Install Docker ``` git clone https://github.com/rails/rails cd rails git clone https://github.com/rails/buildkite-config .buildkite/ RUBY_IMAGE=rubylang/ruby:master-nightly-focal docker-compose -f .buildkite/docker-compose.yml build base ``` - Actual behavior without this change It gets `Gem::Ext::BuildError: ERROR: Failed to build gem native extension.` The entire error message can be seen via https://buildkite.com/rails/rails/builds/90045#01839e89-85d4-4ef5-a443-6b2993f08f36 - Why sqlite gem version is locked to 1.4? The last successful build installed `sqlite3 1.5.1`. however now it cannot install 1.5.1, 1.5.0 anymore. https://buildkite.com/rails/rails/builds/90006#01839032-3ccd-4aca-ad58-2c08beb4351f/142-862 I still have not found the actual reason why. I've just found a related issue https://bugs.ruby-lang.org/issues/19189
yahonda
added a commit
to yahonda/buildkite-config
that referenced
this pull request
Dec 13, 2022
"rubylang/ruby:latest" actually runs the latest released version of Ruby like 3.1.3 Once rails/rails#46711 has been merged to Rails main branch, "rubylang/ruby:master-nightly-focal" can proceed Rails CI to test Rails against Ruby 3.2.dev
Opened rails/buildkite-config#24 to use |
I have identified ruby/ruby@7f1ca66 triggers this behavior change.
It gets current directory:
/opt/ruby/lib/ruby/gems/3.2.0+2/gems/sqlite3-1.5.4/ext/sqlite3
/opt/ruby/bin/ruby -I /opt/ruby/lib/ruby/3.2.0+2 extconf.rb
Ignoring debug-1.6.2 because its extensions are not built. Try: gem pristine
debug --version 1.6.2
Building sqlite3-ruby using packaged sqlite3.
Extracting sqlite-autoconf-3400000.tar.gz into
tmp/x86_64-linux-gnu/ports/sqlite3/3.40.0... OK
Running 'configure' for sqlite3 3.40.0... OK
Running 'compile' for sqlite3 3.40.0... OK
Running 'install' for sqlite3 3.40.0... OK
Activating sqlite3 3.40.0 (from
/opt/ruby/lib/ruby/gems/3.2.0+2/gems/sqlite3-1.5.4/ports/x86_64-linux-gnu/sqlite3/3.40.0)...
Could not configure the build properly (pkg_config). Please install either the
`pkg-config` utility or the `pkg-config` rubygem.
*** 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=/opt/ruby/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
--with-sqlite-source-dir
--with-/opt/ruby/lib/ruby/gems/3.2.0+2/gems/sqlite3-1.5.4/ports/x86_64-linux-gnu/sqlite3/3.40.0/lib/pkgconfig/sqlite3.pc-dir
--without-/opt/ruby/lib/ruby/gems/3.2.0+2/gems/sqlite3-1.5.4/ports/x86_64-linux-gnu/sqlite3/3.40.0/lib/pkgconfig/sqlite3.pc-dir
--with-/opt/ruby/lib/ruby/gems/3.2.0+2/gems/sqlite3-1.5.4/ports/x86_64-linux-gnu/sqlite3/3.40.0/lib/pkgconfig/sqlite3.pc-include
--without-/opt/ruby/lib/ruby/gems/3.2.0+2/gems/sqlite3-1.5.4/ports/x86_64-linux-gnu/sqlite3/3.40.0/lib/pkgconfig/sqlite3.pc-include=${/opt/ruby/lib/ruby/gems/3.2.0+2/gems/sqlite3-1.5.4/ports/x86_64-linux-gnu/sqlite3/3.40.0/lib/pkgconfig/sqlite3.pc-dir}/include
--with-/opt/ruby/lib/ruby/gems/3.2.0+2/gems/sqlite3-1.5.4/ports/x86_64-linux-gnu/sqlite3/3.40.0/lib/pkgconfig/sqlite3.pc-lib
--without-/opt/ruby/lib/ruby/gems/3.2.0+2/gems/sqlite3-1.5.4/ports/x86_64-linux-gnu/sqlite3/3.40.0/lib/pkgconfig/sqlite3.pc-lib=${/opt/ruby/lib/ruby/gems/3.2.0+2/gems/sqlite3-1.5.4/ports/x86_64-linux-gnu/sqlite3/3.40.0/lib/pkgconfig/sqlite3.pc-dir}/lib
--with-/opt/ruby/lib/ruby/gems/3.2.0+2/gems/sqlite3-1.5.4/ports/x86_64-linux-gnu/sqlite3/3.40.0/lib/pkgconfig/sqlite3.pc-config
--without-/opt/ruby/lib/ruby/gems/3.2.0+2/gems/sqlite3-1.5.4/ports/x86_64-linux-gnu/sqlite3/3.40.0/lib/pkgconfig/sqlite3.pc-config
--with-pkg-config
--without-pkg-config
To see why this extension failed to compile, please check the mkmf.log which can
be found here:
/opt/ruby/lib/ruby/gems/3.2.0+2/extensions/x86_64-linux/3.2.0+2/sqlite3-1.5.4/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in
/opt/ruby/lib/ruby/gems/3.2.0+2/gems/sqlite3-1.5.4 for inspection.
Results logged to
/opt/ruby/lib/ruby/gems/3.2.0+2/extensions/x86_64-linux/3.2.0+2/sqlite3-1.5.4/gem_make.out
/opt/ruby/lib/ruby/3.2.0+2/rubygems/ext/builder.rb:102:in `run'
/opt/ruby/lib/ruby/3.2.0+2/rubygems/ext/ext_conf_builder.rb:28:in `build'
/opt/ruby/lib/ruby/3.2.0+2/rubygems/ext/builder.rb:171:in `build_extension'
/opt/ruby/lib/ruby/3.2.0+2/rubygems/ext/builder.rb:205:in `block in
build_extensions'
/opt/ruby/lib/ruby/3.2.0+2/rubygems/ext/builder.rb:202:in `each'
/opt/ruby/lib/ruby/3.2.0+2/rubygems/ext/builder.rb:202:in `build_extensions'
/opt/ruby/lib/ruby/3.2.0+2/rubygems/installer.rb:843:in `build_extensions'
/opt/ruby/lib/ruby/3.2.0+2/bundler/rubygems_gem_installer.rb:72:in
`build_extensions'
/opt/ruby/lib/ruby/3.2.0+2/bundler/rubygems_gem_installer.rb:28:in `install'
/opt/ruby/lib/ruby/3.2.0+2/bundler/source/rubygems.rb:202:in `install'
/opt/ruby/lib/ruby/3.2.0+2/bundler/installer/gem_installer.rb:54:in `install'
/opt/ruby/lib/ruby/3.2.0+2/bundler/installer/gem_installer.rb:16:in
`install_from_spec'
/opt/ruby/lib/ruby/3.2.0+2/bundler/installer/parallel_installer.rb:186:in
`do_install'
/opt/ruby/lib/ruby/3.2.0+2/bundler/installer/parallel_installer.rb:177:in
`block in worker_pool'
/opt/ruby/lib/ruby/3.2.0+2/bundler/worker.rb:62:in `apply_func'
/opt/ruby/lib/ruby/3.2.0+2/bundler/worker.rb:57:in `block in process_queue'
/opt/ruby/lib/ruby/3.2.0+2/bundler/worker.rb:54:in `loop'
/opt/ruby/lib/ruby/3.2.0+2/bundler/worker.rb:54:in `process_queue'
/opt/ruby/lib/ruby/3.2.0+2/bundler/worker.rb:91:in `block (2 levels) in
create_threads'
An error occurred while installing sqlite3 (1.5.4), and Bundler cannot continue.
In Gemfile:
sqlite3
The command '/bin/sh -c rm -f railties/exe/.empty && find railties/exe -maxdepth 0 -type d -empty -exec rmdir '{}' '+' && echo "--- :bundler: Installing Ruby deps" && (cd tmp && for f in *.gemspec; do d="$(basename -s.gemspec "$f")"; mkdir -p "../$d" && mv "$f" "../$d/"; done) && rm Gemfile.lock && bundle install -j 8 && cp Gemfile.lock tmp/Gemfile.lock.updated && rm -rf /usr/local/bundle/cache && echo "--- :floppy_disk: Copying repository contents"' returned a non-zero code: 5
ERROR: Service 'base' failed to build : Build failed
$ |
yahonda
added a commit
to yahonda/rails
that referenced
this pull request
Dec 13, 2022
This commit locks sqlite3 gem version to 1.4 to run bug report templates using rubylang/ruby:master-nightly-focal This issue does not reproduce Ruby 3.2.0dev installed locally. It reproduces at Rails CI environment that runs Ruby using Docker. https://buildkite.com/rails/rails/builds/91635#01850c57-922e-4bac-a083-732715667640 ``` Installing sqlite3 1.5.4 with native extensions /usr/local/lib/ruby/3.2.0+3/bundler/installer/parallel_installer.rb:220:in `handle_error': Gem::Ext::BuildError: ERROR: Failed to build gem native extension. (Bundler::InstallError) current directory: /usr/local/lib/ruby/gems/3.2.0+3/gems/sqlite3-1.5.4/ext/sqlite3 /usr/local/bin/ruby -I /usr/local/lib/ruby/3.2.0+3 extconf.rb Building sqlite3-ruby using packaged sqlite3. Extracting sqlite-autoconf-3400000.tar.gz into tmp/x86_64-linux-gnu/ports/sqlite3/3.40.0... OK Running 'configure' for sqlite3 3.40.0... OK Running 'compile' for sqlite3 3.40.0... OK Running 'install' for sqlite3 3.40.0... OK Activating sqlite3 3.40.0 (from /usr/local/lib/ruby/gems/3.2.0+3/gems/sqlite3-1.5.4/ports/x86_64-linux-gnu/sqlite3/3.40.0)... Could not configure the build properly (pkg_config). Please install either the `pkg-config` utility or the `pkg-config` rubygem. *** 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. ``` Related to rails#46711
4 tasks
atosbucket
added a commit
to atosbucket/rails-buildkit
that referenced
this pull request
Mar 22, 2024
"rubylang/ruby:latest" actually runs the latest released version of Ruby like 3.1.3 Once rails/rails#46711 has been merged to Rails main branch, "rubylang/ruby:master-nightly-focal" can proceed Rails CI to test Rails against Ruby 3.2.dev
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation / Background
I have managed to reproduce https://buildkite.com/rails/rails/builds/90045#01839e89-85d4-4ef5-a443-6b2993f08f36
Detail
It gets
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
The entire error message can be seen via
https://buildkite.com/rails/rails/builds/90045#01839e89-85d4-4ef5-a443-6b2993f08f36
Additional information
The last successful build installed
sqlite3 1.5.1
. however, now it cannot install 1.5.1, 1.5.0 anymore.https://buildkite.com/rails/rails/builds/90006#01839032-3ccd-4aca-ad58-2c08beb4351f/142-862
I still have not found the actual reason why. I've just found a related issue https://bugs.ruby-lang.org/issues/19189
Checklist
Before submitting the PR make sure the following are checked:
[Fix #issue-number]