{"action":"created","issue":{"url":"https://api.github.com/repos/termux/termux-packages/issues/434","repository_url":"https://api.github.com/repos/termux/termux-packages","labels_url":"https://api.github.com/repos/termux/termux-packages/issues/434/labels{/name}","comments_url":"https://api.github.com/repos/termux/termux-packages/issues/434/comments","events_url":"https://api.github.com/repos/termux/termux-packages/issues/434/events","html_url":"https://github.com/termux/termux-packages/issues/434","id":175257311,"number":434,"title":"ruby ffi does not work","user":{"login":"fornwall","id":277251,"avatar_url":"https://avatars.githubusercontent.com/u/277251?v=3","gravatar_id":"","url":"https://api.github.com/users/fornwall","html_url":"https://github.com/fornwall","followers_url":"https://api.github.com/users/fornwall/followers","following_url":"https://api.github.com/users/fornwall/following{/other_user}","gists_url":"https://api.github.com/users/fornwall/gists{/gist_id}","starred_url":"https://api.github.com/users/fornwall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fornwall/subscriptions","organizations_url":"https://api.github.com/users/fornwall/orgs","repos_url":"https://api.github.com/users/fornwall/repos","events_url":"https://api.github.com/users/fornwall/events{/privacy}","received_events_url":"https://api.github.com/users/fornwall/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/termux/termux-packages/labels/bug%20report","name":"bug report","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-06T14:10:55Z","updated_at":"2016-09-27T00:40:58Z","closed_at":"2016-09-27T00:40:58Z","body":"Example file:\r\n\r\n```ruby\r\nrequire 'ffi'\r\n\r\nmodule MyLib\r\n\textend FFI::Library\r\n\tffi_lib 'c'\r\n\tattach_function :puts, [ :string ], :int\r\nend\r\n\r\nMyLib.puts 'Hello, World using libc!'\r\n```\r\n\r\nRunning this causes\r\n\r\n```\r\n/data/data/com.termux/files/usr/lib/ruby/gems/2.3.0/gems/ffi-1.9.14/lib/ffi_c.so: warning: no super class for `FFI::Type', Object assumed\r\n/data/data/com.termux/files/usr/lib/ruby/gems/2.3.0/gems/ffi-1.9.14/lib/ffi_c.so: warning: no super class for `FFI::AbstractMemory', Object assumed\r\n/data/data/com.termux/files/usr/lib/ruby/gems/2.3.0/gems/ffi-1.9.14/lib/ffi_c.so: warning: no super class for `FFI::NullPointerError', Object assumed\r\n/data/data/com.termux/files/usr/lib/ruby/gems/2.3.0/gems/ffi-1.9.14/lib/ffi_c.so: warning: no super class for `FFI::StructByReference', Object assumed\r\n/data/data/com.termux/files/usr/lib/ruby/gems/2.3.0/gems/ffi-1.9.14/lib/ffi_c.so: warning: no super class for `FFI::StructLayout::Field', Object assumed\r\n/data/data/com.termux/files/usr/lib/ruby/gems/2.3.0/gems/ffi-1.9.14/lib/ffi_c.so: warning: no super class for `FFI::Struct', Object assumed\r\n/data/data/com.termux/files/usr/lib/ruby/gems/2.3.0/gems/ffi-1.9.14/lib/ffi_c.so: warning: no super class for `FFI::Struct::InlineArray', Object assumed\r\n```"},"comment":{"url":"https://api.github.com/repos/termux/termux-packages/issues/comments/249737280","html_url":"https://github.com/termux/termux-packages/issues/434#issuecomment-249737280","issue_url":"https://api.github.com/repos/termux/termux-packages/issues/434","id":249737280,"user":{"login":"fornwall","id":277251,"avatar_url":"https://avatars.githubusercontent.com/u/277251?v=3","gravatar_id":"","url":"https://api.github.com/users/fornwall","html_url":"https://github.com/fornwall","followers_url":"https://api.github.com/users/fornwall/followers","following_url":"https://api.github.com/users/fornwall/following{/other_user}","gists_url":"https://api.github.com/users/fornwall/gists{/gist_id}","starred_url":"https://api.github.com/users/fornwall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fornwall/subscriptions","organizations_url":"https://api.github.com/users/fornwall/orgs","repos_url":"https://api.github.com/users/fornwall/repos","events_url":"https://api.github.com/users/fornwall/events{/privacy}","received_events_url":"https://api.github.com/users/fornwall/received_events","type":"User","site_admin":false},"created_at":"2016-09-27T00:40:58Z","updated_at":"2016-09-27T00:40:58Z","body":"This has now been fixed. After updating packages (`apt update && apt upgrade`) one needs to rebuild the ffi gem:\r\n\r\n    gem uninstall ffi && gem install ffi"}}
{"actor":{"display_login":"fornwall"}}