[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Re: One-Click Installer: MinGW? or VC2005?

Ara.T.Howard

7/18/2006 5:56:00 PM

16 Answers

Francis Cianfrocca

7/18/2006 6:06:00 PM

0

unknown wrote:

>>>regarding ruby stuff being 'easy' to install i'd say that opening up the
world
of editing source and compiling it will certainly bring in patches and
contributions - and those may be steps towards making ruby extensions
easier
to install be they binary or not.
<<<

This point was made upthread and is entirely valid. I'm not proposing
that people stop working with extensions in source code. But as Ruby
applications become more successful and acquire credibility for
production use, the lack of really seamless binary support in a range of
environments (including Windows flavors) becomes a barrier to adoption.
In a sense, I'm talking about enabling a community of users that today
have some good reasons to avoid Ruby.

You are right, though, this is orthogonal to the VC-MinGW choice and
belongs on its own thread.

--
Posted via http://www.ruby-....

Mauricio Fernández

7/18/2006 7:02:00 PM

0

On Wed, Jul 19, 2006 at 03:06:10AM +0900, Francis Cianfrocca wrote:
> >regarding ruby stuff being 'easy' to install i'd say that opening up the
> >world of editing source and compiling it will certainly bring in patches and
> >contributions - and those may be steps towards making ruby extensions easier
> >to install be they binary or not.
>
> This point was made upthread and is entirely valid. I'm not proposing
> that people stop working with extensions in source code. But as Ruby
> applications become more successful and acquire credibility for
> production use, the lack of really seamless binary support in a range of
> environments (including Windows flavors) becomes a barrier to adoption.
> In a sense, I'm talking about enabling a community of users that today
> have some good reasons to avoid Ruby.
>
> You are right, though, this is orthogonal to the VC-MinGW choice and
> belongs on its own thread.

I believe that it is not entirely orthogonal. My gut feeling is that MinGW
would make it easier to provide binaries, thanks to:
* the toolchain being closer to that you have on un*x: this means that
third party libs are often easier to compile than with VC 2005. Ara cited
gsl. As you said, in the long term not only the extensions, but also the
libs themselves would have to be provided in binary form.
* the possibility to cross-compile (this is something I've repeatedly used myself)
* its availability in time (is VC 2005 to end like VC6?)

--
Mauricio Fernandez - http://eige... - singular Ruby

Simon Kröger

7/18/2006 9:28:00 PM

0

Mauricio Fernandez wrote:
> On Wed, Jul 19, 2006 at 03:06:10AM +0900, Francis Cianfrocca wrote:
>>> regarding ruby stuff being 'easy' to install i'd say that opening up the
>>> world of editing source and compiling it will certainly bring in patches and
>>> contributions - and those may be steps towards making ruby extensions easier
>>> to install be they binary or not.
>> This point was made upthread and is entirely valid. I'm not proposing
>> that people stop working with extensions in source code. But as Ruby
>> applications become more successful and acquire credibility for
>> production use, the lack of really seamless binary support in a range of
>> environments (including Windows flavors) becomes a barrier to adoption.
>> In a sense, I'm talking about enabling a community of users that today
>> have some good reasons to avoid Ruby.
>>
>> You are right, though, this is orthogonal to the VC-MinGW choice and
>> belongs on its own thread.
>
> I believe that it is not entirely orthogonal. My gut feeling is that MinGW
> would make it easier to provide binaries, thanks to:
> * the toolchain being closer to that you have on un*x: this means that
> third party libs are often easier to compile than with VC 2005. Ara cited
> gsl. As you said, in the long term not only the extensions, but also the
> libs themselves would have to be provided in binary form.
> * the possibility to cross-compile (this is something I've repeatedly used myself)
> * its availability in time (is VC 2005 to end like VC6?)


Actually i was about to say something like mingw is only easier if you already
know linux tools, dll file format isn't compiler dependent, windows users don't
want to fiddle with make and so on.

While i think this is all true i have to admit that it isn't really ruling out
mingw, so i downloaded and installed it (not for the first time).

I had a tough time figuring out that ruby 1.8.4 isn't compiling unmodified with
the 'Candidate' version and how to fix that. (and you do have to install a lot
of third party libs if you want all the goodness of the one-click, or be able
to use gems e.g.)

To be honest, i thought mingw would have performance problems on windows, but
everything i tried so far is comparable, e.g.:

C:\development>ruby -v sodoku.rb sodoku.txt
ruby 1.8.4 (2005-12-24) [i386-mswin32]
user system total real
solving nr 1
...
solving nr 29 0.922000 0.000000 0.922000 ( 0.922000)
+-------+-------+-------+
| 1 2 6 | 4 3 7 | 9 5 8 |
| 8 9 5 | 6 2 1 | 4 7 3 |
| 3 7 4 | 9 8 5 | 1 2 6 |
+-------+-------+-------+
| 4 5 7 | 1 9 3 | 8 6 2 |
| 9 8 3 | 2 4 6 | 5 1 7 |
| 6 1 2 | 5 7 8 | 3 9 4 |
+-------+-------+-------+
| 2 6 9 | 3 1 4 | 7 8 5 |
| 5 4 8 | 7 6 9 | 2 3 1 |
| 7 3 1 | 8 5 2 | 6 4 9 |
+-------+-------+-------+
total 13.750000 0.047000 13.797000 ( 13.827000)
average 0.474138 0.001621 0.475759 ( 0.476793)

and mingw:

$ ruby -v sodoku.rb sodoku.txt
ruby 1.8.4 (2005-12-24) [i386-mingw32]
user system total real
solving nr 1
...
solving nr 29 0.640000 0.000000 0.640000 ( 0.640551)
+-------+-------+-------+
| 1 2 6 | 4 3 7 | 9 5 8 |
| 8 9 5 | 6 2 1 | 4 7 3 |
| 3 7 4 | 9 8 5 | 1 2 6 |
+-------+-------+-------+
| 4 5 7 | 1 9 3 | 8 6 2 |
| 9 8 3 | 2 4 6 | 5 1 7 |
| 6 1 2 | 5 7 8 | 3 9 4 |
+-------+-------+-------+
| 2 6 9 | 3 1 4 | 7 8 5 |
| 5 4 8 | 7 6 9 | 2 3 1 |
| 7 3 1 | 8 5 2 | 6 4 9 |
+-------+-------+-------+
total 10.031000 0.109000 10.140000 ( 10.139457)
average 0.345897 0.003759 0.349655 ( 0.349636)


It's 25% faster. 8)

(gcc version 3.4.5 (mingw special))

Ok, go on Curt, i would like to see how a vc2005 build would compare to this
but MinGW seems at least on par with vc6.

If on the long run we can have binaries for windows easier this way I'm all for it.

cheers

Simon

Ara.T.Howard

7/18/2006 10:16:00 PM

0

Lyle Johnson

7/18/2006 10:20:00 PM

0

On 7/18/06, Simon Kröger <SimonKroeger@gmx.de> wrote:

> While i think this is all true i have to admit that it isn't really ruling out
> mingw, so i downloaded and installed it (not for the first time).
>
> I had a tough time figuring out that ruby 1.8.4 isn't compiling unmodified with
> the 'Candidate' version and how to fix that.

Seeing as I'm still a few steps behind you, could you comment on what
you had to do to get Ruby 1.8.4 to compile with MinGW? I actually
downloaded the "Current" version and not the "Candidate", but the
compile of the very first source file (array.c, I think) bombs
complaining of duplicate definitions of gettimeofday().

I'm glad to switch to either MinGW or the latest Visual C++, whatever
the community at large decides to do. But I am little concerned to
have hit this snag right out of the gate with MinGW.

Ara.T.Howard

7/18/2006 10:38:00 PM

0

Lyle Johnson

7/19/2006 6:29:00 PM

0

On 7/18/06, ara.t.howard@noaa.gov <ara.t.howard@noaa.gov> wrote:

> that's odd - i installed and compiled straight away... i'm at an airport now
> but it actually wrote up what i did - i'll dig it out when i get back. in any
> case i assure you it can be done... make sure you've got mingw installed
> correctly and do someting like
>
> ./configure --prefix=/c/usr/local && make && make install
>
> good luck.

*Please* do post how you got this to work when you are back.

The first thing I did was download and install MSYS 1.0.10. This seems
to have worked fine.

Next, I downloaded the MinGW installer version 5.03 and ran it, and
asked it to download and install the "Current" release (which
included, among other things, gcc-3.4.2 I think). When that was done,
I grabbed the standard ruby-1.8.4.tar.gz, unpacked it, and did
"./configure", followed by "make". It bombed while compiling the very
first file, with errors about "redefinition of struct timezone" and
other types.

I've just uninstalled MinGW, and am going to start over again with the
"Candidate" release (which is based on gcc-3.4.5). We'll see if that
goes any better...

Simon Kröger

7/19/2006 7:07:00 PM

0

Lyle Johnson wrote:

> [...]
> I've just uninstalled MinGW, and am going to start over again with the
> "Candidate" release (which is based on gcc-3.4.5). We'll see if that
> goes any better...

I don't think so, but this might help:

$ diff ruby-1.8.4/win32/win32.h.orig ruby-1.8.4/win32/win32.h
154,159d153
< #ifdef __MINGW32__
< struct timezone {
< int tz_minuteswest;
< int tz_dsttime;
< };
< #endif
203,204c197,200
< extern int link(char *, char *);
< extern int gettimeofday(struct timeval *, struct timezone *);
---
> extern int link(char *, char *);
> #ifndef __MINGW32__
> extern int gettimeofday(struct timeval *, struct timezone *);
> #endif

$ diff ruby-1.8.4/win32/win32.c.orig ruby-1.8.4/win32/win32.c
2536c2536
< #include <sys/timeb.h>
---
> #include <sys/timeb.h>
2537a2538
> #ifndef __MINGW32__
2558a2560
> #endif

well, I'm not very used to this tools, how do i get a more
readable output ?

cheers

Simon

Sean O'Halpin

7/19/2006 7:19:00 PM

0

On 7/19/06, Lyle Johnson <lyle.johnson@gmail.com> wrote:
> On 7/18/06, ara.t.howard@noaa.gov <ara.t.howard@noaa.gov> wrote:
>
> > that's odd - i installed and compiled straight away... i'm at an airport now
> > but it actually wrote up what i did - i'll dig it out when i get back. in any
> > case i assure you it can be done... make sure you've got mingw installed
> > correctly and do someting like
> >
> > ./configure --prefix=/c/usr/local && make && make install
> >
> > good luck.
>
> *Please* do post how you got this to work when you are back.
>
> The first thing I did was download and install MSYS 1.0.10. This seems
> to have worked fine.
>
> Next, I downloaded the MinGW installer version 5.03 and ran it, and
> asked it to download and install the "Current" release (which
> included, among other things, gcc-3.4.2 I think). When that was done,
> I grabbed the standard ruby-1.8.4.tar.gz, unpacked it, and did
> "./configure", followed by "make". It bombed while compiling the very
> first file, with errors about "redefinition of struct timezone" and
> other types.
>
> I've just uninstalled MinGW, and am going to start over again with the
> "Candidate" release (which is based on gcc-3.4.5). We'll see if that
> goes any better...
>
>
Hi Lyle,

I installed MinGW Current (MinGW-5.0.3) first, then
MSYS-1.0.11-2004.04.30-1, downloaded and unpacked ruby stable snapshot
(ftp://ftp.ruby-lang.org/pub/ruby/stable-snaps...), fired up
MSYS, entered this:

/configure --prefix=c:/ruby-mingw --enable-shared && make && make install

Waited about 5-10 mins.

Back at Windows command prompt:

> cd \ruby-mingw\bin
> ruby -v
ruby 1.8.5 (2006-07-18) [i386-mingw32]

Good luck!

Regards,
Sean

Lyle Johnson

7/19/2006 7:32:00 PM

0

On 7/19/06, Sean O'Halpin <sean.ohalpin@gmail.com> wrote:

> I installed MinGW Current (MinGW-5.0.3) first, then
> MSYS-1.0.11-2004.04.30-1, downloaded and unpacked ruby stable snapshot
> (ftp://ftp.ruby-lang.org/pub/ruby/stable-snaps...), fired up
> MSYS, entered this:
>
> ./configure --prefix=c:/ruby-mingw --enable-shared && make && make install
>
> Waited about 5-10 mins.
>
> Back at Windows command prompt:
>
> > cd \ruby-mingw\bin
> > ruby -v
> ruby 1.8.5 (2006-07-18) [i386-mingw32]
>
> Good luck!

Thanks, Sean! I will add this to my list of experiments to try. I'm
currently trying to build Ruby 1.8.4 using the patches for
win32/win32.{c,h} provided by Simon Kroger (and those seem to work,
BTW).