Problem with set up after Windows' build

J

Josh Scholar

Hello everyone,

I would like to start doing some lower level development with Ruby, so
I started by building Ruby 1.8.5 under windows using Visual-C 8.

That went smoothly, so my first test after installing Ruby was to
install Gems, so that I could add some packages I need. That also
seemed to work, until I tried running "gem".

Any invocation of gem returns the following errors:

C:/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require': no such file to load -- zlib (LoadError)
from
C:/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
from C:/usr/local/lib/ruby/site_ruby/1.8/rubygems/package.rb:9
from
C:/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
from
C:/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
from C:/usr/local/lib/ruby/site_ruby/1.8/rubygems/builder.rb:7
from
C:/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
from
C:/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
from C:/usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:93:in
`manage_gems'

from C:/usr/local/bin/gem:10

I tried uncommenting zlib in ruby-1.8.5/ext/Setup.nt and rebuilding
from scratch (after "nmake clean"), but that made no difference, and I
could see no sign that zlib was actually built.

What step am I missing? Also I wonder what's the right way to add an
extention to a build under Windows/Visual C-8.

And thanks, in advance, to everyone for their help.

Josh Scholar
 
A

Austin Ziegler

What step am I missing? Also I wonder what's the right way to add an
extention to a build under Windows/Visual C-8.

And thanks, in advance, to everyone for their help.

Don't try.

It's not a good approach right now. VS8 has a number of changes that
affects how Ruby runs. To get this to work properly, you will need to
build your own custom version of zlib as well as manually building the
zlib extension.

-austin
 
J

Josh Scholar

I just tried a few more things that weren't sufficient to get this
working, one of which was copying zlib1.dll from the one-click install
version of Ruby 1.8.5.

I suppose I can substitute that for building a custom version of zlib
(I hope).

"...as well as manually building the zlib extension."

How do I manually build the zlib extention to get it recognized?

I notice that the 1 click install version of 1.8.5 doesn't seem to have
any directories or files named after zlib, so I guess that the
reference must somehow be compiled into ruby.exe proper. Is that right?
 
A

Austin Ziegler

I just tried a few more things that weren't sufficient to get this
working, one of which was copying zlib1.dll from the one-click install
version of Ruby 1.8.5.

I suppose I can substitute that for building a custom version of zlib
(I hope).

You can't. They're built with different compilers.
"...as well as manually building the zlib extension."

How do I manually build the zlib extention to get it recognized?

The same way you would with any normal extension: you go to the
directory where it exists and run "ruby extconf.rb" and then build
from that, IIRC.
I notice that the 1 click install version of 1.8.5 doesn't seem to have
any directories or files named after zlib, so I guess that the
reference must somehow be compiled into ruby.exe proper. Is that right?

Um. I don't have 1.8.5 on my work machine, but if you look in
Ruby/lib/ruby/site_ruby/i386_msvcrt you will see a zlib.so there, I
think.

-austin
 
J

Josh Scholar

Austin said:
You can't. They're built with different compilers.

I just tried rebuilding with MSYS/MingW.

It built, it passed "make test", but then there was a problem.

"make install" echoed the commands, but no directories were made and no
files copied.

I tried the "mkdir" commands by hand, and that did make the
directories. But running "make install again" didn't actually copy the
files.

I have no idea why "make install" is failing.

Would this go smoother if I built with a different compiler? I do have
MSYS/MingW installed.
 
J

Josh Scholar

Would this go smoother if I built with a different compiler? I do have
MSYS/MingW installed.

Oops ignore that last sentence. It had scrolled off the bottom of the
google post window and I forgot to delete it.
 
J

Josh Scholar

Also, trying to follow an MSYS build with a Microsoft install doesn't
fix the install problem. Apparently the MSYS build process must write
an install script that isn't compatible with nmake.
 
J

Josh Scholar

Josh said:
I just tried rebuilding with MSYS/MingW.

It built, it passed "make test", but then there was a problem.

"make install" echoed the commands, but no directories were made and no
files copied.

I tried the "mkdir" commands by hand, and that did make the
directories. But running "make install again" didn't actually copy the
files.

I have no idea why "make install" is failing.

A search shows that I'm not the first one to have this problem, though
no solution was found before.

Someone suggested using cygwin.

I tried running "make install" in cygwin after building with MSYS.

The first few install lines worked, then the mass of them failed
silently.

So I'm still left wondering what's wrong.
 

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
474,215
Messages
2,571,113
Members
47,710
Latest member
HarleyMoli

Latest Threads

Top