2

I initiated an install of an older version of Ruby with ruby-install ruby 2.0.0

compiling readline.c
readline.c:1886:26: error: use of undeclared identifier 'Function'
    rl_pre_input_hook = (Function *)readline_pre_input_hook;
                         ^
readline.c:1886:36: error: expected expression
    rl_pre_input_hook = (Function *)readline_pre_input_hook;
                                   ^
2 errors generated.
make[2]: *** [readline.o] Error 1
make[1]: *** [ext/readline/all] Error 2
make: *** [build-ext] Error 2
!!! Compiling ruby 2.0.0-p451 failed!

Above this error, I had a bunch of warnings as well:

compiling parser.c
parser.c:94:18: warning: unused variable 'JSON_object_error' [-Wunused-const-variable]
static const int JSON_object_error = 0;
                 ^
parser.c:96:18: warning: unused variable 'JSON_object_en_main' [-Wunused-const-variable]
static const int JSON_object_en_main = 1;

...many more like this

16 warnings generated.

I have ruby 2.1.0 installed and working fine, but I need to work on a project with 2.0.0. I am using chruby, not RVM.

Any ideas?

Benjamin Dunphy
  • 869
  • 1
  • 9
  • 15

1 Answers1

0

Seems to be related to this issue https://github.com/sstephenson/ruby-build/issues/526 and has been fixed in the latest versions of ruby.

Herman J. Radtke III
  • 1,804
  • 1
  • 24
  • 29