On Mon, May 17, 2010 at 6:32 PM, David Stamm <
why...@gmail.com> wrote:
> Thanks for the speedy response! Alas, that did not seem to do the
> trick.
>
> I downloaded the 1.2.3 download you linked to, and extracted it into
> C:/Ruby/lib/zlib (which I thought was a good place to avoid losing
> it). I modified the "gem install" command to reflect the new paths.
>
> I got the exact same error message:
> checking for zlib.h... no
>
Ah, zipruby uses --with-opt as options.
gem install zipruby -- --with-opt-include=... --with-opt-lib=...
However, the problem seems that zlib 1.2.3 do not have the static
(libz) gem zipruby is looking for:
checking for main() in -lz... no
*** extconf.rb failed ***
Going inside lib folder and chaning "zdll.lib" to "libz.a" seems does
the trick... but:
checking for zlib.h... yes
checking for main() in -lz... yes
checking for fseeko()... no
checking for ftello()... no
checking for mkstemp()... no
creating Makefile
make
gcc -I. -I. -IC:/Users/Luis/Tools/Ruby/ruby-1.8.7-p249-i386-mingw32/lib/ruby/1.8/i386-mingw32
-I. -DHAVE_ZLIB_H -IC:/Users/Luis/Projects/_sandbox/zlib/include -g
-O2 -c mkstemp.c
mkstemp.c:51:1: warning: "S_ISDIR" redefined
In file included from mkstemp.c:37:
C:/Users/Luis/Tools/MinGW/gcc/bin/../lib/gcc/mingw32/3.4.5/../../../../include/sys/stat.h:68:1:
warning: this is the location of the previous definition
gcc -I. -I. -IC:/Users/Luis/Tools/Ruby/ruby-1.8.7-p249-i386-mingw32/lib/ruby/1.8/i386-mingw32
-I. -DHAVE_ZLIB_H -IC:/Users/Luis/Projects/_sandbox/zlib/include -g
-O2 -c tmpfile.c
gcc -I. -I. -IC:/Users/Luis/Tools/Ruby/ruby-1.8.7-p249-i386-mingw32/lib/ruby/1.8/i386-mingw32
-I. -DHAVE_ZLIB_H -IC:/Users/Luis/Projects/_sandbox/zlib/include -g
-O2 -c zipruby.c
In file included from zipruby_archive.h:4,
from zipruby.c:7:
zip.h:50: error: conflicting types for 'ssize_t'
C:/Users/Luis/Tools/MinGW/gcc/bin/../lib/gcc/mingw32/3.4.5/../../../../include/sys/types.h:104:
error: previous declaration of 'ssize_t' was here
seems that the zip.h included in zipruby is trying to be so clever and
replace what MinGW is defining.
I can suggest you the following steps:
1) Reach the gem author:
http://rubygems.org/gems/zipruby and ask for
native binaries for Windows (RubyInstaller)
2) Propose to him use rake-compiler to ease the burden of
cross-compilation (in case the author is running Linux/OSX)
http://github.com/luislavena/rake-compiler
3) Hack the changes and submit a patch to his project.
Taking in consideration you mention that you're new to Ruby, #3 seems
a bit too complicated.
I would suggest proceed with 1 and 2, and point the gem author to
reach us (RubyInstaller group) and we can provide hints and guidance
on better Windows support.