[Rake-devel] Building native extensions with Rake

Berger, Daniel Daniel.Berger at qwest.com
Tue Nov 18 13:56:23 EST 2008


 

> -----Original Message-----
> From: rake-devel-bounces at rubyforge.org 
> [mailto:rake-devel-bounces at rubyforge.org] On Behalf Of Charlie Savage
> Sent: Tuesday, November 18, 2008 11:31 AM
> To: Rake Development and Discussion
> Subject: Re: [Rake-devel] Building native extensions with Rake
> 
> Hi Luis,
> 
> > I'm working on a series of tasks that ease the compilation 
> of Ruby C 
> > Extensions with Rake. The goal of these tasks are ease the building 
> > and compilation of Ruby C extensions, also looking into be 
> > merged/integrated into Rake.
> 
> I really like the idea, but I don't think this is the right 
> way to do it.  The fundamental issue with building extensions 
> is Ruby's assumption that the compiler used to build ruby 
> itself is the same as the one used to build an extension.  On 
> Windows, with MingW and VC++, that is often not the case.  
> Adding a few rake tasks doesn't solve the problem, so doesn't 
> make anything any easier.
> 
> In my view, the real solution is to port Python's DistUtils 
> to Ruby and using it as the standard way of building ruby 
> extensions.  Distutils takes a much more object oriented 
> approach than mkmf, so is a lot more flexible.  This 
> flexibility allows it to support multiple compilers, and from 
> limited experience, it works quite well.
> 
> I don't know if the community would be interested in such a 
> big change, but I think it would be a big leap forward for 
> Ruby and extensions.

Implementing an mkmf replacement was tried a while ago:

http://rubyforge.org/projects/mkmf2/

But it never caught on. But gems are more pervasive now, so maybe if it
was gemified, we could take another look. However, I don't think it was
ever trying to be a distutils replacement.

Porting distutils may be the answer, though. You volunteering? ;)

Regards,

Dan


This communication is the property of Qwest and may contain confidential or
privileged information. Unauthorized use of this communication is strictly 
prohibited and may be unlawful.  If you have received this communication 
in error, please immediately notify the sender by reply e-mail and destroy 
all copies of the communication and any attachments.


More information about the Rake-devel mailing list