> Geeeeeez.  I've got 512Mb on my machine, and FXRuby won't compile with
> optimization options; at one point, it was consumed 330Mb of RAM before
> "running out of memory"!  Doesn't this seem a bit... excessive?  What is
it
> about FXRuby that is requiring so many resources?  I've noticed that I'm
not
> the only person with this problem, but it took me a while to track it
down.
> Perhaps the suggestion of turning off "-O2" to get it to build would be
> useful in the docs somewhere.

The next release of FXRuby disables gcc's optimizations (i.e. the CFLAGS get
modified in the "extconf.rb" file); it's not really useful to optimize that
code anyways. FXRuby uses C++ templates pretty extensively, and gcc versions
2.95.x and earlier are notoriously inefficient when compiling templates.
However, the newest release (gcc 3.0) introduces a new inliner for C++ that
may alleviate these problems; to quote the release notes:

"This inliner works at an earlier phase of the compiler than the traditional
GCC inliner. As a result, the compiler may use dramatically less time and
memory to compile programs that make heavy use of templates, such as C++
expression-template programs. One program that previously required 247MB of
memory to compile, and about six minutes of compile time, now takes only
157MB and about two minutes to compile."

For more information, please see this link:

    http://gcc.gnu.org/news/inlining.html

I personally have not had a chance to download and try the new compiler, so
I can't confirm that it helps out for compiling FXRuby with optimizations
(but, as I said, it's sort-of a moot point if you disable optimizations
anyways).

> By the way, has anyone ever been able to compile it under gcc with
> optimization, and how much memory did it suck up to compile (out of
> curiosity)?

Interestingly enough, it compiles pretty reasonably under Red Hat Linux 6.2,
which I believe shipped with the egcs-1.1.2 compiler. I didn't notice the
ridiculous optimized-compile requirements until I upgraded to a later Linux
distro (currently, Mandrake 8.0 with gcc-2.95.something).