Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > extconf.rb spitting out SH Makefile on windows?

Reply
Thread Tools

extconf.rb spitting out SH Makefile on windows?

 
 
Mr Eiland
Guest
Posts: n/a
 
      03-03-2011
Title says it all, I'm running ruby extconf.rb in a visual studio 2008
pro command prompt and the resulting Makefile is not for nmake.

All I'm wanting is to create a single function that I can call into.
I'm not willing to use SWIG, I see no reason to add more moving parts
for something that should be so simple.

Ultimately, if I could find documentation on how to set up the visual
studio C++ environment so that I could compile the extension without the
use extconf.rb, I would prefer that, but using extconf.rb is the next
best thing.

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

 
Reply With Quote
 
 
 
 
Eric Christopherson
Guest
Posts: n/a
 
      03-04-2011
On Thu, Mar 3, 2011 at 5:40 PM, Mr Eiland <(E-Mail Removed)> wrote:
> Title says it all, I'm running ruby extconf.rb in a visual studio 2008
> pro command prompt and the resulting Makefile is not for nmake.
>
> All I'm wanting is to create a single function that I can call into.
> I'm not willing to use SWIG, I see no reason to add more moving parts
> for something that should be so simple.
>
> Ultimately, if I could find documentation on how to set up the visual
> studio C++ environment so that I could compile the extension without the
> use extconf.rb, I would prefer that, but using extconf.rb is the next
> best thing.


Since no one's chimed in yet, I thought I would just post to say you'd
be best served installing the RubyInstaller DevKit, which includes gcc
and GNU make. Others might know of ways to integrate Ruby with VS, but
the conventional wisdom seems to be to use DevKit.

 
Reply With Quote
 
 
 
 
Quintus
Guest
Posts: n/a
 
      03-04-2011
Am 04.03.2011 07:10, schrieb Eric Christopherson:
> On Thu, Mar 3, 2011 at 5:40 PM, Mr Eiland <(E-Mail Removed)> wrote:
>> Title says it all, I'm running ruby extconf.rb in a visual studio 2008
>> pro command prompt and the resulting Makefile is not for nmake.
>>
>> All I'm wanting is to create a single function that I can call into.
>> I'm not willing to use SWIG, I see no reason to add more moving parts
>> for something that should be so simple.
>>
>> Ultimately, if I could find documentation on how to set up the visual
>> studio C++ environment so that I could compile the extension without the
>> use extconf.rb, I would prefer that, but using extconf.rb is the next
>> best thing.

>
> Since no one's chimed in yet, I thought I would just post to say you'd
> be best served installing the RubyInstaller DevKit, which includes gcc
> and GNU make. Others might know of ways to integrate Ruby with VS, but
> the conventional wisdom seems to be to use DevKit.
>
>


I'd wonder if it was possible with Visual Studio anyway--All recent
Rubies have been compiled with gcc (via MinGW/MSYS), and incorporating a
C extension compiled with another compiler is not possible I think. The
OP would have to compile Ruby with MSVC as well.

Valete,
Marvin

 
Reply With Quote
 
Luis Lavena
Guest
Posts: n/a
 
      03-04-2011
On Mar 3, 8:40*pm, Mr Eiland <(E-Mail Removed)> wrote:
> Title says it all, I'm running ruby extconf.rb in a visual studio 2008
> pro command prompt and the resulting Makefile is not for nmake.
>


What version of Ruby are you using?

From what you say sounds like you're using RubyInstaller, which used
GCC -- not Visual Studio -- as compiler toolchain.

> All I'm wanting is to create a single function that I can call into.
> I'm not willing to use SWIG, I see no reason to add more moving parts
> for something that should be so simple.
>


SWIG has nothing to do with compiler toolchain.

> Ultimately, if I could find documentation on how to set up the visual
> studio C++ environment so that I could compile the extension without the
> use extconf.rb, I would prefer that, but using extconf.rb is the next
> best thing.
>


extconf.rb is required to create a Makefile compatible with Ruby.

Please read README.EXT that is bundled in Ruby source code.

Also, if you want Ruby with Visual Studio, build it or use the ones
from GarbageCollect page:

http://www.garbagecollect.jp/ruby/mswin32/en/

Be aware to instal the missing binaries:

http://www.garbagecollect.jp/ruby/ms...s/install.html

--
Luis Lavena
 
Reply With Quote
 
Mr Eiland
Guest
Posts: n/a
 
      03-14-2011
I ended up moving everything to the mingw toolchain, but I don't
understand why you're saying it's impossible to use Visual Studio.

At the end of the day the windows loader is the one doing the work, not
the Ruby runtime. Unless you're telling me the dll being spit out by
mingw isn't really a DLL? I would need a more in depth explanation
before I would buy that Windows can load the appropriate DLL created by
mingw, but not the equivalent DLL created by Visual Studio. We're not
talking about compiler specific object files.

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

 
Reply With Quote
 
Luis Lavena
Guest
Posts: n/a
 
      03-14-2011
On Mar 14, 3:17*pm, Mr Eiland <(E-Mail Removed)> wrote:
> I ended up moving everything to the mingw toolchain, but I don't
> understand why you're saying it's impossible to use Visual Studio.
>


I'm saying that using Ruby build with MinGW is not possible to compile
extensions with Visual Studio.

> At the end of the day the windows loader is the one doing the work, not
> the Ruby runtime. *Unless you're telling me the dll being spit out by
> mingw isn't really a DLL? *I would need a more in depth explanation
> before I would buy that Windows can load the appropriate DLL created by
> mingw, but not the equivalent DLL created by Visual Studio. *We're not
> talking about compiler specific object files.
>


Ruby 'mkmf' uses rbconfig, which is generated at compilation time of
Ruby, and is going to use the toolchain defined when Ruby was
compiled.

Beyond altering rbconfig to detect and use Visual Studio, is a matter
of CRT mismatch. This has been discussed in the list and the risk of
memory allocation and free of it due Ruby's GC design can generate
segfaults.

And if you need better answers, you can google for them, described the
problem above the big one, but there are others associated with
compilation flags.

--
Luis Lavena
 
Reply With Quote
 
Mr Eiland
Guest
Posts: n/a
 
      03-15-2011
It sounds to me like it has more to do with some of Ruby's design
decisions, which is something I can believe.

This will definitely be the last Ruby project I do on Windows, the Ruby
team needs to work on their windows support. I'm a unix weenie so it's
natural for me to use the mingw toolchain, but others aren't so
fortunate.

And no, I'm not willing to put forth my time to do it, I'll just be sure
and avoid Ruby on windows from now on. Ruby is a beautiful language,
but as far as I'm concerned it's hardly usable on Windows.

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

 
Reply With Quote
 
Luis Lavena
Guest
Posts: n/a
 
      03-15-2011
On Mar 15, 3:09*am, Mr Eiland <(E-Mail Removed)> wrote:
> It sounds to me like it has more to do with some of Ruby's design
> decisions, which is something I can believe.
>


Yes and no, see what I've mentioned about CRT mismatch.

> This will definitely be the last Ruby project I do on Windows, the Ruby
> team needs to work on their windows support. *I'm a unix weenie so it's
> natural for me to use the mingw toolchain, but others aren't so
> fortunate.
>


And so the same for Visual Studio.

> And no, I'm not willing to put forth my time to do it, I'll just be sure
> and avoid Ruby on windows from now on. *Ruby is a beautiful language,
> but as far as I'm concerned it's hardly usable on Windows.


Then stop complaining. If you're not willing to contribute back, then
shut up.

--
Luis Lavena
 
Reply With Quote
 
Mr Eiland
Guest
Posts: n/a
 
      03-17-2011
Luis Lavena wrote in post #987573:
> On Mar 15, 3:09am, Mr Eiland <(E-Mail Removed)> wrote:
>> It sounds to me like it has more to do with some of Ruby's design
>> decisions, which is something I can believe.
>>

>
> Yes and no, see what I've mentioned about CRT mismatch.


Which is a technical challenge, not an insurmountable hurdle. See
Python for an example.

>
>> This will definitely be the last Ruby project I do on Windows, the Ruby
>> team needs to work on their windows support. I'm a unix weenie so it's
>> natural for me to use the mingw toolchain, but others aren't so
>> fortunate.
>>

>
> And so the same for Visual Studio.


That's a shitty response. Windows dev's know Visual Studio,and the
context of this entire discussion has been about building extensions in
Windows, which makes your point facetious.

>
>> And no, I'm not willing to put forth my time to do it, I'll just be sure
>> and avoid Ruby on windows from now on. Ruby is a beautiful language,
>> but as far as I'm concerned it's hardly usable on Windows.

>
> Then stop complaining. If you're not willing to contribute back, then
> shut up.


Roger that, send me a private email and I'll let you know how much it's
going to cost you to influence my behavior.

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

 
Reply With Quote
 
Phillip Gawlowski
Guest
Posts: n/a
 
      03-17-2011
On Thu, Mar 17, 2011 at 2:23 AM, Mr Eiland <(E-Mail Removed)> wrote:
>
> Roger that, send me a private email and I'll let you know how much it's
> going to cost you to influence my behavior.


What Luis meant to say is that Ruby is open source. You are free to
spend the time and effort necessary to fix the flaws you see. This is
generally the case if a single person moves outside of a project's
supported build chain (which is MinGW on Windows), a choice was made
deliberately, since Visual Studio is only free in the Express
versions, and that cannot be bundled with a third party download, as
is necessary to support native extension building via RubyGems.

The problem you have is a result of your own choice of tools, and you
can't expect the community to fix problems that come about because of
your specific situation. Not unless you are willing to provide
incentives. Incentives that go beyond threatening to take your ball
and never, ever again use Ruby on Windows. As far as threats go, it's
a weak one, anyway: I'm not specially bothered that you won't use Ruby
on Windows any more, just because it doesn't work with a tool not
supported by the community.

--
Phillip Gawlowski

Though the folk I have met,
(Ah, how soon!) they forget
When I've moved on to some other place,
There may be one or two,
When I've played and passed through,
Who'll remember my song or my face.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
spitting internet connection in flatshare mole Computer Support 27 01-01-2011 12:08 AM
Re: Spitting and grabbing balls in my food George Computer Support 2 10-26-2009 03:41 AM
Doxygen Task for Ant makefile maintainers Karthik Java 0 04-29-2004 11:40 AM
Doxygen Task for Ant makefile maintainers Karthik Java 0 04-29-2004 03:58 AM
how to compile .vhd files one by one using makefile MACEI'S VHDL 0 07-10-2003 05:18 PM



Advertisments