Bugs: Browse | Submit New | Admin

[#27462] Does not compile with Ruby 1.9

Date:
2009-11-20 05:45
Priority:
3
Submitted By:
Gavin Kistner (phrogz)
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
Does not compile with Ruby 1.9

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

/usr/local/bin/ruby extconf.rb
checking for main() in -llevenshtein_array... no
checking for main() in -llevenshtein_array_of_strings... no
checking for main() in -llevenshtein_generic... no
checking for main() in -llevenshtein_string... no
creating Makefile

make
gcc -I. -I/usr/local/include/ruby-1.9.1/i386-darwin10.0.0 -I/usr/local/include/ruby-1.9.1/ruby/backward
-I/usr/local/include/ruby-1.9.1 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -fno-common  -O2 -g -Wall -Wno-parentheses
-pipe -fno-common  -o levenshtein_array.o -c levenshtein_array.c
levenshtein_array.c: In function ‘levenshtein_distance_array’:
levenshtein_array.c:15: error: ‘struct RArray’ has no member named ‘len’
levenshtein_array.c:16: error: ‘struct RArray’ has no member named ‘len’
make: *** [levenshtein_array.o] Error 1

Add A Comment: Notepad

Please login


Followup

Message
Date: 2010-02-25 10:02
Sender: Xavier Noëlle

This problem can be easily addressed by replacing:
RARRAY(rb_o1)->len with RARRAY_LEN(rb_o1)
RARRAY(rb_o1)->ptr with RARRAY_PTR(rb_o1)

There is also a similar problem with RSTRING, so one needs to
replace:
RSTRING(rb_o1)->len with RSTRING_LEN(rb_o1)
RSTRING(rb_o1)->ptr with RSTRING_PTR(rb_o1)

That should do the trick, so can someone patch this to get a
proper gem release ?

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item