Installing libxml-ruby on Windows: zlib

R

Robert Breininger

I tried installing with gems, and got:
checking for inflate() in z.lib... no
extconf failure: need zlib

Ok, fetched zlib (http://www.zlatkovic.com/pub/libxml/), extracted it to
C:\Programme\winlib, changed to ext/xml and tried:
ruby extconf.rb --with-zlib-dir=C:\Programme\winlib

and got:
checking for inflate() in z.lib... no
extconf failure: need zlib

Also setting %INCLUDE% and %LIB% did not change anything. Where to go
from here? How can I tell ruby to look at the right place?

Robert
 
R

Ross Bamford

I tried installing with gems, and got:
checking for inflate() in z.lib... no
extconf failure: need zlib

Ok, fetched zlib (http://www.zlatkovic.com/pub/libxml/), extracted it to
C:\Programme\winlib, changed to ext/xml and tried:
ruby extconf.rb --with-zlib-dir=C:\Programme\winlib

and got:
checking for inflate() in z.lib... no
extconf failure: need zlib

Also setting %INCLUDE% and %LIB% did not change anything. Where to go
from here? How can I tell ruby to look at the right place?

I'm not sure how this works with Windows, but I'm guessing it's either:

* No Zlib headers (zlib.h) in the distribution you downloaded.

* Or, the distribution doesn't have the expected directory
layout on a Windows machine.

You'll need to make sure you have both the library and the headers, and
then try a command like the following:

ruby extconf.rb --with-zlib-lib=C:\path\ --with-zlib-include=C:\path\

(Maybe the two paths are the same, maybe not - as long as the lib
directory contains the zlib so (dll?) and the include directory has
zlib.h, it will hopefully work fine. If I've missed something
Windows-specific here, fingers crossed that someone will jump in and tell
me so :)
 
R

Robert Breininger

Ross said:
I'm not sure how this works with Windows, but I'm guessing it's either:

* No Zlib headers (zlib.h) in the distribution you downloaded.

* Or, the distribution doesn't have the expected directory
layout on a Windows machine.

You'll need to make sure you have both the library and the headers, and
then try a command like the following:

ruby extconf.rb --with-zlib-lib=C:\path\ --with-zlib-include=C:\path\

Ross,
thank you for your reply. According to the documentation, this is the
same as --with-zlib-dir=C:\path\

Unfortunately it does not work (but i can see in the mkmf.log file that
the paths are correct). My directory contains the follwoing data:
../bin:
minigzip.exe
zlib1.dll

../include:
zconf.h
zlib.h

../lib:
zdll.lib
zlib.lib

I've tried several variations of parameters, but it always complains
about not finding zlib.h.
Meanwhile i've read that quite a lot of people have a similar problem
with installing (Ruby-)stuff on Windows machines. And it always ends
with not finding .h files, even though they are there (e.g. ruby-ldap).
So it seems not to be a specifically problem of zlib. Is there anybody
out there, who has a deeper insight on this subject, and can say
something? Is there anybody out there, who actually managed to install
libxml-ruby on a Windows machine?

Robert
 
R

Ross Bamford

Ross,
thank you for your reply. According to the documentation, this is the
same as --with-zlib-dir=C:\path\

Not quite: --with-zlib-dir=C:\path\ would expect C:\path\lib and
C:\path\include, while with the individual options you're specifying the
actual include/lib directories manually. However:
I've tried several variations of parameters, but it always complains
about not finding zlib.h.
Meanwhile i've read that quite a lot of people have a similar problem
with installing (Ruby-)stuff on Windows machines. And it always ends
with not finding .h files, even though they are there (e.g. ruby-ldap)..
So it seems not to be a specifically problem of zlib. Is there anybody
out there, who has a deeper insight on this subject, and can say
something? Is there anybody out there, who actually managed to install
libxml-ruby on a Windows machine?

I'm afraid I can't be of much help here, since I don't have a Windows
machine to build/test with, and I haven't a clue about how things work
over there. I do know of people who've gotten it running on Windows,
however, I believe using that same Zlib port... It might be worth putting
your question to the libxml-ruby list, see:

http://rubyforge.org/mailman/listinfo/libxml-devel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top