[Ironruby-core] Ruby FFI port

Charles Strahan charles.c.strahan at gmail.com
Thu Mar 24 16:19:32 EDT 2011


I've successfully built the FFI gem on my Win7 x64 machine, but the specs
currently fail:

*E:/Source/ffi/lib/ffi/library.rb:147:in `attach_function': Function
'strdup' not*
* found in [msvcrt.dll] (FFI::NotFoundError)*
*        from E:/Source/ffi/spec/ffi/strptr_spec.rb:33:in `<module:StrPtr>'*

This is a known problem, but it hasn't been fixed yet:

http://groups.google.com/group/ruby-ffi/browse_thread/thread/c40766b574a15962

> Thats just a symbol lookup problem.  All the traditional libc symbols
> in msvcrt.dll have an underscore prepended, so that test should have a
> special case for win32 in it.


My first goal is to fix any failing specs.  Any help would be appreciated.

-Charles

On Thu, Mar 24, 2011 at 1:58 PM, Charles Strahan <
charles.c.strahan at gmail.com> wrote:

>
> Another idea… what about starting from http://github.com/ffi and replacing
>> the C extension with C# code?
>
>
> That's a great idea, Tomas.  I'll need some immediate gratification to keep
> me from getting discouraged; porting the C funcs piecemeal sounds like a
> good way to get *something* working.  I've forked FFI<https://github.com/cstrahan/iron-ffi>- I'll try to lay out a foundation tonight.
>
> -Charles
>
> On Wed, Mar 23, 2011 at 12:29 AM, Tomas Matousek <
> Tomas.Matousek at microsoft.com> wrote:
>
>>  Another idea… what about starting from http://github.com/ffi and
>> replacing the C extension with C# code?
>>
>> Not sure if it will work but it’s at least worth looking at. Or perhaps
>> you can also look at what JRuby is doing.
>>
>>
>>
>> Tomas
>>
>>
>>
>> *From:* ironruby-core-bounces at rubyforge.org [mailto:
>> ironruby-core-bounces at rubyforge.org] *On Behalf Of *Charles Strahan
>> *Sent:* Tuesday, March 22, 2011 6:30 PM
>> *To:* ironruby-core at rubyforge.org
>> *Subject:* [Ironruby-core] Ruby FFI port
>>
>>
>>
>> Alright, I have a hankering again to port Ruby FFI ;).
>>
>>
>>
>> One question: should the port be written in pure Ruby, or should this be a
>> C# library in the same vein as YAML (IronRuby.Libraries.Yaml)?  I was
>> leaning towards the latter, where I would branch from IronLanguages/Main,
>> adding a *Libraries.FFI* folder beside *Libraries.Yaml*.
>>
>>
>>
>> Cheers,
>>
>>
>>
>> -Charles
>>
>> _______________________________________________
>> Ironruby-core mailing list
>> Ironruby-core at rubyforge.org
>> http://rubyforge.org/mailman/listinfo/ironruby-core
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20110324/2b5be73c/attachment.html>


More information about the Ironruby-core mailing list