Skip to content

Instantly share code, notes, and snippets.

@sempervictus
Last active December 13, 2015 16:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sempervictus/3a40af1fb5a685479933 to your computer and use it in GitHub Desktop.
Save sempervictus/3a40af1fb5a685479933 to your computer and use it in GitHub Desktop.
RBX fail with ffi-inline
Successfully installed ffi-inline-0.0.4.1
1 gem installed
User@unknown:/tmp/ruby-ffi-inline(master)$ rake
rspec inline_spec.rb --color --format doc
FFI::Inline
should extend the module with inline methods
should correctly parse function signature
should load cached libraries (FAILED - 1)
should recompile if the code is updated
should recompile if the code is changed after a failure
should be configured using the block form
should allow users to add type maps
should allow users to include header files
should allow users to add external libraries (FAILED - 2)
should generate C struct from FFI::Struct (PENDING: No reason given)
should return the current compiler
should raise errors
should respect blocking flag
GXX compiler
should compile and link a shim C library that encapsulates C++ code
Pending:
FFI::Inline should generate C struct from FFI::Struct
# No reason given
# ./inline_spec.rb:188
Failures:
1) FFI::Inline should load cached libraries
Failure/Error: inline "void* cached_func() {}"
(<File (class)>).open("/tmp/.ffi-inline-1000/d9709cf336a8d618ce964e03dc16172be385d749.log", 578, {:encoding=>"ASCII-8BIT"})
expected: 1 time
received: 2 times
# kernel/common/io19.rb:171:in `write'
# kernel/common/eval19.rb:45:in `instance_eval'
# kernel/common/eval19.rb:45:in `instance_eval'
# kernel/bootstrap/array19.rb:18:in `map'
# kernel/bootstrap/array19.rb:18:in `map'
# kernel/loader.rb:697:in `run_at_exits'
# kernel/loader.rb:717:in `epilogue'
# kernel/loader.rb:850:in `main'
2) FFI::Inline should allow users to add external libraries
Failure/Error: inline "int func() { return 0; }", :libraries => ['foolib1', 'foolib2'] do |builder|
NoMethodError:
undefined method `new' on nil:NilClass.
# kernel/delta/kernel.rb:81:in `new (method_missing)'
# kernel/common/eval19.rb:45:in `instance_eval'
# kernel/bootstrap/array19.rb:18:in `map'
# kernel/bootstrap/array19.rb:18:in `map'
# kernel/loader.rb:697:in `run_at_exits'
# kernel/loader.rb:717:in `epilogue'
# kernel/loader.rb:850:in `main'
Finished in 1.13 seconds
14 examples, 2 failures, 1 pending
Failed examples:
rspec ./inline_spec.rb:44 # FFI::Inline should load cached libraries
rspec ./inline_spec.rb:144 # FFI::Inline should allow users to add external libraries
rake aborted!
Command failed with status (1): [rspec inline_spec.rb --color --format doc...]
/home/User/Code/Ruby/gems/FFI/ruby-ffi-inline/Rakefile:9:in `__script__'
kernel/bootstrap/array.rb:68:in `each'
kernel/bootstrap/array.rb:68:in `each'
kernel/bootstrap/array.rb:68:in `each'
kernel/common/kernel.rb:598:in `load'
kernel/common/block_environment.rb:75:in `call_on_instance'
kernel/common/eval.rb:75:in `eval'
/usr/local/rvm/gems/rbx-head@testing/bin/ruby_noexec_wrapper:14:in `__script__'
kernel/delta/codeloader.rb:68:in `load_script'
kernel/delta/codeloader.rb:118:in `load_script'
kernel/loader.rb:615:in `script'
kernel/loader.rb:816:in `main'
Tasks: TOP => default => test
(See full trace by running task with --trace)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment