Subject: [ruby-ffi] Re: Possible issues with Ruby FFI on ARM processor (Raspberry PI) |
From: Wayne Meissner |
Date: 2/25/13 3:49 PM |
To: ruby-ffi@googlegroups.com |
I’ve been having some issues running one of my gems (http://rubygems.org/gems/spotify ) successfully on Raspberry PI, using the soft float debian “weezy” OS, downloadable from http://www.raspberrypi.org/downloads on cruby 1.9.3 (ruby 1.9.3p385 (2013-02-06 revision 39114) [armv6l-linux-eabi]).I’ve been troubleshooting some, and created one example written in C, and one equivalent example written in Ruby using FFI. My suspicion was that they would behave identically, but the ruby code will sometimes segfault on exit, while the C code does not.Now, I’m not entirely certain that the two examples are completely equivalent, so I’d be grateful for any pair of critical eyes on the two code samples: https://gist.github.com/Burgestrand/ 7b691591af20c29d6849 My questions are:1. Are the two (C vs. Ruby) samples really equivalent?2. Any ideas for further troubleshooting?— Kim