Skip to content

Instantly share code, notes, and snippets.

@eregon
Last active February 2, 2022 12:13

Testing on JRuby because the failures are clearer as it does not support C extensions.

io-wait, strscan don't work on JRuby, but JRuby has those in stdlib and they work fine.

source "https://rubygems.org"

gem "net-imap"
$ bundle
Fetching gem metadata from https://rubygems.org/...
Resolving dependencies...
Using bundler 2.2.29
Using timeout 0.2.0
Fetching io-wait 0.2.1
Fetching digest 3.1.0 (java)
Fetching strscan 3.0.1
Installing strscan 3.0.1 with native extensions
Installing io-wait 0.2.1 with native extensions
Installing digest 3.1.0 (java)
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/io-wait-0.2.1/ext/io/wait
/home/eregon/.rubies/jruby-9.3.2.0/bin/jruby -I
/home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib -r
./siteconf20220202-10295-1hsq3js.rb extconf.rb
checking for rb_io_wait()... *** 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=/home/eregon/.rubies/jruby-9.3.2.0/bin/jruby
RuntimeError: The compiler failed to generate an executable file.
You have to install development tools first.

        try_do at /home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/mkmf.rb:456
     try_link0 at /home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/mkmf.rb:541
      try_link at /home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/mkmf.rb:556
      try_func at /home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/mkmf.rb:765
have_func at
/home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/mkmf.rb:1051
  checking_for at /home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/mkmf.rb:942
      postpone at /home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/mkmf.rb:350
          open at /home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/mkmf.rb:320
      postpone at /home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/mkmf.rb:350
          open at /home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/mkmf.rb:320
      postpone at /home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/mkmf.rb:346
  checking_for at /home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/mkmf.rb:941
have_func at
/home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/mkmf.rb:1050
        <main> at extconf.rb:5

To see why this extension failed to compile, please check the mkmf.log which can
be found here:

/home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/extensions/universal-java-11/2.6.0/io-wait-0.2.1/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in
/home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/io-wait-0.2.1 for
inspection.
Results logged to
/home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/extensions/universal-java-11/2.6.0/io-wait-0.2.1/gem_make.out

/home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/rubygems/ext/builder.rb:92:in
`run'
/home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/rubygems/ext/ext_conf_builder.rb:47:in
`block in build'
  org/jruby/ext/tempfile/Tempfile.java:242:in `open'
/home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/rubygems/ext/ext_conf_builder.rb:26:in
`build'
/home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/rubygems/ext/builder.rb:158:in
`build_extension'
/home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/rubygems/ext/builder.rb:192:in
`block in build_extensions'
  org/jruby/RubyArray.java:1865:in `each'
/home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/rubygems/ext/builder.rb:189:in
`build_extensions'
/home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/rubygems/installer.rb:837:in
`build_extensions'
/home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/bundler/rubygems_gem_installer.rb:66:in
`build_extensions'
/home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/bundler/rubygems_gem_installer.rb:26:in
`install'
/home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/bundler/source/rubygems.rb:199:in
`install'
/home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/bundler/installer/gem_installer.rb:54:in
`install'
/home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/bundler/installer/gem_installer.rb:16:in
`install_from_spec'
/home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/bundler/installer/parallel_installer.rb:186:in
`do_install'
/home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/bundler/installer/parallel_installer.rb:177:in
`block in worker_pool'
/home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/bundler/worker.rb:62:in
`apply_func'
/home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/bundler/worker.rb:57:in
`block in process_queue'
  org/jruby/RubyKernel.java:1507:in `loop'
/home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/bundler/worker.rb:54:in
`process_queue'
/home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/bundler/worker.rb:91:in
`block in create_threads'

An error occurred while installing io-wait (0.2.1), and Bundler cannot
continue.

In Gemfile:
  net-imap was resolved to 0.2.3, which depends on
    net-protocol was resolved to 0.1.2, which depends on
      io-wait


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

current directory:
/home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/strscan-3.0.1/ext/strscan
/home/eregon/.rubies/jruby-9.3.2.0/bin/jruby -I
/home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib -r
./siteconf20220202-10295-1tfaekv.rb extconf.rb
checking for onig_region_memsize() in ruby.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=/home/eregon/.rubies/jruby-9.3.2.0/bin/jruby
RuntimeError: The compiler failed to generate an executable file.
You have to install development tools first.

        try_do at /home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/mkmf.rb:456
     try_link0 at /home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/mkmf.rb:541
      try_link at /home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/mkmf.rb:556
      try_func at /home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/mkmf.rb:765
have_func at
/home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/mkmf.rb:1051
  checking_for at /home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/mkmf.rb:942
      postpone at /home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/mkmf.rb:350
          open at /home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/mkmf.rb:320
      postpone at /home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/mkmf.rb:350
          open at /home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/mkmf.rb:320
      postpone at /home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/mkmf.rb:346
  checking_for at /home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/mkmf.rb:941
have_func at
/home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/mkmf.rb:1050
        <main> at extconf.rb:4

To see why this extension failed to compile, please check the mkmf.log which can
be found here:

/home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/extensions/universal-java-11/2.6.0/strscan-3.0.1/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in
/home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/gems/strscan-3.0.1 for
inspection.
Results logged to
/home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/gems/shared/extensions/universal-java-11/2.6.0/strscan-3.0.1/gem_make.out

/home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/rubygems/ext/builder.rb:92:in
`run'
/home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/rubygems/ext/ext_conf_builder.rb:47:in
`block in build'
  org/jruby/ext/tempfile/Tempfile.java:242:in `open'
/home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/rubygems/ext/ext_conf_builder.rb:26:in
`build'
/home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/rubygems/ext/builder.rb:158:in
`build_extension'
/home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/rubygems/ext/builder.rb:192:in
`block in build_extensions'
  org/jruby/RubyArray.java:1865:in `each'
/home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/rubygems/ext/builder.rb:189:in
`build_extensions'
/home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/rubygems/installer.rb:837:in
`build_extensions'
/home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/bundler/rubygems_gem_installer.rb:66:in
`build_extensions'
/home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/bundler/rubygems_gem_installer.rb:26:in
`install'
/home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/bundler/source/rubygems.rb:199:in
`install'
/home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/bundler/installer/gem_installer.rb:54:in
`install'
/home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/bundler/installer/gem_installer.rb:16:in
`install_from_spec'
/home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/bundler/installer/parallel_installer.rb:186:in
`do_install'
/home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/bundler/installer/parallel_installer.rb:177:in
`block in worker_pool'
/home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/bundler/worker.rb:62:in
`apply_func'
/home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/bundler/worker.rb:57:in
`block in process_queue'
  org/jruby/RubyKernel.java:1507:in `loop'
/home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/bundler/worker.rb:54:in
`process_queue'
/home/eregon/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/bundler/worker.rb:91:in
`block in create_threads'

An error occurred while installing strscan (3.0.1), and Bundler cannot
continue.

In Gemfile:
  net-imap was resolved to 0.2.3, which depends on
    strscan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment