ffi issue

10 views
Skip to first unread message

Patrik Sundberg

unread,
Nov 8, 2011, 12:22:55 PM11/8/11
to maglev-d...@googlegroups.com
Hi,

I'm trying to use my fork of ffi-rzmq on maglev using ffi and am having some problems.

Link to gem: https://github.com/sundbp/ffi-rzmq

Getting errors in lib/ffi-rzmq/libc.rb:
1. FFI::Library::LIBC is not initialized. Can work around that easily by setting it explicitly to '/lib/x86_64-linux-gnu/libc.so.6'
2. ffi_lib() doesn't seem to return an object similar to what I expect. What I get is:
[["/lib/x86_64-linux-gnu/libc.so.6"], [#<FFI::CLibrary:0x736a901 @_st_name="/lib/x86_64-linux-gnu/libc.so.6" @_st_expandedName=nil @_st_lastError=nil @_st_loadAttempted=nil @_st_onLoadBlock=nil>]]

what I expect is an Array of FFI::DynamicLibrary
the part of the code doing ffi_lib(...).first in this case gets an array of length 1 with a string in it.

Any ideas on the ffi_lib() issue?

P.S. ffi related code confirmed to be working fine on jruby 1.6.5

Conrad Taylor

unread,
Nov 8, 2011, 10:08:49 PM11/8/11
to maglev-d...@googlegroups.com
Patrick, did you get ffi working with JRuby?

-Conrad
 
-- 
You received this message because you are subscribed to the Google Groups "MagLev Discussion" group.
To view this discussion on the web visit https://groups.google.com/d/msg/maglev-discussion/-/mcgSmA1f6GgJ.
To post to this group, send email to maglev-d...@googlegroups.com.
To unsubscribe from this group, send email to maglev-discuss...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/maglev-discussion?hl=en.

Patrik Sundberg

unread,
Nov 9, 2011, 4:31:51 AM11/9/11
to maglev-d...@googlegroups.com
yep, no issues at all on jruby. I posted an issue with the FFI problems I discovered. Seems FFI need some TLC overall, not implementing same return types and interfaces as jruby/mri/rbx at the moment. https://github.com/MagLev/maglev/issues/102

Reply all
Reply to author
Forward
0 new messages