Skip to content

Bundle install error with v19.1 #245

@millenc

Description

@millenc

After updating to the v19.1 version, doing bundle install fails with the following error:

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

    current directory: /code/vendor/bundle/ruby/3.2.0/gems/nkf-0.2.0/ext/nkf
/usr/bin/ruby3.2 -I/usr/lib/ruby/vendor_ruby extconf.rb
creating Makefile

current directory: /code/vendor/bundle/ruby/3.2.0/gems/nkf-0.2.0/ext/nkf
make DESTDIR\= sitearchdir\=./.gem.20250916-13-ru3zfl sitelibdir\=./.gem.20250916-13-ru3zfl clean

current directory: /code/vendor/bundle/ruby/3.2.0/gems/nkf-0.2.0/ext/nkf
make DESTDIR\= sitearchdir\=./.gem.20250916-13-ru3zfl sitelibdir\=./.gem.20250916-13-ru3zfl
compiling nkf.c
make: x86_64-linux-gnu-gcc: No such file or directory
make: *** [Makefile:248: nkf.o] Error 127

make failed, exit code 2

Gem files will remain installed in /code/vendor/bundle/ruby/3.2.0/gems/nkf-0.2.0 for inspection.
Results logged to /code/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux-gnu/3.2.0/nkf-0.2.0/gem_make.out

  /usr/lib/ruby/vendor_ruby/rubygems/ext/builder.rb:119:in `run'
  /usr/lib/ruby/vendor_ruby/rubygems/ext/builder.rb:53:in `block in make'
  /usr/lib/ruby/vendor_ruby/rubygems/ext/builder.rb:45:in `each'
  /usr/lib/ruby/vendor_ruby/rubygems/ext/builder.rb:45:in `make'
  /usr/lib/ruby/vendor_ruby/rubygems/ext/ext_conf_builder.rb:42:in `build'
  /usr/lib/ruby/vendor_ruby/rubygems/ext/builder.rb:187:in `build_extension'
  /usr/lib/ruby/vendor_ruby/rubygems/ext/builder.rb:221:in `block in build_extensions'
  /usr/lib/ruby/vendor_ruby/rubygems/ext/builder.rb:218:in `each'
  /usr/lib/ruby/vendor_ruby/rubygems/ext/builder.rb:218:in `build_extensions'
  /usr/lib/ruby/vendor_ruby/rubygems/installer.rb:844:in `build_extensions'
  /code/vendor/bundle/ruby/3.2.0/gems/bundler-2.3.19/lib/bundler/rubygems_gem_installer.rb:72:in `build_extensions'
  /code/vendor/bundle/ruby/3.2.0/gems/bundler-2.3.19/lib/bundler/rubygems_gem_installer.rb:28:in `install'
  /code/vendor/bundle/ruby/3.2.0/gems/bundler-2.3.19/lib/bundler/source/rubygems.rb:207:in `install'
  /code/vendor/bundle/ruby/3.2.0/gems/bundler-2.3.19/lib/bundler/installer/gem_installer.rb:54:in `install'
  /code/vendor/bundle/ruby/3.2.0/gems/bundler-2.3.19/lib/bundler/installer/gem_installer.rb:16:in `install_from_spec'
  /code/vendor/bundle/ruby/3.2.0/gems/bundler-2.3.19/lib/bundler/installer/parallel_installer.rb:186:in `do_install'
  /code/vendor/bundle/ruby/3.2.0/gems/bundler-2.3.19/lib/bundler/installer/parallel_installer.rb:177:in `block in worker_pool'
  /code/vendor/bundle/ruby/3.2.0/gems/bundler-2.3.19/lib/bundler/worker.rb:62:in `apply_func'
  /code/vendor/bundle/ruby/3.2.0/gems/bundler-2.3.19/lib/bundler/worker.rb:57:in `block in process_queue'
  /code/vendor/bundle/ruby/3.2.0/gems/bundler-2.3.19/lib/bundler/worker.rb:54:in `loop'
  /code/vendor/bundle/ruby/3.2.0/gems/bundler-2.3.19/lib/bundler/worker.rb:54:in `process_queue'
  /code/vendor/bundle/ruby/3.2.0/gems/bundler-2.3.19/lib/bundler/worker.rb:91:in `block (2 levels) in create_threads'

An error occurred while installing nkf (0.2.0), and Bundler cannot continue.

In Gemfile:
  cocoapods was resolved to 1.15.2, which depends on
    xcodeproj was resolved to 1.25.0, which depends on
      CFPropertyList was resolved to 3.0.7, which depends on
        nkf

Doing the same on the v19.0 version works properly and all gems are compiled/installed. Somehow the change introduced on v19.1 that downgrades gcc is not working as expected (see release notes):

This minor release restores the gcc version that was used inside v18.0 for backward compatibility.

changes gcc from gcc 13 to gcc-11 by @jabbas in #244

considering the following error on the logs:

make: x86_64-linux-gnu-gcc: No such file or directory

For reference, my Gemfile looks like this:

source 'https://rubygems.org'

# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
ruby ">= 2.6.10"

# Cocoapods 1.15 introduced a bug which break the build. We will remove the upper
# bound in the template on Cocoapods with next React Native release.
gem 'cocoapods', '=1.15.2'
gem 'activesupport', '=6.1.7.6'
gem "fastlane"

plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
eval_gemfile(plugins_path) if File.exist?(plugins_path)

For now, I've fixed this by pining the image version to v19.0 but a more permanent solution would be appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions