# Problem with set up after Windows' build

**URL:** <https://www.ruby-forum.com/t/problem-with-set-up-after-windows-build/72234>\
**Category:** Ruby\
**Created:** [October 15, 2006, 10:11pm UTC](https://www.ruby-forum.com/t/problem-with-set-up-after-windows-build/72234 "2006-10-15T22:11:07Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![joshs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e5b9ba/32.png) [@joshs](https://www.ruby-forum.com/u/joshs)\
**Post date:** [October 15, 2006, 10:11pm UTC](https://www.ruby-forum.com/t/problem-with-set-up-after-windows-build/72234/1 "2006-10-15T22:11:07Z")

</div>

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 S.

---

<div class="post-metadata">

**Author:** ![joshs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e5b9ba/32.png) [@joshs](https://www.ruby-forum.com/u/joshs)\
**Post date:** [October 15, 2006, 11:21pm UTC](https://www.ruby-forum.com/t/problem-with-set-up-after-windows-build/72234/2 "2006-10-15T23:21:15Z")

</div>

On 10/15/06, Josh S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 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

---

<div class="post-metadata">

**Author:** ![joshs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e5b9ba/32.png) [@joshs](https://www.ruby-forum.com/u/joshs)\
**Post date:** [October 16, 2006, 12:05am UTC](https://www.ruby-forum.com/t/problem-with-set-up-after-windows-build/72234/3 "2006-10-16T00:05:22Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![joshs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e5b9ba/32.png) [@joshs](https://www.ruby-forum.com/u/joshs)\
**Post date:** [October 16, 2006, 5:34pm UTC](https://www.ruby-forum.com/t/problem-with-set-up-after-windows-build/72234/4 "2006-10-16T17:34:25Z")

</div>

On 10/15/06, Josh S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 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

---

<div class="post-metadata">

**Author:** ![joshs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e5b9ba/32.png) [@joshs](https://www.ruby-forum.com/u/joshs)\
**Post date:** [October 16, 2006, 10:33pm UTC](https://www.ruby-forum.com/t/problem-with-set-up-after-windows-build/72234/5 "2006-10-16T22:33:07Z")

</div>

> 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.

---

<div class="post-metadata">

**Author:** ![joshs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e5b9ba/32.png) [@joshs](https://www.ruby-forum.com/u/joshs)\
**Post date:** [October 17, 2006, 2:02am UTC](https://www.ruby-forum.com/t/problem-with-set-up-after-windows-build/72234/6 "2006-10-17T02:02:32Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![joshs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e5b9ba/32.png) [@joshs](https://www.ruby-forum.com/u/joshs)\
**Post date:** [October 17, 2006, 2:30am UTC](https://www.ruby-forum.com/t/problem-with-set-up-after-windows-build/72234/7 "2006-10-17T02:30:39Z")

</div>

Josh S. wrote:

> > 
> 
> 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.

---

<div class="post-metadata">

**Author:** ![joshs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e5b9ba/32.png) [@joshs](https://www.ruby-forum.com/u/joshs)\
**Post date:** [October 16, 2006, 10:30pm UTC](https://www.ruby-forum.com/t/problem-with-set-up-after-windows-build/72234/8 "2006-10-16T22:30:49Z")

</div>

Austin Z. wrote:

> On 10/15/06, Josh S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > 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.

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.
