Problem building GHC

John Skaller skaller at
Wed Jul 13 09:44:53 EDT 2005

On Wed, 2005-07-13 at 10:18 +0300, Dinko Tenev wrote:
> On 7/13/05, John Skaller <skaller at> wrote:
> > I think you need more RAM. I had to
> > buy a new computer to fix this problem.
> Oh my, that hurts...quite an expensive piece of software, GHC ;)  But
> this really explains a lot, because two identical builds of mine
> happened to die on different files - it never occurred to me GCC could
> run low on memory though...

Try running 'top' in one window whilst compiling ..:)

> How about more swap, provided I would let it run overnight?

On my box, running RH9, I had a heap of swap .. that was
part of the problem -- the thing went into a paging frenzy.

I think that version of Linux had very bad code in it too:
I had the same problem opening too many browser windows.

If you do 'random access' on virtual memory, your box
will be sure to die -- you're loading a whole page
when all you may want is one word :)

If you run in single user mode .. you might do better
to turn the swap OFF :)

> > Gcc is a badly written piece of software.
> > What do you expect from a compiler that tries to do
> > sophisticated  optimisations .. written in C??
> Ah, this sounds a bit more encouraging (really :)  Wouldn't disabling
> GCC optimisations be an easier way then?

I cannot say for GHC -- my compiler Felix relies on 
the C++ compiler to do some of the work.

Using GHC with a native code compiler might avoid the
problem (but I'm no expert on GHC ;)

John Skaller <skaller at users dot sourceforge dot net>
Download Felix:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url :

More information about the Glasgow-haskell-users mailing list