[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

additional requirements for a Ruby env

Alexandru Popescu

7/16/2006 4:43:00 PM

Hi!

I know there are Ruby libs outthere that are coming with C extensions.
To get them working you usually do a ruby setup.rb on your
environment. But, having C extensions, they will require that your ENV
has a few more things available (I assume a make, C/C++ compiler at
least).

My environment is a Win XP machine, but I am not doing anything
related to C/C++ (and I haven't done anything for quite a long
time.... so my knowledge became quite rusty about). I would like to
hear from you, more experienced rubiest, what would be the lightest
env that would allow me to use such Ruby libs (I would like to hear
more options with some pros/cons, so that I can decide which one would
better fit).

Many thanks in advance,

/alex
--
w( the_mindstorm )p.

16 Answers

Alexandru Popescu

7/17/2006 3:29:00 PM

0

Guys any hints for this? Sorry for pushing it to the top, but I am
still wondering what shall I use.

once again thanks for any hints and ideas,

/alex
--
w( the_mindstorm )p.


On 7/16/06, Alexandru Popescu <the.mindstorm.mailinglist@gmail.com> wrote:
> Hi!
>
> I know there are Ruby libs outthere that are coming with C extensions.
> To get them working you usually do a ruby setup.rb on your
> environment. But, having C extensions, they will require that your ENV
> has a few more things available (I assume a make, C/C++ compiler at
> least).
>
> My environment is a Win XP machine, but I am not doing anything
> related to C/C++ (and I haven't done anything for quite a long
> time.... so my knowledge became quite rusty about). I would like to
> hear from you, more experienced rubiest, what would be the lightest
> env that would allow me to use such Ruby libs (I would like to hear
> more options with some pros/cons, so that I can decide which one would
> better fit).
>
> Many thanks in advance,
>
> ./alex
> --
> .w( the_mindstorm )p.
>

Alex Young

7/17/2006 3:54:00 PM

0

Alexandru Popescu wrote:
> Guys any hints for this? Sorry for pushing it to the top, but I am
> still wondering what shall I use.
>
> once again thanks for any hints and ideas,
Your options are as follows:

- Rely on the kindness of others to provide Win32 builds of C extensions
that you need.
- Obtain MS VC6 (somehow) and compile them yourself.
- Obtain MinGW GCC and friends and compile them yourself.

In the first and second case, you can use the One-Click Installer Ruby.
In the third case, you'll either need to compile Ruby yourself, or use
the MinGW build from ruby-lang.org.

In any of the three cases, you will be relying on the C extension in
question having been tested on Windows previously, unless you are
willing to be the test case yourself.

I don't know about Borland's offerings here - they may or may not be
appropriate.

My money's on MinGW for the medium-long term. I believe (Curt? You
there?) that the OCI will be converted to a MinGW build in future.

--
Alex

>
> ./alex
> --
> .w( the_mindstorm )p.
>
>
> On 7/16/06, Alexandru Popescu <the.mindstorm.mailinglist@gmail.com> wrote:
>
>> Hi!
>>
>> I know there are Ruby libs outthere that are coming with C extensions.
>> To get them working you usually do a ruby setup.rb on your
>> environment. But, having C extensions, they will require that your ENV
>> has a few more things available (I assume a make, C/C++ compiler at
>> least).
>>
>> My environment is a Win XP machine, but I am not doing anything
>> related to C/C++ (and I haven't done anything for quite a long
>> time.... so my knowledge became quite rusty about). I would like to
>> hear from you, more experienced rubiest, what would be the lightest
>> env that would allow me to use such Ruby libs (I would like to hear
>> more options with some pros/cons, so that I can decide which one would
>> better fit).
>>
>> Many thanks in advance,
>>
>> ./alex
>> --
>> .w( the_mindstorm )p.
>>
>


stu

7/17/2006 4:05:00 PM

0


Alexandru Popescu wrote:
> Hi!
>
> I know there are Ruby libs outthere that are coming with C extensions.
> To get them working you usually do a ruby setup.rb on your
> environment. But, having C extensions, they will require that your ENV
> has a few more things available (I assume a make, C/C++ compiler at
> least).
>
> My environment is a Win XP machine, but I am not doing anything
> related to C/C++ (and I haven't done anything for quite a long
> time.... so my knowledge became quite rusty about). I would like to
> hear from you, more experienced rubiest, what would be the lightest
> env that would allow me to use such Ruby libs (I would like to hear
> more options with some pros/cons, so that I can decide which one would
> better fit).
>

the problem is that the ruby setup.rb method assumes ruby is running on
the system that built it, which if you DL'd the windows one click
installer, is 100%
false!

ruby doesnt look for just any old compiler, it looks for the one that
created it.
it is not an easy simple fix.

-stu

Mauricio Fernández

7/17/2006 4:12:00 PM

0

On Tue, Jul 18, 2006 at 12:54:22AM +0900, Alex Young wrote:
> Your options are as follows:
>
> - Rely on the kindness of others to provide Win32 builds of C extensions
> that you need.
> - Obtain MS VC6 (somehow) and compile them yourself.
> - Obtain MinGW GCC and friends and compile them yourself.
>
> In the first and second case, you can use the One-Click Installer Ruby.
> In the third case, you'll either need to compile Ruby yourself, or use
> the MinGW build from ruby-lang.org.

You can also use extensions compiled using mingw with mswin32 (VC6) binaries,
like the one upon which the One Click Installer distro is built. All you need
is an appropriate rbconfig.rb.

I've also had some success cross-compiling with mingw.

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

Alex Young

7/17/2006 4:44:00 PM

0

Mauricio Fernandez wrote:
> On Tue, Jul 18, 2006 at 12:54:22AM +0900, Alex Young wrote:
>
>>Your options are as follows:
>>
>>- Rely on the kindness of others to provide Win32 builds of C extensions
>>that you need.
>>- Obtain MS VC6 (somehow) and compile them yourself.
>>- Obtain MinGW GCC and friends and compile them yourself.
>>
>>In the first and second case, you can use the One-Click Installer Ruby.
>> In the third case, you'll either need to compile Ruby yourself, or use
>>the MinGW build from ruby-lang.org.
>
>
> You can also use extensions compiled using mingw with mswin32 (VC6) binaries,
> like the one upon which the One Click Installer distro is built. All you need
> is an appropriate rbconfig.rb.
I know that's the theory, but aren't there a few libs that fail under
those conditions? RMagick and Ferret spring instantly to mind, but I
may be misunderstanding something here...

--
Alex

Alexandru Popescu

7/17/2006 5:09:00 PM

0

By following the thread and considering the fact that my system relies
on the one click installer I assume my only option is having MS VC6.
Is this conclusion correct? (because I failed to understand the
reasons why other compilers are not gonna work :-( ).

/alex
--
w( the_mindstorm )p.


On 7/17/06, Alex Young <alex@blackkettle.org> wrote:
> Alexandru Popescu wrote:
> > Guys any hints for this? Sorry for pushing it to the top, but I am
> > still wondering what shall I use.
> >
> > once again thanks for any hints and ideas,
> Your options are as follows:
>
> - Rely on the kindness of others to provide Win32 builds of C extensions
> that you need.
> - Obtain MS VC6 (somehow) and compile them yourself.
> - Obtain MinGW GCC and friends and compile them yourself.
>
> In the first and second case, you can use the One-Click Installer Ruby.
> In the third case, you'll either need to compile Ruby yourself, or use
> the MinGW build from ruby-lang.org.
>
> In any of the three cases, you will be relying on the C extension in
> question having been tested on Windows previously, unless you are
> willing to be the test case yourself.
>
> I don't know about Borland's offerings here - they may or may not be
> appropriate.
>
> My money's on MinGW for the medium-long term. I believe (Curt? You
> there?) that the OCI will be converted to a MinGW build in future.
>
> --
> Alex
>
> >
> > ./alex
> > --
> > .w( the_mindstorm )p.
> >
> >
> > On 7/16/06, Alexandru Popescu <the.mindstorm.mailinglist@gmail.com> wrote:
> >
> >> Hi!
> >>
> >> I know there are Ruby libs outthere that are coming with C extensions.
> >> To get them working you usually do a ruby setup.rb on your
> >> environment. But, having C extensions, they will require that your ENV
> >> has a few more things available (I assume a make, C/C++ compiler at
> >> least).
> >>
> >> My environment is a Win XP machine, but I am not doing anything
> >> related to C/C++ (and I haven't done anything for quite a long
> >> time.... so my knowledge became quite rusty about). I would like to
> >> hear from you, more experienced rubiest, what would be the lightest
> >> env that would allow me to use such Ruby libs (I would like to hear
> >> more options with some pros/cons, so that I can decide which one would
> >> better fit).
> >>
> >> Many thanks in advance,
> >>
> >> ./alex
> >> --
> >> .w( the_mindstorm )p.
> >>
> >
>
>
>

Austin Ziegler

7/17/2006 7:52:00 PM

0

On 7/17/06, Alexandru Popescu <the.mindstorm.mailinglist@gmail.com> wrote:
> By following the thread and considering the fact that my system relies
> on the one click installer I assume my only option is having MS VC6.
> Is this conclusion correct? (because I failed to understand the
> reasons why other compilers are not gonna work :-( ).

Binary incompatibilities from Microsoft.

-austin
--
Austin Ziegler * halostatue@gmail.com * http://www.halo...
* austin@halostatue.ca * http://www.halo...feed/
* austin@zieglers.ca

Ara.T.Howard

7/17/2006 8:30:00 PM

0

Alexandru Popescu

7/17/2006 8:40:00 PM

0

Sorry but I still don't get it.... why do I need to compile Ruby
myself if I intend to use a different compiler for extensions. That is
the puzzling piece.

/alex
--
w( the_mindstorm )p.


On 7/17/06, ara.t.howard@noaa.gov <ara.t.howard@noaa.gov> wrote:
> On Tue, 18 Jul 2006, Austin Ziegler wrote:
>
> > On 7/17/06, Alexandru Popescu <the.mindstorm.mailinglist@gmail.com> wrote:
> >> By following the thread and considering the fact that my system relies
> >> on the one click installer I assume my only option is having MS VC6.
> >> Is this conclusion correct? (because I failed to understand the
> >> reasons why other compilers are not gonna work :-( ).
> >
> > Binary incompatibilities from Microsoft.
>
> (applause from audience!)
>
> -a
> --
> suffering increases your inner strength. also, the wishing for suffering
> makes the suffering disappear.
> - h.h. the 14th dali lama
>
>

Simon Kröger

7/17/2006 8:56:00 PM

0

Austin Ziegler wrote:
> On 7/17/06, Alexandru Popescu <the.mindstorm.mailinglist@gmail.com> wrote:
>> By following the thread and considering the fact that my system relies
>> on the one click installer I assume my only option is having MS VC6.
>> Is this conclusion correct? (because I failed to understand the
>> reasons why other compilers are not gonna work :-( ).
>
> Binary incompatibilities from Microsoft.
>
> -austin

yes, but as far as i know the problem isn't with the resulting dll's (not
the extension dll, nor the ruby.dll) but only with this little import lib
that makes the ruby dll available in the extension. right so far?

If so, this problem can be solved:

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-t...

we 'just' need to build win32 extensions this way (regardless of compiler
version) and the problem goes away. (yes, this will take time to convince
each and every maintainer of a ruby extension)

But right now this information isn't known very well, i asked before

"please, can we have that in readme.ext ?" but got no answer.

If there is something wrong with this way to compile extensions on win32
i would like to know, if not we should really follow those instructions.

cheers

Simon