Amitabh Jain
2008-Jun-10 14:11 UTC
[Tmail-talk] How to install tmail without building native extensions (for jruby)?
Hi!
While trying to install tmail for JRuby (version 1.1.2), I got the following
error:
--
C:\Documents and Settings\ajain>jruby -S gem install tmail
JRuby limited openssl loaded. gem install jruby-openssl for full support.
http://wiki.jruby.org/wiki/JRuby_Builtin_OpenSSL
Bulk updating Gem source index for: http://gems.rubyforge.org/
Building native extensions. This could take a while...
ERROR: Error installing tmail:
ERROR: Failed to build gem native extension.
C:/software/jruby-1.1.2/bin/jruby.bat extconf.rb install tmail
C:/software/jruby-1.1.2/lib/ruby/1.8/mkmf.rb:7:in
`C:/software/jruby-1.1.2/lib/r
uby/1.8/mkmf.rb'': JRuby does not support native extensions. Check
wiki.jruby.org
for alternatives. (NotImplementedError)
from C:/software/jruby-1.1.2/lib/ruby/1.8/mkmf.rb:1:in
`require''
from extconf.rb:1
Gem files will remain installed in
C:/software/jruby-1.1.2/lib/ruby/gems/1.8/gem
s/tmail-1.2.3.1 for inspection.
Results logged to
C:/software/jruby-1.1.2/lib/ruby/gems/1.8/gems/tmail-1.2.3.1/e
xt/tmailscanner/tmail/gem_make.out
--
Normal install fails because jruby cannot build native extensions.
The site says:
TMail is written in Ruby and a (very) small bit of supporting C that has
pure ruby replacements if you can''t compile on your computer. This
means
TMail will work, out of the box, on any platform that can run Ruby 1.8 or
Ruby 1.9.*
*This is true. If I keep the tmail.rb and tmail sub-directory in the same
directory as my jruby script, I am able to use tmail successfully from
within jruby.
I was just wondering if there is any way to install tmail on JRuby without
building the native extensions?
Thanks in advance.
Amitabh Jain
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://rubyforge.org/pipermail/tmail-talk/attachments/20080610/bd791ea8/attachment.html>
simon jenkins
2008-Jun-10 21:03 UTC
[Tmail-talk] How to install tmail without building native extensions (for jruby)?
I am experiencing the same problem. I did a bit of digging around through the TMail source and discovered that it uses RUBY_PLATFORM to determine whether to build the native extensions depending on your OS, if you are on windows it will not build them. The other way to avoid native compilation is using the ENV var ''NORUBYEXT''. Check out the file: tmail-1.2.3.1\ext\tmailscanner\tmail\extconf.rb I have tried setting this, however it does not work as the issue is JRUBY will not let you require ''mkmf'' at all. TMail does this regardless of whether it is performing native compilation. Moving the require ''mkmf'' into the else statement so it is only required if performing native compilation may fix the issue. You could then set the NORUBYEXT ENV var to avoid compilation under jruby. A better fix would probably be to include the RUBY_PLATFORM value of ''java'' in the list of platforms not to compile for. cheers simon On Tue, Jun 10, 2008 at 3:11 PM, Amitabh Jain <ajain101 at gmail.com> wrote:> Hi! > > While trying to install tmail for JRuby (version 1.1.2), I got the > following error: > > -- > C:\Documents and Settings\ajain>jruby -S gem install tmail > JRuby limited openssl loaded. gem install jruby-openssl for full support. > http://wiki.jruby.org/wiki/JRuby_Builtin_OpenSSL > Bulk updating Gem source index for: http://gems.rubyforge.org/ > Building native extensions. This could take a while... > ERROR: Error installing tmail: > ERROR: Failed to build gem native extension. > > C:/software/jruby-1.1.2/bin/jruby.bat extconf.rb install tmail > C:/software/jruby-1.1.2/lib/ruby/1.8/mkmf.rb:7:in > `C:/software/jruby-1.1.2/lib/r > uby/1.8/mkmf.rb'': JRuby does not support native extensions. Check > wiki.jruby.org > for alternatives. (NotImplementedError) > from C:/software/jruby-1.1.2/lib/ruby/1.8/mkmf.rb:1:in `require'' > from extconf.rb:1 > > > Gem files will remain installed in > C:/software/jruby-1.1.2/lib/ruby/gems/1.8/gem > s/tmail-1.2.3.1 for inspection. > Results logged to > C:/software/jruby-1.1.2/lib/ruby/gems/1.8/gems/tmail-1.2.3.1/e > xt/tmailscanner/tmail/gem_make.out > > -- > > Normal install fails because jruby cannot build native extensions. > > The site says: > TMail is written in Ruby and a (very) small bit of supporting C that has > pure ruby replacements if you can''t compile on your computer. This means > TMail will work, out of the box, on any platform that can run Ruby 1.8 or > Ruby 1.9.* > > *This is true. If I keep the tmail.rb and tmail sub-directory in the same > directory as my jruby script, I am able to use tmail successfully from > within jruby. > > I was just wondering if there is any way to install tmail on JRuby without > building the native extensions? > > Thanks in advance. > > Amitabh Jain > > _______________________________________________ > Tmail-talk mailing list > Tmail-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/tmail-talk > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/tmail-talk/attachments/20080610/178525c6/attachment.html>
Mikel Lindsaar
2008-Jun-10 23:01 UTC
[Tmail-talk] How to install tmail without building native extensions (for jruby)?
On 6/11/08, simon jenkins <simojenki at gmail.com> wrote:> > I did a bit of digging around through the TMail source and discovered that > it uses RUBY_PLATFORM to determine whether to build the native extensions > depending on your OS, if you are on windows it will not build them.That''s right. There is a problem in getting the gem package to decide when to compile or not. I could add java to the non compile steps.... I am actually considering loosing the c code anyway, benchmarks have not really shown it to be that much faster than the Ruby code, suprisingly. I''ll have a look to see if I can get this fixed for 1.2.4 Mikel -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/tmail-talk/attachments/20080611/fdbb4a3e/attachment.html>
simon jenkins
2008-Jun-11 06:50 UTC
[Tmail-talk] How to install tmail without building native extensions (for jruby)?
Thanks, What sort of time frame are you looking at for 1.2.4? cheers Simon On Wed, Jun 11, 2008 at 12:01 AM, Mikel Lindsaar <raasdnil at gmail.com> wrote:> On 6/11/08, simon jenkins <simojenki at gmail.com> wrote: >> >> I did a bit of digging around through the TMail source and discovered that >> it uses RUBY_PLATFORM to determine whether to build the native extensions >> depending on your OS, if you are on windows it will not build them. > > > That''s right. > > There is a problem in getting the gem package to decide when to compile or > not. > > I could add java to the non compile steps.... > > I am actually considering loosing the c code anyway, benchmarks have not > really shown it to be that much faster than the Ruby code, suprisingly. > > I''ll have a look to see if I can get this fixed for 1.2.4 > > Mikel > > > _______________________________________________ > Tmail-talk mailing list > Tmail-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/tmail-talk > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/tmail-talk/attachments/20080611/ba64b8ad/attachment-0001.html>
Amitabh Jain
2008-Jun-11 08:05 UTC
[Tmail-talk] How to install tmail without building native extensions (for jruby)?
On Wed, Jun 11, 2008 at 4:31 AM, Mikel Lindsaar <raasdnil at gmail.com> wrote:> On 6/11/08, simon jenkins <simojenki at gmail.com> wrote: >> >> I did a bit of digging around through the TMail source and discovered that >> it uses RUBY_PLATFORM to determine whether to build the native extensions >> depending on your OS, if you are on windows it will not build them. > > > That''s right. > > There is a problem in getting the gem package to decide when to compile or > not. > > I could add java to the non compile steps.... > > I am actually considering loosing the c code anyway, benchmarks have not > really shown it to be that much faster than the Ruby code, suprisingly. > > I''ll have a look to see if I can get this fixed for 1.2.4 > > Mikel > >Ok. That helps. Thanks folks! I shall fix this in my local copy for now.> Moving the require ''mkmf'' into the else statement so it is only requiredif performing native compilation may fix the issue.> You could then set the NORUBYEXT ENV var to avoid compilation under jruby.Isn''t it better to use some command line option instead of setting an environment variable for this? Cheers Amitabh -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/tmail-talk/attachments/20080611/574f2477/attachment.html>
Mikel Lindsaar
2008-Jun-11 08:54 UTC
[Tmail-talk] How to install tmail without building native extensions (for jruby)?
On Wed, Jun 11, 2008 at 4:50 PM, simon jenkins <simojenki at gmail.com> wrote:> What sort of time frame are you looking at for 1.2.4? >Right after I sleep :) No, there are encoding problems in trunk right now, nothing too serious, but I am trying to keep tmail working with Ruby 1.9 AND 1.8x at the same time and it is no fun. So no definite time frame yet, if anyone wants to dive into the code, let me know. Mikel -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/tmail-talk/attachments/20080611/9c85c5b7/attachment.html>