I did configure/make, and it works until it tries to generate rdoc:
Generating RDoc documentation
/export/home/djberge/Downloads/Ruby/ruby-2.2.0/.ext/common/date.rb:3:in `require': ld.so.1: ruby: fatal: relocation error: file /export/home/djberge/Downloads/Ruby/ruby-2.2.0/.ext/i386-solaris2.10/date_core.so: symbol rb_infinity: referenced symbol not found - /export/home/djberge/Downloads/Ruby/ruby-2.2.0/.ext/i386-solaris2.10/date_core.so (LoadError)
from /export/home/djberge/Downloads/Ruby/ruby-2.2.0/.ext/common/date.rb:3:in `<top (required)>'
from /export/home/djberge/Downloads/Ruby/ruby-2.2.0/lib/time.rb:1:in `require'
from /export/home/djberge/Downloads/Ruby/ruby-2.2.0/lib/time.rb:1:in `<top (required)>'
from /export/home/djberge/Downloads/Ruby/ruby-2.2.0/lib/rdoc/rdoc.rb:6:in `require'
from /export/home/djberge/Downloads/Ruby/ruby-2.2.0/lib/rdoc/rdoc.rb:6:in `<top (required)>'
from ./bin/rdoc:16:in `require'
from ./bin/rdoc:16:in `<main>'
Thanks.
The output of the commands suggest that the macro INFINITY was defined when compiling numeric.c but was not defined when compiling ext/date/date_core.c.
I still couldn't find why.
INFINITY is C99 feature, and whether INFINITY is already defined or not is checked in include/ruby/missing.h:
I don't know what to tell you. For anyone reading this, to get around it I did this:
configure --disable-install-doc --disable-install-rdoc
make
make install
It failed when it tried to install bundle gems, but core Ruby was still installed by that point. So then I went to ext/date and added this line near the top of date_core.c
const union bytesequence4_or_float rb_infinity = {{0x7f, 0x80, 0x00, 0x00}};
ext/date/extconf.rb: try_cflags("-std=iso9899:1999") [Bug #10906]
ruby itself (including numeric.c) is built with strict compile
options including -std=iso9899:1999, but ext/date is not.
By the way -std=iso9899:1999 is not only a warning option but also
changes behavior like MACRO definitions for example INFINITY.
gcc on Solaris affect this.