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

Ruby 3.1 compatibility issue #95

Open
issei-m opened this issue Jan 12, 2022 · 5 comments
Open

Ruby 3.1 compatibility issue #95

issei-m opened this issue Jan 12, 2022 · 5 comments

Comments

@issei-m
Copy link

issei-m commented Jan 12, 2022

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

    current directory: /usr/local/bundle/gems/ruby-debug-ide-0.7.3/ext
/usr/local/bin/ruby mkrf_conf.rb
Installing base gem
Building native extensions. This could take a while...
Building native extensions. This could take a while...
ERROR: Failed to build gem native extension.

    current directory: /usr/local/bundle/gems/debase-0.2.5.beta2/ext/attach
/usr/local/bin/ruby -I /usr/local/lib/ruby/3.1.0 -r
./siteconf20220112-382-pmxiu2.rb extconf.rb
checking for vm_core.h... *** 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/bin/$(RUBY_BASE_NAME)
	--with-ruby-dir
	--without-ruby-dir
	--with-ruby-include
	--without-ruby-include=${ruby-dir}/include
	--with-ruby-lib
	--without-ruby-lib=${ruby-dir}/lib
	--with-vm_core-dir
	--without-vm_core-dir
	--with-vm_core-include
	--without-vm_core-include=${vm_core-dir}/include
	--with-vm_core-lib
	--without-vm_core-lib=${vm_core-dir}/lib
/usr/local/lib/ruby/3.1.0/mkmf.rb:498:in `try_do': The compiler failed to
generate an executable file. (RuntimeError)
You have to install development tools first.
	from /usr/local/lib/ruby/3.1.0/mkmf.rb:624:in `block in try_compile'
	from /usr/local/lib/ruby/3.1.0/mkmf.rb:573:in `with_werror'
	from /usr/local/lib/ruby/3.1.0/mkmf.rb:624:in `try_compile'
	from /usr/local/lib/ruby/3.1.0/mkmf.rb:1160:in `block in have_header'
	from /usr/local/lib/ruby/3.1.0/mkmf.rb:1007:in `block in checking_for'
	from /usr/local/lib/ruby/3.1.0/mkmf.rb:362:in `block (2 levels) in postpone'
	from /usr/local/lib/ruby/3.1.0/mkmf.rb:332:in `open'
	from /usr/local/lib/ruby/3.1.0/mkmf.rb:362:in `block in postpone'
	from /usr/local/lib/ruby/3.1.0/mkmf.rb:332:in `open'
	from /usr/local/lib/ruby/3.1.0/mkmf.rb:358:in `postpone'
	from /usr/local/lib/ruby/3.1.0/mkmf.rb:1006:in `checking_for'
	from /usr/local/lib/ruby/3.1.0/mkmf.rb:1159:in `have_header'
	from extconf.rb:31:in `block in <main>'
from
/usr/local/bundle/gems/debase-ruby_core_source-0.10.14/lib/debase/ruby_core_source.rb:15:in
`create_makefile_with_core'
	from extconf.rb:49:in `<main>'

extconf failed, exit code 1

Gem files will remain installed in /usr/local/bundle/gems/debase-0.2.5.beta2 for
inspection.
Results logged to
/usr/local/bundle/extensions/x86_64-linux-musl/3.1.0/debase-0.2.5.beta2/gem_make.out
/usr/local/lib/ruby/3.1.0/rubygems/ext/builder.rb:95:in `run'
/usr/local/lib/ruby/3.1.0/rubygems/ext/ext_conf_builder.rb:47:in `block in
build'
  /usr/local/lib/ruby/3.1.0/tempfile.rb:317:in `open'
  /usr/local/lib/ruby/3.1.0/rubygems/ext/ext_conf_builder.rb:26:in `build'
  /usr/local/lib/ruby/3.1.0/rubygems/ext/builder.rb:161:in `build_extension'
/usr/local/lib/ruby/3.1.0/rubygems/ext/builder.rb:195:in `block in
build_extensions'
  /usr/local/lib/ruby/3.1.0/rubygems/ext/builder.rb:192:in `each'
  /usr/local/lib/ruby/3.1.0/rubygems/ext/builder.rb:192:in `build_extensions'
  /usr/local/lib/ruby/3.1.0/rubygems/installer.rb:847:in `build_extensions'
  /usr/local/lib/ruby/3.1.0/rubygems/installer.rb:318:in `install'
  /usr/local/lib/ruby/3.1.0/rubygems/resolver/specification.rb:104:in `install'
/usr/local/lib/ruby/3.1.0/rubygems/request_set.rb:279:in `block in
install_into'
  /usr/local/lib/ruby/3.1.0/rubygems/request_set.rb:271:in `each'
  /usr/local/lib/ruby/3.1.0/rubygems/request_set.rb:271:in `install_into'
  /usr/local/lib/ruby/3.1.0/rubygems/request_set.rb:147:in `install'
  /usr/local/lib/ruby/3.1.0/rubygems/dependency_installer.rb:252:in `install'
  mkrf_conf.rb:31:in `rescue in <main>'
  mkrf_conf.rb:24:in `<main>'

rake failed, exit code 1

Gem files will remain installed in /usr/local/bundle/gems/ruby-debug-ide-0.7.3
for inspection.
Results logged to
/usr/local/bundle/extensions/x86_64-linux-musl/3.1.0/ruby-debug-ide-0.7.3/gem_make.out

  /usr/local/lib/ruby/3.1.0/rubygems/ext/builder.rb:95:in `run'
  /usr/local/lib/ruby/3.1.0/rubygems/ext/rake_builder.rb:11:in `build'
  /usr/local/lib/ruby/3.1.0/rubygems/ext/builder.rb:161:in `build_extension'
/usr/local/lib/ruby/3.1.0/rubygems/ext/builder.rb:195:in `block in
build_extensions'
  /usr/local/lib/ruby/3.1.0/rubygems/ext/builder.rb:192:in `each'
  /usr/local/lib/ruby/3.1.0/rubygems/ext/builder.rb:192:in `build_extensions'
  /usr/local/lib/ruby/3.1.0/rubygems/installer.rb:847:in `build_extensions'
/usr/local/bundle/gems/bundler-2.2.32/lib/bundler/rubygems_gem_installer.rb:71:in
`build_extensions'
/usr/local/bundle/gems/bundler-2.2.32/lib/bundler/rubygems_gem_installer.rb:28:in
`install'
/usr/local/bundle/gems/bundler-2.2.32/lib/bundler/source/rubygems.rb:200:in
`install'
/usr/local/bundle/gems/bundler-2.2.32/lib/bundler/installer/gem_installer.rb:54:in
`install'
/usr/local/bundle/gems/bundler-2.2.32/lib/bundler/installer/gem_installer.rb:16:in
`install_from_spec'
/usr/local/bundle/gems/bundler-2.2.32/lib/bundler/installer/parallel_installer.rb:186:in
`do_install'
/usr/local/bundle/gems/bundler-2.2.32/lib/bundler/installer/parallel_installer.rb:177:in
`block in worker_pool'
  /usr/local/bundle/gems/bundler-2.2.32/lib/bundler/worker.rb:62:in `apply_func'
/usr/local/bundle/gems/bundler-2.2.32/lib/bundler/worker.rb:57:in `block in
process_queue'
  /usr/local/bundle/gems/bundler-2.2.32/lib/bundler/worker.rb:54:in `loop'
/usr/local/bundle/gems/bundler-2.2.32/lib/bundler/worker.rb:54:in
`process_queue'
/usr/local/bundle/gems/bundler-2.2.32/lib/bundler/worker.rb:91:in `block (2
levels) in create_threads'

An error occurred while installing ruby-debug-ide (0.7.3), and Bundler cannot
continue.

In Gemfile:
  ruby-debug-ide
@hurricup
Copy link
Contributor

ShockwaveNN added a commit to palladium-tms/palladium-api that referenced this issue Feb 1, 2022
Not sure if that configuration should be store in this repo
Also seems that `debase` currently do not support `ruby-3.1`
See:
ruby-debug/debase#95
ShockwaveNN added a commit to palladium-tms/palladium-api that referenced this issue Feb 1, 2022
Not sure if that configuration should be store in this repo
Also seems that `debase` currently do not support `ruby-3.1`
See:
ruby-debug/debase#95
@lilith
Copy link

lilith commented Sep 1, 2022

@lilith
Copy link

lilith commented Sep 1, 2022

gem 'debase', "~> 0.2.5.beta2" allowed it to install

@Nearyou46
Copy link

if bundler >2.2 need to change "bundle lock --add-platform x86-mingw32 x64-mingw32 x86-mswin32" to bundle lock --add-platform x86_64-linux" in docker entrypoint.

@Juice10
Copy link

Juice10 commented Sep 28, 2022

gem 'debase', "~> 0.2.5.beta2" allowed it to install

if bundler >2.2 need to change "bundle lock --add-platform x86-mingw32 x64-mingw32 x86-mswin32" to bundle lock --add-platform x86_64-linux" in docker entrypoint.

Both don't seem to work for me with the docker base image: mcr.microsoft.com/vscode/devcontainers/ruby:3-bullseye

Dockerfile:

# syntax = docker/dockerfile:1.0-experimental
# [Choice] Ruby version: 2, 2.7, 2.6, 2.5
ARG VARIANT=3-bullseye
FROM mcr.microsoft.com/vscode/devcontainers/ruby:${VARIANT}
ARG OWNER=vscode

# Install Rails
RUN gem install rails webdrivers

# Install time consuming gems
RUN gem install sassc

ARG NODE_VERSION="lts/*"
RUN if [ "${NODE_VERSION}" != "none" ]; then su ${OWNER} -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi

# install yarn
RUN su ${OWNER} -c "source /usr/local/share/nvm/nvm.sh && npm install -g yarn" 2>&1

RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
    && apt-get -y install --no-install-recommends zbar-tools ffmpeg software-properties-common \
    # && apt-get -y install --no-install-recommends curl \
    && apt-get -y install --no-install-recommends python

RUN mkdir -p /workspace /usr/local/bundle/bundler \
     && chown -R ${OWNER}:${OWNER} /workspace /usr/local/bundle/ /usr/local/rvm/gems
USER ${OWNER}
WORKDIR /workspace

COPY Gemfile Gemfile.lock ./
RUN gem install bundler foreman && bundler install

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

No branches or pull requests

5 participants