Cannot install gem on Windows Ruby 2.0.0p0 #77

Closed
jarmo opened this Issue Mar 9, 2013 · 17 comments

Comments

Projects
None yet
2 participants
@jarmo
Contributor

jarmo commented Mar 9, 2013

Hi!

I can't install oj on Windows using Ruby 2.0.0p0.

C:\>gem install oj
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing oj:
        ERROR: Failed to build gem native extension.

    C:/bin/Ruby200-p0/bin/ruby.exe extconf.rb
>>>>> Creating Makefile for ruby version 2.0.0 on i386-mingw32 <<<<<
creating Makefile

make
generating oj-i386-mingw32.def
compiling cache.c
compiling cache8.c
cache8.c: In function 'slot_print':
cache8.c:97:3: warning: unknown conversion type character 'l' in format
cache8.c:97:3: warning: unknown conversion type character 'l' in format
cache8.c:97:3: warning: too many arguments for format
compiling dump.c
dump.c: In function 'dump_time':
dump.c:932:12: error: variable 'ts' has initializer but incomplete type
dump.c:932:12: error: invalid use of undefined type 'struct timespec'
dump.c:932:21: error: storage size of 'ts' isn't known
dump.c:932:21: warning: unused variable 'ts'
dump.c: In function 'dump_xml_time':
dump.c:1007:12: error: variable 'ts' has initializer but incomplete type
dump.c:1007:12: error: invalid use of undefined type 'struct timespec'
dump.c:1007:21: error: storage size of 'ts' isn't known
dump.c:1007:21: warning: unused variable 'ts'
make: *** [dump.o] Error 1


Gem files will remain installed in C:/bin/Ruby200-p0/lib/ruby/gems/2.0.0/gems/oj-2.0.9 for inspection.
Results logged to C:/bin/Ruby200-p0/lib/ruby/gems/2.0.0/gems/oj-2.0.9/ext/oj/gem_make.out
@ohler55

This comment has been minimized.

Show comment
Hide comment
@ohler55

ohler55 Mar 10, 2013

Owner

I can make some changes to the extconf.rb but could use some help testing. Are you willing to test some options?

Owner

ohler55 commented Mar 10, 2013

I can make some changes to the extconf.rb but could use some help testing. Are you willing to test some options?

@jarmo

This comment has been minimized.

Show comment
Hide comment
@jarmo

jarmo Mar 10, 2013

Contributor

Thanks!

I can help you test it out.

Contributor

jarmo commented Mar 10, 2013

Thanks!

I can help you test it out.

@ohler55

This comment has been minimized.

Show comment
Hide comment
@ohler55

ohler55 Mar 10, 2013

Owner

Great, I checked in a change that may work. Can you pull and test?

Owner

ohler55 commented Mar 10, 2013

Great, I checked in a change that may work. Can you pull and test?

@jarmo

This comment has been minimized.

Show comment
Hide comment
@jarmo

jarmo Mar 10, 2013

Contributor

I'm not sure if i do it correctly, but this is the result:

C:\Users\Jarmo\Documents\Projects\Ruby\oj\ext\oj>ruby extconf.rb
>>>>> Creating Makefile for ruby version 2.0.0 on i386-mingw32 <<<<<
creating Makefile
make: [clean] Error 1 (ignored)
Contributor

jarmo commented Mar 10, 2013

I'm not sure if i do it correctly, but this is the result:

C:\Users\Jarmo\Documents\Projects\Ruby\oj\ext\oj>ruby extconf.rb
>>>>> Creating Makefile for ruby version 2.0.0 on i386-mingw32 <<<<<
creating Makefile
make: [clean] Error 1 (ignored)
@ohler55

This comment has been minimized.

Show comment
Hide comment
@ohler55

ohler55 Mar 10, 2013

Owner

That is the first step. The second step is to type

make

That should build the code, hopefully without errors.

Owner

ohler55 commented Mar 10, 2013

That is the first step. The second step is to type

make

That should build the code, hopefully without errors.

@jarmo

This comment has been minimized.

Show comment
Hide comment
@jarmo

jarmo Mar 10, 2013

Contributor

Not many errors indeed. Even too little for me. That's what confused me before when i executed make.

C:\Users\Jarmo\Documents\Projects\Ruby\oj\ext\oj>ruby extconf.rb
>>>>> Creating Makefile for ruby version 2.0.0 on i386-mingw32 <<<<<
creating Makefile
make: [clean] Error 1 (ignored)

C:\Users\Jarmo\Documents\Projects\Ruby\oj\ext\oj>make
make: *** [oj-i386-mingw32.def] Error 1

C:\Users\Jarmo\Documents\Projects\Ruby\oj\ext\oj>echo %ERRORLEVEL%
2
Contributor

jarmo commented Mar 10, 2013

Not many errors indeed. Even too little for me. That's what confused me before when i executed make.

C:\Users\Jarmo\Documents\Projects\Ruby\oj\ext\oj>ruby extconf.rb
>>>>> Creating Makefile for ruby version 2.0.0 on i386-mingw32 <<<<<
creating Makefile
make: [clean] Error 1 (ignored)

C:\Users\Jarmo\Documents\Projects\Ruby\oj\ext\oj>make
make: *** [oj-i386-mingw32.def] Error 1

C:\Users\Jarmo\Documents\Projects\Ruby\oj\ext\oj>echo %ERRORLEVEL%
2
@ohler55

This comment has been minimized.

Show comment
Hide comment
@ohler55

ohler55 Mar 10, 2013

Owner

Not very helpful is it. Try editing the Makefile after it is created. Set V to 1 and see if that produces more output when you type make.

Owner

ohler55 commented Mar 10, 2013

Not very helpful is it. Try editing the Makefile after it is created. Set V to 1 and see if that produces more output when you type make.

@jarmo

This comment has been minimized.

Show comment
Hide comment
@jarmo

jarmo Mar 10, 2013

Contributor

The problem was with make. I used the one which came with DevKit and it worked perfectly. In other words, it seems to compile as expected.

Contributor

jarmo commented Mar 10, 2013

The problem was with make. I used the one which came with DevKit and it worked perfectly. In other words, it seems to compile as expected.

@ohler55

This comment has been minimized.

Show comment
Hide comment
@ohler55

ohler55 Mar 10, 2013

Owner

Cool. If the tests pass I will make a release. Would you mind running the tests in the test directory.
tests.rb
test_mimic.rb
test_fast.rb
test_saj.rb

Thanks.

Owner

ohler55 commented Mar 10, 2013

Cool. If the tests pass I will make a release. Would you mind running the tests in the test directory.
tests.rb
test_mimic.rb
test_fast.rb
test_saj.rb

Thanks.

@ohler55

This comment has been minimized.

Show comment
Hide comment
@ohler55

ohler55 Mar 10, 2013

Owner

uh, did you need the change in the extconf.rb file or not?

Owner

ohler55 commented Mar 10, 2013

uh, did you need the change in the extconf.rb file or not?

@jarmo

This comment has been minimized.

Show comment
Hide comment
@jarmo

jarmo Mar 10, 2013

Contributor

One of the tests are failing:

  1) Error:
test_time_object_early(Juice):
ArgumentError: time must be positive
    tests.rb:988:in `load'
    tests.rb:988:in `dump_and_load'
    tests.rb:399:in `test_time_object_early'

It is also failing when compiling with 1.9.3 though.

Contributor

jarmo commented Mar 10, 2013

One of the tests are failing:

  1) Error:
test_time_object_early(Juice):
ArgumentError: time must be positive
    tests.rb:988:in `load'
    tests.rb:988:in `dump_and_load'
    tests.rb:399:in `test_time_object_early'

It is also failing when compiling with 1.9.3 though.

@jarmo

This comment has been minimized.

Show comment
Hide comment
@jarmo

jarmo Mar 10, 2013

Contributor

If i revert the change in extconf.rb then compilation will fail with the same errors as described in this issue.

Contributor

jarmo commented Mar 10, 2013

If i revert the change in extconf.rb then compilation will fail with the same errors as described in this issue.

@ohler55

This comment has been minimized.

Show comment
Hide comment
@ohler55

ohler55 Mar 11, 2013

Owner

Sadly that error comes from a ruby call. Apparently on Windows ruby does not times before 1970 when using seconds to set it. I can have that test skipped for Windows but you should keep in mind that using the unix time format with Windows will have problems with dates before 1970.

Owner

ohler55 commented Mar 11, 2013

Sadly that error comes from a ruby call. Apparently on Windows ruby does not times before 1970 when using seconds to set it. I can have that test skipped for Windows but you should keep in mind that using the unix time format with Windows will have problems with dates before 1970.

@ohler55

This comment has been minimized.

Show comment
Hide comment
@ohler55

ohler55 Mar 11, 2013

Owner

Can you send me the dump of the compile errors with 1.9.3?

Owner

ohler55 commented Mar 11, 2013

Can you send me the dump of the compile errors with 1.9.3?

@jarmo

This comment has been minimized.

Show comment
Hide comment
@jarmo

jarmo Mar 11, 2013

Contributor

I'm not sure i understand what you mean by that. I was refering to c1ec2b7 when i mentioned that compilation will fail with errors on Ruby 2.0 if that commit is reverted.

Contributor

jarmo commented Mar 11, 2013

I'm not sure i understand what you mean by that. I was refering to c1ec2b7 when i mentioned that compilation will fail with errors on Ruby 2.0 if that commit is reverted.

@ohler55

This comment has been minimized.

Show comment
Hide comment
@ohler55

ohler55 Mar 14, 2013

Owner

Did the 2.0.10 release take care of the problems other than the failed test for times before 1970?

Owner

ohler55 commented Mar 14, 2013

Did the 2.0.10 release take care of the problems other than the failed test for times before 1970?

@jarmo

This comment has been minimized.

Show comment
Hide comment
@jarmo

jarmo Mar 14, 2013

Contributor

Everything seems to be okay :) Thanks!

Contributor

jarmo commented Mar 14, 2013

Everything seems to be okay :) Thanks!

@ohler55 ohler55 closed this Mar 14, 2013

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