santana / ruby-informix

Ruby library for IBM Informix
http://ruby-informix.rubyforge.org
Other
17 stars 7 forks source link

Ruby 1.9 compatibility #1

Closed jhollinger closed 12 years ago

jhollinger commented 12 years ago

What would it take to make this compatible with Ruby 1.9? This is the final dependency keeping our Rails app at Ruby 1.8.7, and soon Rails will be dropping support 1.8.

I'm afraid I don't know anything about Ruby C extensions. The error I get from 'gem install' on 1.9.2 is

Building native extensions.  This could take a while...
ERROR:  Error installing ruby-informix:
    ERROR: Failed to build gem native extension.

        /home/jhollinger/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb
creating Makefile

make
gcc -I. -I/home/jhollinger/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/i686-linux -I/home/jhollinger/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/ruby/backward -I/home/jhollinger/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1 -I. -I/opt/IBM/informix/incl/esql  -D_FILE_OFFSET_BITS=64  -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long  -fPIC  -o informixc.o -c informixc.c
informixc.ec:35:40: error: static declaration of ‘rb_cRational’ follows non-static declaration
/home/jhollinger/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/ruby/ruby.h:1216:19: note: previous declaration of ‘rb_cRational’ was here
informixc.ec: In function ‘rb_slob_initialize’:
informixc.ec:545:4: warning: format ‘%X’ expects argument of type ‘unsigned int’, but argument 3 has type ‘long int’ [-Wformat]
informixc.ec: At top level:
informixc.ec:999:2: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
informixc.ec:999:2: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
informixc.ec:999:2: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
informixc.ec:999:2: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
informixc.ec:999:2: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
informixc.ec:1211:2: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
informixc.ec:1211:2: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
informixc.ec:1211:2: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
informixc.ec:1211:2: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
informixc.ec:1212:1: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
informixc.ec: In function ‘make_result’:
informixc.ec:1913:47: error: ‘struct RArray’ has no member named ‘ptr’
informixc.ec: In function ‘rb_database_columns’:
informixc.ec:2220:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
informixc.ec:2220:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
informixc.ec:2220:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
informixc.ec:2220:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
informixc.ec:2220:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
informixc.ec:2220:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
informixc.ec:2221:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
informixc.ec:2221:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
informixc.ec:2221:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
informixc.ec:2221:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
informixc.ec:2221:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
informixc.ec:2221:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
informixc.ec:2222:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
informixc.ec:2222:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
informixc.ec:2222:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
informixc.ec:2222:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
informixc.ec:2222:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
informixc.ec:2222:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
informixc.ec:2223:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
informixc.ec:2223:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
informixc.ec:2223:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
informixc.ec:2223:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
informixc.ec:2223:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
informixc.ec:2223:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
informixc.ec:2225:2: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
informixc.ec:2228:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
informixc.ec:2228:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
informixc.ec:2228:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
informixc.ec:2228:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
informixc.ec:2228:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
informixc.ec:2229:2: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
informixc.ec: In function ‘each_by’:
informixc.ec:2723:22: error: ‘struct RArray’ has no member named ‘len’
make: *** [informixc.o] Error 1
jhollinger commented 12 years ago

So I began looking into it, and I think backwards-compatible changes should be pretty straightforward. Think I'll fork and submit a patch.

santana commented 12 years ago

Hi Jordan.

I would be glad to add Ruby 1.9 compatibility. Are you available to help me testing it?

You can mail me directly to gerardo.santana at gmail.

Enviado desde mi iPhone

El 05/01/2012, a las 10:38 a.m., Jordan Hollinger reply@reply.github.com escribió:

What would it take to make this compatible with Ruby 1.9? This is the final dependency keeping our Rails app at Ruby 1.8.7, and soon Rails will be dropping support 1.8.

I'm afraid I don't know anything about Ruby C extensions. The error I get from 'gem install' on 1.9.2 is

Building native extensions. This could take a while... ERROR: Error installing ruby-informix: ERROR: Failed to build gem native extension.

       /home/jhollinger/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb

creating Makefile

make gcc -I. -I/home/jhollinger/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/i686-linux -I/home/jhollinger/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/ruby/backward -I/home/jhollinger/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1 -I. -I/opt/IBM/informix/incl/esql -D_FILE_OFFSET_BITS=64 -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -fPIC -o informixc.o -c informixc.c informixc.ec:35:40: error: static declaration of ‘rb_cRational’ follows non-static declaration /home/jhollinger/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/ruby/ruby.h:1216:19: note: previous declaration of ‘rb_cRational’ was here informixc.ec: In function ‘rb_slob_initialize’: informixc.ec:545:4: warning: format ‘%X’ expects argument of type ‘unsigned int’, but argument 3 has type ‘long int’ [-Wformat] informixc.ec: At top level: informixc.ec:999:2: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default] informixc.ec:999:2: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default] informixc.ec:999:2: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default] informixc.ec:999:2: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default] informixc.ec:999:2: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default] informixc.ec:1211:2: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default] informixc.ec:1211:2: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default] informixc.ec:1211:2: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default] informixc.ec:1211:2: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default] informixc.ec:1212:1: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default] informixc.ec: In function ‘make_result’: informixc.ec:1913:47: error: ‘struct RArray’ has no member named ‘ptr’ informixc.ec: In function ‘rb_database_columns’: informixc.ec:2220:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default] informixc.ec:2220:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default] informixc.ec:2220:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default] informixc.ec:2220:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default] informixc.ec:2220:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default] informixc.ec:2220:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default] informixc.ec:2221:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default] informixc.ec:2221:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default] informixc.ec:2221:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default] informixc.ec:2221:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default] informixc.ec:2221:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default] informixc.ec:2221:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default] informixc.ec:2222:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default] informixc.ec:2222:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default] informixc.ec:2222:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default] informixc.ec:2222:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default] informixc.ec:2222:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default] informixc.ec:2222:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default] informixc.ec:2223:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default] informixc.ec:2223:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default] informixc.ec:2223:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default] informixc.ec:2223:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default] informixc.ec:2223:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default] informixc.ec:2223:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default] informixc.ec:2225:2: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default] informixc.ec:2228:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default] informixc.ec:2228:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default] informixc.ec:2228:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default] informixc.ec:2228:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default] informixc.ec:2228:3: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default] informixc.ec:2229:2: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default] informixc.ec: In function ‘each_by’: informixc.ec:2723:22: error: ‘struct RArray’ has no member named ‘len’ make: *\ [informixc.o] Error 1


Reply to this email directly or view it on GitHub: https://github.com/santana/ruby-informix/issues/1

jhollinger commented 12 years ago

I tried emailing, but no response. I have a branch at https://github.com/jhollinger/ruby-informix/commits/ruby_19 that seems to be working in both 1.8 and 1.9. I'm hesitant to submit a pull request yet, since this is my first time in Ruby C Extension land. Let me know if it works for you.

santana commented 12 years ago

I've finally got some time to work on some projects. I've fixed Ruby 1.9 compatibility as well as some warnings.

jhollinger commented 12 years ago

Awesome, that's great.

santana commented 12 years ago

thank you