New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot build with Ruby 2.4.0-preview1 #305

Closed
schneems opened this Issue Jun 20, 2016 · 6 comments

Comments

Projects
None yet
2 participants
@schneems

schneems commented Jun 20, 2016

I think this is because Fixnum and Bignum are now simply Integer in Ruby 2.4.0

Here is the failure I get on Ruby 2.4.0-preview1:

$ gem install oj
Building native extensions.  This could take a while...
ERROR:  Error installing oj:
    ERROR: Failed to build gem native extension.

    current directory: /Users/richardschneeman/.gem/ruby/2.4.0/gems/oj-2.16.0/ext/oj
/Users/richardschneeman/.rubies/ruby-2.4.0-preview1/bin/ruby -r ./siteconf20160620-32521-6nas02.rb extconf.rb
>>>>> Creating Makefile for ruby version 2.4.0 on x86_64-darwin14 <<<<<
creating Makefile

current directory: /Users/richardschneeman/.gem/ruby/2.4.0/gems/oj-2.16.0/ext/oj
make "DESTDIR=" clean

current directory: /Users/richardschneeman/.gem/ruby/2.4.0/gems/oj-2.16.0/ext/oj
make "DESTDIR="
compiling cache8.c
compiling circarray.c
compiling compat.c
compiling dump.c
dump.c:570:8: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
        cnt = RSTRING_LEN(rstr);
            ~ ^~~~~~~~~~~~~~~~~
/Users/richardschneeman/.rubies/ruby-2.4.0-preview1/include/ruby-2.4.0/ruby/ruby.h:965:6: note: expanded from macro 'RSTRING_LEN'
     RSTRING_EMBED_LEN(str) : \
     ^~~~~~~~~~~~~~~~~~~~~~
/Users/richardschneeman/.rubies/ruby-2.4.0-preview1/include/ruby-2.4.0/ruby/ruby.h:961:6: note: expanded from macro 'RSTRING_EMBED_LEN'
     (long)((RBASIC(str)->flags >> RSTRING_EMBED_LEN_SHIFT) & \
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dump.c:570:8: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
        cnt = RSTRING_LEN(rstr);
            ~ ^~~~~~~~~~~~~~~~~
/Users/richardschneeman/.rubies/ruby-2.4.0-preview1/include/ruby-2.4.0/ruby/ruby.h:966:28: note: expanded from macro 'RSTRING_LEN'
     RSTRING(str)->as.heap.len)
     ~~~~~~~~~~~~~~~~~~~~~~^~~
dump.c:1929:17: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
            int         len = RSTRING_LEN(v);
                        ~~~   ^~~~~~~~~~~~~~
/Users/richardschneeman/.rubies/ruby-2.4.0-preview1/include/ruby-2.4.0/ruby/ruby.h:965:6: note: expanded from macro 'RSTRING_LEN'
     RSTRING_EMBED_LEN(str) : \
     ^~~~~~~~~~~~~~~~~~~~~~
/Users/richardschneeman/.rubies/ruby-2.4.0-preview1/include/ruby-2.4.0/ruby/ruby.h:961:6: note: expanded from macro 'RSTRING_EMBED_LEN'
     (long)((RBASIC(str)->flags >> RSTRING_EMBED_LEN_SHIFT) & \
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dump.c:1929:17: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
            int         len = RSTRING_LEN(v);
                        ~~~   ^~~~~~~~~~~~~~
/Users/richardschneeman/.rubies/ruby-2.4.0-preview1/include/ruby-2.4.0/ruby/ruby.h:966:28: note: expanded from macro 'RSTRING_LEN'
     RSTRING(str)->as.heap.len)
     ~~~~~~~~~~~~~~~~~~~~~~^~~
4 warnings generated.
compiling err.c
compiling fast.c
fast.c:1284:24: error: use of undeclared identifier 'rb_cFixnum'
        case T_FIXNUM:  type = rb_cFixnum;      break;
                               ^
@schneems

This comment has been minimized.

Show comment
Hide comment
@schneems

schneems Jun 20, 2016

$ ruby -v
ruby 2.4.0preview1 (2016-06-20 trunk 55466) [x86_64-darwin14]

schneems commented Jun 20, 2016

$ ruby -v
ruby 2.4.0preview1 (2016-06-20 trunk 55466) [x86_64-darwin14]
@schneems

This comment has been minimized.

Show comment
Hide comment
@schneems

schneems Jun 20, 2016

Would be fixed by #304

schneems commented Jun 20, 2016

Would be fixed by #304

@ohler55

This comment has been minimized.

Show comment
Hide comment
@ohler55

ohler55 Jul 5, 2016

Owner

Are you still seeing a problem with the 2.16.1 release from 2 weeks ago?

Owner

ohler55 commented Jul 5, 2016

Are you still seeing a problem with the 2.16.1 release from 2 weeks ago?

@ohler55

This comment has been minimized.

Show comment
Hide comment
@ohler55

ohler55 Jul 8, 2016

Owner

No response, closing.

Owner

ohler55 commented Jul 8, 2016

No response, closing.

@ohler55 ohler55 closed this Jul 8, 2016

@schneems

This comment has been minimized.

Show comment
Hide comment
@schneems

schneems Jul 11, 2016

Works for me, thanks!

schneems commented Jul 11, 2016

Works for me, thanks!

@ohler55

This comment has been minimized.

Show comment
Hide comment
@ohler55

ohler55 Jul 11, 2016

Owner

Super, thanks.

Owner

ohler55 commented Jul 11, 2016

Super, thanks.

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