# Mongrel, cross compilation, Echoe and rake-compiler

**URL:** <https://www.ruby-forum.com/t/mongrel-cross-compilation-echoe-and-rake-compiler/166539>\
**Category:** Mongrel\
**Created:** [April 27, 2009, 2:49am UTC](https://www.ruby-forum.com/t/mongrel-cross-compilation-echoe-and-rake-compiler/166539 "2009-04-27T02:49:09Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [April 27, 2009, 2:49am UTC](https://www.ruby-forum.com/t/mongrel-cross-compilation-echoe-and-rake-compiler/166539/1 "2009-04-27T02:49:09Z")

</div>

Hello G.s, mainly Evan,

With the goal to move One-Click Ruby Installer to use MinGW (GCC)  
compiler, I found there is no binary for mongrel for that platform.

Because of that, the migration for lot of folks will require install  
the development toolkit, which I’m trying to avoid.

Being the maintainer of the Windows builds of Mongrel, been wanted to  
upgrade it to use rake-compiler project.

rake-compiler has been out for a while, and several projects has been  
migrated to it successfully, including ruby-ffi, johnson, nokogiri and  
others.

Now, a few questions before I invest a lot of time with mongrel  
repository.

I’m working over “master” at fauna repository:

[http://github.com/fauna/mongrel](http://github.com/fauna/mongrel)

My plan is the following:

Ensure both current and new One-Click works with Mongrel.  
Ensure building binaries for it either native or cross platform works  
flawlessly

Now, I have a few blockers:

Dunno which branch is the proper one. last time I worked on 1.2  
improving MinGW support and 1.1.5 got out without taking those  
patches.

Echoe extension compilation is interfering with rake-compiler one, is  
there a way to disable it?

Elliot Cable left a message when I first imported rake-compiler to  
GitHub:

> <https://github.com/rake-compiler/rake-compiler/commit/28e938cf837c6859197000cc647f84f92668f0b6#comments>

Again, the goal of rake-compiler is not just simplify the compilation,  
but also provide something that Echoe or Hoe doesn’t: cross  
compilation.

Well, I’ve shared my plan, what do you guys think?

## Cheers,

## Luis L. AREA 17

Perfection in design is achieved not when there is nothing more to add,  
but rather when there is nothing more to take away.  
Antoine de Saint-Exupéry

---

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [April 27, 2009, 4:02am UTC](https://www.ruby-forum.com/t/mongrel-cross-compilation-echoe-and-rake-compiler/166539/2 "2009-04-27T04:02:26Z")

</div>

On Sun, Apr 26, 2009 at 10:12 PM, Evan W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I think that’s a good plan. Echoe has some rudimentary  
> cross-compilation (used for JRuby), but not for Mingw. Your way is  
> better.

rake-compiler still doesn’t support JRuby, but perhaps a JavaJarTask  
is coming, but I’m not holding my breathe until I see these patckes  
😉

> My plan is as so:
> 
> Gossamer + Rack launch script + some optimizations/bugfixes + Ruby 1.9  
> compat = more or less Mongrel 2.0.

The work on this has already started? Gossamer is the codename?

> This puts you in a tough spot, but it’s probably best to branch off  
> Gossamer and let me forward-port whatever is missing. The 1.x branches  
> are effectively dead, except for a Ruby 1.9 compat update (v1.1.6).

I’ve no problem working with bleeding edge stuff, as long I can find it  
🙂

> I promise to get to this every weekend, and don’t, so I’ll stop  
> promising. I may be able to squeeze some time out of work to spend on  
> it.

No rush, my only concern is ensure Mongrel itself works on the  
upcoming One-Click Installer. Got all the details ironed to do a  
release tonight, and when started to install in a sandbox found that  
Mongrel wasn’t working.

Anyhow, now I have a Mac so 3 way testing between Linux, OSX and  
Windows is now possible form my side, so promise not break anything  
🙂

## Cheers,

## Luis L. AREA 17

Perfection in design is achieved not when there is nothing more to add,  
but rather when there is nothing more to take away.  
Antoine de Saint-Exupéry

---

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [April 27, 2009, 4:17am UTC](https://www.ruby-forum.com/t/mongrel-cross-compilation-echoe-and-rake-compiler/166539/3 "2009-04-27T04:17:37Z")

</div>

Evan W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> My plan is as so:
> 
> Gossamer + Rack launch script + some optimizations/bugfixes + Ruby 1.9  
> compat = more or less Mongrel 2.0.

Cool. I’m pretty sure Unicorn and Gossamer are both 1.9-compatible (all  
the tests manage to pass), but I don’t have any real code running  
on 1.9 yet (and nothing in production on 1.8, either, yet).

Let me know if there are any optimizations/bugfixes in particular I can  
help with, too.

---

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [April 27, 2009, 3:48am UTC](https://www.ruby-forum.com/t/mongrel-cross-compilation-echoe-and-rake-compiler/166539/4 "2009-04-27T03:48:24Z")

</div>

I think that’s a good plan. Echoe has some rudimentary  
cross-compilation (used for JRuby), but not for Mingw. Your way is  
better.

My plan is as so:

Gossamer + Rack launch script + some optimizations/bugfixes + Ruby 1.9  
compat = more or less Mongrel 2.0.

This puts you in a tough spot, but it’s probably best to branch off  
Gossamer and let me forward-port whatever is missing. The 1.x branches  
are effectively dead, except for a Ruby 1.9 compat update (v1.1.6).

I promise to get to this every weekend, and don’t, so I’ll stop  
promising. I may be able to squeeze some time out of work to spend on  
it.

Evan

---

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [April 27, 2009, 4:17am UTC](https://www.ruby-forum.com/t/mongrel-cross-compilation-echoe-and-rake-compiler/166539/5 "2009-04-27T04:17:37Z")

</div>

Luis L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> On Sun, Apr 26, 2009 at 10:12 PM, Evan W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > My plan is as so:
> > 
> > Gossamer + Rack launch script + some optimizations/bugfixes + Ruby 1.9  
> > compat = more or less Mongrel 2.0.
> 
> The work on this has already started? Gossamer is the codename?

Did you miss my earlier message posted to this list?

[http://rubyforge.org/pipermail/mongrel-development/2009-April/000323.html](http://rubyforge.org/pipermail/mongrel-development/2009-April/000323.html)

> > This puts you in a tough spot, but it’s probably best to branch off  
> > Gossamer and let me forward-port whatever is missing. The 1.x branches  
> > are effectively dead, except for a Ruby 1.9 compat update (v1.1.6).
> 
> I’ve no problem working with bleeding edge stuff, as long I can find it 🙂

It’s a branch of Unicorn and in the same repositories:

git://git.bogomips.org/unicorn.git  
[Rack HTTP server for Unix and fast clients](http://git.bogomips.org/unicorn.git)  
git://repo.or.cz/unicorn.git (mirror)  
[http://repo.or.cz/r/unicorn.git](http://repo.or.cz/r/unicorn.git) (mirror)

Have fun!

---

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [April 27, 2009, 4:05pm UTC](https://www.ruby-forum.com/t/mongrel-cross-compilation-echoe-and-rake-compiler/166539/6 "2009-04-27T16:05:07Z")

</div>

On Sun, Apr 26, 2009 at 10:59 PM, Eric W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> [http://rubyforge.org/pipermail/mongrel-development/2009-April/000323.html](http://rubyforge.org/pipermail/mongrel-development/2009-April/000323.html)

Actually ignored for the simple sake that states \*nix compatibility  
only, which is not my case since I’m on Windows

> It’s a branch of Unicorn and in the same repositories:
> 
> ```
> git://git.bogomips.org/unicorn.git
> http://git.bogomips.org/unicorn.git
> git://repo.or.cz/unicorn.git (mirror)
> http://repo.or.cz/r/unicorn.git (mirror)
> 
> ```
> 
> Have fun!

Will take a look, keeping in mind that _must_ work across all the  
platforms, at least cleanly like Mongrel does.

## – Luis L. AREA 17

Perfection in design is achieved not when there is nothing more to add,  
but rather when there is nothing more to take away.  
Antoine de Saint-Exupéry

---

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [April 27, 2009, 4:18pm UTC](https://www.ruby-forum.com/t/mongrel-cross-compilation-echoe-and-rake-compiler/166539/7 "2009-04-27T16:18:37Z")

</div>

Luis L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > Did you miss my earlier message posted to this list?
> > 
> > [http://rubyforge.org/pipermail/mongrel-development/2009-April/000323.html](http://rubyforge.org/pipermail/mongrel-development/2009-April/000323.html)
> 
> Actually ignored for the simple sake that states \*nix compatibility  
> only, which is not my case since I’m on Windows

> Will take a look, keeping in mind that _must_ work across all the  
> platforms, at least cleanly like Mongrel does.

Of course, this is why Unicorn itself is a separate package from  
Mongrel.

I think the UNIX-only stuff is mainly confined to the HttpServer class  
where the unportable stuff with forking, shared FDs, signals, pipes are.  
That and the SocketHelper that can bind UNIX domain sockets.

The rest of it, mainly http\_{request,response}.rb, is stripped-down from  
Mongrel to only work with Rack and should be droppable into Mongrel.

The C/Ragel http11 parser interface has been simplified a lot with some  
minor speed improvements. It doesn’t use any new functions so it should  
be fine on Windows . The JRuby version will need to be updated to use  
the simpler interface (or http\_request to use the old interface). I’ve  
been planning on stealing (or writing) a pure-Ruby parser for Unicorn,  
as well…
