[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Problem with set up after Windows' build

Josh Scholar

10/15/2006 8:10:00 PM

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

7 Answers

Austin Ziegler

10/15/2006 9:21:00 PM

0

On 10/15/06, Josh Scholar <cafealpha2@gmail.com> 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
--
Austin Ziegler * halostatue@gmail.com * http://www.halo...
* austin@halostatue.ca * http://www.halo...feed/
* austin@zieglers.ca

Josh Scholar

10/15/2006 10:04:00 PM

0

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?

Austin Ziegler wrote:
> On 10/15/06, Josh Scholar <cafealpha2@gmail.com> 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
> --
> Austin Ziegler * halostatue@gmail.com * http://www.halo...
> * austin@halostatue.ca * http://www.halo...feed/
> * austin@zieglers.ca

Austin Ziegler

10/16/2006 3:33:00 PM

0

On 10/15/06, Josh Scholar <cafealpha2@gmail.com> 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
--
Austin Ziegler * halostatue@gmail.com * http://www.halo...
* austin@halostatue.ca * http://www.halo...feed/
* austin@zieglers.ca

Josh Scholar

10/16/2006 8:26:00 PM

0

Austin Ziegler wrote:
> On 10/15/06, Josh Scholar <cafealpha2@gmail.com> 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.

Josh Scholar

10/16/2006 8:28:00 PM

0


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

Josh Scholar

10/16/2006 11:57:00 PM

0

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.


Josh Scholar wrote:
> > 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.

Josh Scholar

10/17/2006 12:30:00 AM

0


Josh Scholar wrote:
> Austin Ziegler wrote:
> > On 10/15/06, Josh Scholar <cafealpha2@gmail.com> 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.

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.