I'm having a hard time installing a gem required by my Ruby project (automated tests based on Cucumber and SitePrism but I don't think that's relevant).
The output suggests a problem with native extensions but I do have the devkit installed and have previously used it without any trouble.
$ gem install oily_png -v '1.1.2'
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing oily_png:
ERROR: Failed to build gem native extension.
c:/Ruby193/bin/ruby.exe -r ./siteconf20150430-6252-1aexxhi.rb extconf.rb
creating Makefile
make clean
Makefile:165: *** target pattern contains no `%'. Stop.
make
Makefile:165: *** target pattern contains no `%'. Stop.
make failed, exit code 2
Gem files will remain installed in
c:/Ruby193/lib/ruby/gems/1.9.1/gems/oily_png-1.1.2 for inspection.
Results logged to
c:/Ruby193/lib/ruby/gems/1.9.1/extensions/x86-mingw32/1.9.1/oily_png-1.1.2/gem_make.out
The contents of the gem_make.out
(pun intended?) log file is as follows
c:/Ruby193/bin/ruby.exe extconf.rb
creating Makefile
make clean
make
generating oily_png-i386-mingw32.def
compiling color.c
compiling oily_png_ext.c
oily_png_ext.c: In function 'Init_oily_png':
oily_png_ext.c:13:3: warning: ISO C90 forbids mixed declarations and code
oily_png_ext.c:17:3: warning: ISO C90 forbids mixed declarations and code
oily_png_ext.c:21:3: warning: ISO C90 forbids mixed declarations and code
oily_png_ext.c:30:3: warning: ISO C90 forbids mixed declarations and code
compiling operations.c
operations.c: In function 'oily_png_compose_bang':
operations.c:28:3: warning: ISO C90 forbids mixed declarations and code
operations.c:41:3: warning: ISO C90 forbids mixed declarations and code
operations.c:51:3: warning: ISO C90 forbids mixed declarations and code
operations.c: In function 'oily_png_replace_bang':
operations.c:84:3: warning: ISO C90 forbids mixed declarations and code
operations.c:97:3: warning: ISO C90 forbids mixed declarations and code
operations.c:107:3: warning: ISO C90 forbids mixed declarations and code
compiling png_decoding.c
png_decoding.c: In function 'oily_png_decode_filter_up':
png_decoding.c:20:3: warning: ISO C90 forbids mixed declarations and code
png_decoding.c: In function 'oily_png_decode_scanline_grayscale_1bit':
png_decoding.c:98:3: warning: ISO C90 forbids mixed declarations and code
png_decoding.c: In function 'oily_png_decode_scanline_grayscale_2bit':
png_decoding.c:110:3: warning: ISO C90 forbids mixed declarations and code
png_decoding.c: In function 'oily_png_decode_scanline_grayscale_4bit':
png_decoding.c:122:3: warning: ISO C90 forbids mixed declarations and code
png_decoding.c: In function 'oily_png_decode_scanline_grayscale_8bit':
png_decoding.c:134:3: warning: ISO C90 forbids mixed declarations and code
png_decoding.c: In function 'oily_png_decode_scanline_grayscale_16bit':
png_decoding.c:146:3: warning: ISO C90 forbids mixed declarations and code
png_decoding.c: In function 'oily_png_decode_scanline_grayscale_alpha_8bit':
png_decoding.c:158:3: warning: ISO C90 forbids mixed declarations and code
png_decoding.c: In function 'oily_png_decode_scanline_grayscale_alpha_16bit':
png_decoding.c:170:3: warning: ISO C90 forbids mixed declarations and code
png_decoding.c: In function 'oily_png_decode_scanline_truecolor_8bit':
png_decoding.c:210:3: warning: ISO C90 forbids mixed declarations and code
png_decoding.c: In function 'oily_png_decode_scanline_truecolor_16bit':
png_decoding.c:222:3: warning: ISO C90 forbids mixed declarations and code
png_decoding.c: In function 'oily_png_decode_scanline_truecolor_alpha_8bit':
png_decoding.c:234:3: warning: ISO C90 forbids mixed declarations and code
png_decoding.c: In function 'oily_png_decode_scanline_truecolor_alpha_16bit':
png_decoding.c:246:3: warning: ISO C90 forbids mixed declarations and code
png_decoding.c: In function 'oily_png_decode_png_image_pass':
png_decoding.c:336:5: warning: ISO C90 forbids mixed declarations and code
png_decoding.c:340:5: warning: ISO C90 forbids mixed declarations and code
png_decoding.c:346:5: warning: ISO C90 forbids mixed declarations and code
png_decoding.c:351:5: warning: ISO C90 forbids mixed declarations and code
compiling png_encoding.c
png_encoding.c: In function 'oily_png_encode_filter_up':
png_encoding.c:15:3: warning: ISO C90 forbids mixed declarations and code
png_encoding.c: In function 'oily_png_encode_scanline_grayscale_1bit':
png_encoding.c:53:3: warning: ISO C90 forbids mixed declarations and code
png_encoding.c: In function 'oily_png_encode_scanline_grayscale_2bit':
png_encoding.c:72:3: warning: ISO C90 forbids mixed declarations and code
png_encoding.c: In function 'oily_png_encode_scanline_grayscale_4bit':
png_encoding.c:86:3: warning: ISO C90 forbids mixed declarations and code
png_encoding.c: In function 'oily_png_encode_scanline_grayscale_8bit':
png_encoding.c:98:3: warning: ISO C90 forbids mixed declarations and code
png_encoding.c: In function 'oily_png_encode_scanline_grayscale_alpha_8bit':
png_encoding.c:109:3: warning: ISO C90 forbids mixed declarations and code
png_encoding.c: In function 'oily_png_encode_scanline_truecolor_8bit':
png_encoding.c:161:3: warning: ISO C90 forbids mixed declarations and code
png_encoding.c: In function 'oily_png_encode_scanline_truecolor_alpha_8bit':
png_encoding.c:172:3: warning: ISO C90 forbids mixed declarations and code
png_encoding.c: In function 'oily_png_encode_png_image_pass_to_stream':
png_encoding.c:247:3: warning: ISO C90 forbids mixed declarations and code
png_encoding.c:257:3: warning: ISO C90 forbids mixed declarations and code
png_encoding.c:262:3: warning: ISO C90 forbids mixed declarations and code
png_encoding.c:275:3: warning: ISO C90 forbids mixed declarations and code
compiling resampling.c
resampling.c: In function 'oily_png_generate_steps_residues':
resampling.c:23:3: warning: ISO C90 forbids mixed declarations and code
resampling.c: In function 'oily_png_canvas_steps':
resampling.c:48:3: warning: ISO C90 forbids mixed declarations and code
resampling.c:57:3: warning: ISO C90 forbids mixed declarations and code
resampling.c: In function 'oily_png_canvas_steps_residues':
resampling.c:75:3: warning: ISO C90 forbids mixed declarations and code
resampling.c:89:3: warning: ISO C90 forbids mixed declarations and code
resampling.c:107:3: warning: ISO C90 forbids mixed declarations and code
resampling.c: In function 'oily_png_canvas_resample_nearest_neighbor_bang':
resampling.c:130:3: warning: ISO C90 forbids mixed declarations and code
resampling.c:136:7: warning: ISO C90 forbids mixed declarations and code
resampling.c: In function 'oily_png_canvas_resample_bilinear_bang':
resampling.c:173:3: warning: ISO C90 forbids mixed declarations and code
linking shared-object oily_png/oily_png.so
make install
/usr/bin/install -c -m 0755 oily_png.so c:/Ruby193/lib/ruby/gems/1.9.1/gems/oily_png-1.1.2/ext/oily_png/.gem.20150430-4216-fq2e2a/oily_png
installing default oily_png libraries
But all I can see are warnings and none of them rings a bell to me.
I'm using Windows. Specifically, Windows 8.1 Enterprise x64
After a while of googling, I found this issue on the rubygems Github
One of the suggested solutions is to downgrade rubygems to 2.3 (I had 2.4 installed)
gem update --system 2.3.0
This fixed the problem for me and my bundle
completed successfully.