io_splice RubyGem user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
* JRuby support
@ 2013-03-16  0:48 David Ekhaus
  2013-03-16  2:05 ` Eric Wong
  0 siblings, 1 reply; 3+ messages in thread
From: David Ekhaus @ 2013-03-16  0:48 UTC (permalink / raw)
  To: ruby.io.splice

Hi 

	Has anyone got io_splice working with JRuby ?

	Here are the errors from my mkmf.log - which were generated when I tried to run 'jruby setup.rb' …

Davids-MacBook-Pro:io_splice dekhaus$ more mkmf.log 
have_func: checking for splice() in fcntl.h... -------------------- no

cc -E -I. -I/Users/dekhaus/.rvm/rubies/jruby-1.7.0.RC2/lib/native/include/ruby -I.  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE        -D_GNU_SOURCE=1  -fPIC -DTARGET_RT_MAC_CFM=0  -fno-omit-frame-pointer -fno-strict-aliasing  -fexceptions      conftest.c  |
   ruby -ne 'print if /.*splice.*/'
checked program was:
/* begin */
1: #include <ruby.h>
2: ["fcntl.h"]
3: /* top */
4: int main() { return 0; }
/* end */

"cc -o conftest -I. -I/Users/dekhaus/.rvm/rubies/jruby-1.7.0.RC2/lib/native/include/ruby -I.  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE        -D_GNU_SOURCE=1  -fPIC -DTARGET_RT_MAC_CFM=0 -fno-omit-frame-pointer -fno-strict-aliasing  -fexceptions     conftest.c  -L"." -L"/Users/dekhaus/.rvm/rubies/jruby-1.7.0.RC2/lib"    -arch x86_64      "
conftest.c:6:53: error: use of undeclared identifier 'splice'
int t() { void ((*volatile p)()); p = (void ((*)()))splice; return 0; }
                                                   ^
1 error generated.
checked program was:
/* begin */
1: #include <ruby.h>
2: #include <fcntl.h>
3: 
4: /*top*/
5: int main() { return 0; }
6: int t() { void ((*volatile p)()); p = (void ((*)()))splice; return 0; }
/* end */

"cc -o conftest -I. -I/Users/dekhaus/.rvm/rubies/jruby-1.7.0.RC2/lib/native/include/ruby -I.  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE        -D_GNU_SOURCE=1  -fPIC -DTARGET_RT_MAC_CFM=0 -fno-omit-frame-pointer -fno-strict-aliasing  -fexceptions     conftest.c  -L"." -L"/Users/dekhaus/.rvm/rubies/jruby-1.7.0.RC2/lib"    -arch x86_64      "
conftest.c:5:11: warning: implicit declaration of function 'splice' is invalid in C99 [-Wimplicit-function-declaration]
int t() { splice(); return 0; }
         ^
1 warning generated.
Undefined symbols for architecture x86_64:
 "_splice", referenced from:
     _t in conftest-QBZgrK.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
checked program was:
/* begin */
1: #include <fcntl.h>
2: 
3: /*top*/
4: int main() { return 0; }
5: int t() { splice(); return 0; }
/* end */


	Any help getting io_splice working with JRuby would be greatly appreciated.


Thanks
Dave


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: JRuby support
  2013-03-16  0:48 JRuby support David Ekhaus
@ 2013-03-16  2:05 ` Eric Wong
  2013-03-16  2:52   ` David Ekhaus
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Wong @ 2013-03-16  2:05 UTC (permalink / raw)
  To: ruby.io.splice

David Ekhaus <dekhaus@mac.com> wrote:
> 	Has anyone got io_splice working with JRuby ?
> 
> 	Here are the errors from my mkmf.log - which were generated when I tried to run 'jruby setup.rb' …
> 
> Davids-MacBook-Pro:io_splice dekhaus$ more mkmf.log 

^^^^^^^^^^^^^^^^^^^^
Uh...  splice() is a Linux-only syscall.

Anyways, I'm not interested in JRuby or anything JVM, but I'll accept
non-intrusive patches to the C extension.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: JRuby support
  2013-03-16  2:05 ` Eric Wong
@ 2013-03-16  2:52   ` David Ekhaus
  0 siblings, 0 replies; 3+ messages in thread
From: David Ekhaus @ 2013-03-16  2:52 UTC (permalink / raw)
  To: ruby.io.splice

Fair enough (regarding the linux only comment) - here's what I get when I run 

> ruby setup.rb

on RHEL 6.2 …

[root@localhost io_splice-4.2.0]# jruby setup.rb 
---> lib
---> lib/io
---> lib/io/splice
<--- lib/io/splice
<--- lib/io
<--- lib
---> ext
---> ext/io_splice
/opt/torquebox-current/jruby/bin/jruby /opt/src/io_splice-4.2.0/ext/io_splice/extconf.rb
WARNING: JRuby does not support native extensions or the `mkmf' library very well.
Check http://kenai.com/projects/jruby/pages/Home for alternatives.
checking for splice() in fcntl.h... checking for tee() in fcntl.h... checking for rb_thread_blocking_region()... checking for F_GETPIPE_SZ in fcntl.h... no
checking for F_SETPIPE_SZ in fcntl.h... no
creating Makefile
<--- ext/io_splice
<--- ext
---> lib
---> lib/io
---> lib/io/splice
<--- lib/io/splice
<--- lib/io
<--- lib
---> ext
---> ext/io_splice
make
cc -shared  -o io_splice_ext.so io_splice_ext.o -L"." -L"/opt/torquebox-2.1.2/jruby/lib"   -m64  
<--- ext/io_splice
<--- ext
rm -f InstalledFiles
---> lib
mkdir -p /opt/torquebox-2.1.2/jruby/lib/ruby/site_ruby/1.8/
---> lib/io
mkdir -p /opt/torquebox-2.1.2/jruby/lib/ruby/site_ruby/1.8/io
install splice.rb /opt/torquebox-2.1.2/jruby/lib/ruby/site_ruby/1.8/io
---> lib/io/splice
mkdir -p /opt/torquebox-2.1.2/jruby/lib/ruby/site_ruby/1.8/io/splice
install mri_18.rb /opt/torquebox-2.1.2/jruby/lib/ruby/site_ruby/1.8/io/splice
<--- lib/io/splice
<--- lib/io
<--- lib
---> ext
---> ext/io_splice
no ruby extention exists: 'ruby setup.rb setup' first
Try 'ruby setup.rb --help' for detailed usage.




	The message …

		"no ruby extension exists: 'ruby setup.rb setup' first" 

	leads me to believe that it the command 'jruby setup.rb' didn't work properly.

	If it (the 'jruby setup.rb' command) did work properly - then can someone advise me on what the next step(s) are.

	If it didn't - similarly, can someone advise me on what I need to do to get it to work.

Thanks
Dave





On Mar 15, 2013, at 7:05 PM, Eric Wong <normalperson@yhbt.net> wrote:

> David Ekhaus <dekhaus@mac.com> wrote:
>> 	Has anyone got io_splice working with JRuby ?
>> 
>> 	Here are the errors from my mkmf.log - which were generated when I tried to run 'jruby setup.rb' …
>> 
>> Davids-MacBook-Pro:io_splice dekhaus$ more mkmf.log 
> 
> ^^^^^^^^^^^^^^^^^^^^
> Uh...  splice() is a Linux-only syscall.
> 
> Anyways, I'm not interested in JRuby or anything JVM, but I'll accept
> non-intrusive patches to the C extension.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-03-16  2:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-16  0:48 JRuby support David Ekhaus
2013-03-16  2:05 ` Eric Wong
2013-03-16  2:52   ` David Ekhaus

Code repositories for project(s) associated with this public inbox

	https://yhbt.net/ruby_io_splice.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).