gettalong / hexapdf

Versatile PDF creation and manipulation for Ruby
https://hexapdf.gettalong.org
Other
1.21k stars 69 forks source link

version 0.27 install openssl(3.0.1) failure in jruby-9.4.0.0 #222

Closed palytoxin closed 1 year ago

palytoxin commented 1 year ago
Installing openssl 3.0.1 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/home/yan/.asdf/installs/ruby/jruby-9.4.0.0/lib/ruby/gems/shared/gems/openssl-3.0.1/ext/openssl
/home/yan/.asdf/installs/ruby/jruby-9.4.0.0/bin/jruby -I
/home/yan/.asdf/installs/ruby/jruby-9.4.0.0/lib/ruby/stdlib extconf.rb
checking for rb_io_maybe_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.

RuntimeError: The compiler failed to generate an executable file.
You have to install development tools first.

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

In Gemfile:
  hexapdf was resolved to 0.27.0, which depends on
    openssl

0.26.2 is worked.

gettalong commented 1 year ago

Ruby's openssl library was added as dependency because older Ruby versions, i.e. < 3.0, included openssl versions that were missing things implemented in newer openssl versions which HexaPDF uses. The first version with the dependency is 0.27.0.

JRuby is not yet officially supported by HexaPDF since not all tests pass on it. I also don't know how JRuby handles native extensions like OpenSSL.

So in this case I would direct you to the JRuby community to ask them how to proceed. Guessing from the error message: "You have to install development tools first.". So maybe JRuby has some special support libraries that need to be installed before you can proceed.