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

jgem install sisimai fails on JRuby #46

Closed
azumakuniyuki opened this issue Feb 16, 2016 · 7 comments
Closed

jgem install sisimai fails on JRuby #46

azumakuniyuki opened this issue Feb 16, 2016 · 7 comments
Labels

Comments

@azumakuniyuki
Copy link
Member

I've tested on JRuby 9.0.5.0 on FreeBSD and got the same error message when "jgem install sisimai".

# uname -mprs
FreeBSD 10.1-RELEASE-p24 amd64 amd64

# /usr/local/bin/java -version
openjdk version "1.7.0_95"
OpenJDK Runtime Environment (build 1.7.0_95-b00)
OpenJDK 64-Bit Server VM (build 24.95-b01, mixed mode)

# /usr/local/jruby/bin/jruby -v
jruby 9.0.5.0 (2.2.3) 2016-01-26 7bee00d OpenJDK 64-Bit Server VM 24.95-b01 on 1.7.0_95-b00 +jit [FreeBSD-amd64]
# /usr/local/jruby/bin/jgem install sisimai
Fetching: oj-2.14.4.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing sisimai:
    ERROR: Failed to build gem native extension.

    /usr/local/jruby/bin/jruby -r ./siteconf20160216-13461-17h6cbz.rb extconf.rb
NotImplementedError: C extensions are not supported
    <top> at /usr/local/jruby/lib/ruby/stdlib/mkmf.rb:1
  require at org/jruby/RubyKernel.java:937
   (root) at /usr/local/jruby/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:1
    <top> at extconf.rb:1

extconf failed, exit code 1

Gem files will remain installed in /usr/local/jruby/lib/ruby/gems/shared/gems/oj-2.14.4 for inspection.
Results logged to /usr/local/jruby/lib/ruby/gems/shared/extensions/universal-java-1.7/2.2.0/oj-2.14.4/gem_make.out

This problem is reported from @hiroyuki-sato at his Gist: https://gist.github.com/hiroyuki-sato/b71049e3dfb20e5408fb

@azumakuniyuki
Copy link
Member Author

jrjackson did not defined in metadata.gz of sisimai-4.15.0.gem

% gem fetch sisimai
Fetching: sisimai-4.15.0.gem (100%)
Downloaded sisimai-4.15.0

% tar xvf sisimai-4.15.0.gem
x metadata.gz
x data.tar.gz
x checksums.yaml.gz

% zgrep -i 'Oj' metadata.gz
  name: oj
rubyforge_project: 

% zgrep -i 'JrJackson' metadata.gz
%

@azumakuniyuki
Copy link
Member Author

% sudo /usr/local/jruby/bin/jgem install bunlder
Password:
Fetching: bunlder-0.0.1.gem (100%)
Successfully installed bunlder-0.0.1
1 gem installed
sudo /usr/local/jruby/bin/jgem install bunlder  23.23s user 1.15s system 118% cpu 20.501 total

% /usr/local/jruby/bin/rake build
rake aborted!
no such file to load -- bundler/gem_tasks
org/jruby/RubyKernel.java:937:in `require'
/Users/ak/localrepos/rr.nyaan.jp/rb-Sisimai/Rakefile:1:in `<top>'
org/jruby/RubyKernel.java:955:in `load'
org/jruby/RubyKernel.java:955:in `load'
(See full trace by running task with --trace)

@azumakuniyuki
Copy link
Member Author

I've released fixed version as v4.15.1 just now on https://rubygems.org/gems/sisimai/versions/4.15.1
The following output is the results of installation and running test on CRuby.

#  gem install sisimai
Fetching: sisimai-4.15.1.gem (100%)
Successfully installed sisimai-4.15.1
Parsing documentation for sisimai-4.15.1
Installing ri documentation for sisimai-4.15.1
Done installing documentation for sisimai after 10 seconds
1 gem installed

# ruby -rsisimai -e 'puts RUBY_PLATFORM, Sisimai.version'
x86_64-freebsd10.1
4.15.1

The same test on JRuby

# /usr/local/jruby/bin/jgem install sisimai
Fetching: sisimai-4.15.1.gem (100%)
Successfully installed sisimai-4.15.1
1 gem installed

# /usr/local/jruby/bin/jruby -rsisimai -e 'puts RUBY_PLATFORM, Sisimai.version'
java
4.15.1

@azumakuniyuki
Copy link
Member Author

Installation using jgem is completed successfully but JrJackson is not installed as a dependent module.

# /usr/local/jruby/bin/jruby -rsisimai -e 'puts Sisimai.dump($*.shift)' ./set-of-emails/maildir/bsd/sendmail-22.eml 
LoadError: no such file to load -- jrjackson
  require at org/jruby/RubyKernel.java:937
  require at /usr/local/jruby/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:54
     dump at /usr/local/jruby/lib/ruby/gems/shared/gems/sisimai-4.15.1/lib/sisimai.rb:52
    <top> at -e:1

@hiroyuki-sato
Copy link
Contributor

Reference.

rubygems/rubygems#1492

This is currently a limitation of RubyGems -- if you want platform-specific dependencies, you will have to release platform-specific versions of your own gem

@azumakuniyuki
Copy link
Member Author

@hiroyuki-sato Thanks for many advices. I've released v4.16.0 just now and have made sure that the latest version works properly !

% sudo PATH="$PATH:/usr/local/jr/bin" /usr/local/jr/bin/jgem install sisimai
Fetching: sisimai-4.16.0-java.gem (100%)
Successfully installed sisimai-4.16.0-java
1 gem installed

% /usr/local/jr/bin/jruby -rsisimai -e 'puts RUBY_PLATFORM, Sisimai.version'
java
4.16.0

% /usr/local/jr/bin/jruby -rsisimai -e 'puts Sisimai.dump($*.shift)' set-of-emails/maildir/bsd/sendmail-22.eml
[{"token":"cf17945938502bd876603a375f0e9517c921bbab","lhost":"localhost","rhost":"mx-s.neko.example.jp","alias":"","listid":"","reason":"hasmoved","action":"failed","subject":"Nyaaaan","messageid":"0000000011111.fff0000000003@mx.example.co.jp","replycode":"551","smtpagent":"Sendmail","softbounce":0,"smtpcommand":"DATA","destination":"example.net","senderdomain":"example.co.jp","feedbacktype":"","diagnosticcode":"551 not our customer","diagnostictype":"SMTP","deliverystatus":"5.1.6","timezoneoffset":"+0900","addresser":"shironeko@example.co.jp","recipient":"kijitora@example.net","timestamp":1397054085}]

@hiroyuki-sato
Copy link
Contributor

👍

jiongle1 pushed a commit to scantist-ossops-m2/rb-sisimai that referenced this issue Apr 11, 2024
jiongle1 pushed a commit to scantist-ossops-m2/rb-sisimai that referenced this issue Apr 11, 2024
jiongle1 pushed a commit to scantist-ossops-m2/rb-sisimai that referenced this issue Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants