Skip to content

Ruby wrapper#36

Open
v0dro wants to merge 19 commits intomasterfrom
ruby-wrapper
Open

Ruby wrapper#36
v0dro wants to merge 19 commits intomasterfrom
ruby-wrapper

Conversation

@v0dro
Copy link

@v0dro v0dro commented Sep 25, 2018

Ruby wrapper for XND.

v0dro and others added 5 commits September 25, 2018 14:47
This commit fixes the following compile error with `-Wreturn-type`.

```
In file included from ./ruby_xnd_internal.h:52:
./util.h:148:6: error: non-void function 'rb_range_unpack' should return a value [-Wreturn-type]
     return;
     ^
float_pack_unpack.c:76:17: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
  for (i = 0; i < sizeof(float); ++i) {
              ~ ^ ~~~~~~~~~~~~~
float_pack_unpack.c:105:23: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
        for (i = 0; i < sizeof(float); ++i) {
                    ~ ^ ~~~~~~~~~~~~~
float_pack_unpack.c:143:17: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
  for (i = 0; i < sizeof(double); ++i) {
              ~ ^ ~~~~~~~~~~~~~~
float_pack_unpack.c:166:23: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
        for (i = 0; i < sizeof(double); ++i) {
                    ~ ^ ~~~~~~~~~~~~~~
7 warnings and 1 error generated.
```
@skrah skrah self-requested a review September 25, 2018 13:57
A library must not add any methods to core classes.
It remarkably reduces both the reliability and the availability of this library.
@mrkn
Copy link

mrkn commented Sep 26, 2018

@skrah I sent two pull-requests, #37 and #38, to the ruby-wrapper branch.
These changes are important for the ruby wrapper, so please merge them to the ruby-wrapper branch before merging this pull-request to the master branch.

@v0dro
Copy link
Author

v0dro commented Sep 26, 2018

@mrkn merged.

@skrah
Copy link
Member

skrah commented Oct 10, 2018

This is the strange load error:

$ /home/stefan/rel/bin/irb
irb(main):001:0> require "ndtypes"
=> true
irb(main):002:0> require "xnd"
Traceback (most recent call last):
        9: from /home/stefan/rel/bin/irb:11:in `<main>'
        8: from (irb):2
        7: from /home/stefan/rel/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:34:in `require'
        6: from /home/stefan/rel/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:130:in `rescue in require'
        5: from /home/stefan/rel/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:130:in `require'
        4: from /home/stefan/rel/lib/ruby/gems/2.6.0/gems/xnd-0.2.0dev5/lib/xnd.rb:32:in `<top (required)>'
        3: from /home/stefan/rel/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:34:in `require'
        2: from /home/stefan/rel/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:130:in `rescue in require'
        1: from /home/stefan/rel/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:130:in `require'
LoadError (libruby.so.2.4: cannot open shared object file: No such file or directory - /home/stefan/rel/lib/ruby/gems/2.6.0/gems/xnd-0.2.0dev5/lib/ruby_xnd.so)
irb(main):003:0> 
irb(main):004:0> 
$ 
$ 
$ ls /home/stefan/rel/lib/ruby/gems/2.6.0/gems/xnd-0.2.0dev5/lib/ruby_xnd.so
/home/stefan/rel/lib/ruby/gems/2.6.0/gems/xnd-0.2.0dev5/lib/ruby_xnd.so

@skrah
Copy link
Member

skrah commented Oct 10, 2018

Perhaps an RPATH issue.

@v0dro
Copy link
Author

v0dro commented Nov 16, 2018

@skrah can you please try gem install xnd --pre again? I've just pushed a new version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants