Problem building GHC
skaller at users.sourceforge.net
Wed Jul 13 01:01:15 EDT 2005
On Tue, 2005-07-12 at 22:59 +0300, Dinko Tenev wrote:
> I am trying to build from the current GHC source tree on a Debian
> "sarge" box, and the build dies trying to compile
> /home/shinobi/build/fptools/ghc/parser/Parser.hs, with the following
I have had this problem regularly...
> It seems that, apart from whatever else might be wrong, there is a
> problem with GCC.
> I guess I'll have to switch to version 2.95.2 as
> suggested by the guide (I am currently using 3.3.5,)
I think you need more RAM. I had to
buy a new computer to fix this problem.
WORKAROUND: Reboot your computer and try again,
in single user mode if necessary.
Gcc is a badly written piece of software.
What do you expect from a compiler that tries to do
sophisticated optimisations .. written in C??
It uses HUGE amounts of memory, and some of the
algorithms it uses are quadratic or worse.
I regularly had to *hardware reset* my
old 700MHz PIII to kill compiles.
My new box has 1G Ram .. that seems to have
fixed it .. but the C compiles are still
VERY slow (Compared with Ocaml for example,
which is at least 100 times faster).
Just for example, most versions use a linked
list for symbol lookup instead of a hashtable ..
O(n) instead of O(1).
It is woefully inadequate compiling large functions,
which language translators sometimes generate.
Most language translators would love to generate
a single huge function, and compilation via C
requires all sort of hacks to get around the
fact that the most commonly used C compiler
on Unix platforms, gcc, is incapable of handling it.
There is an interesting paper by Fergus Henderson et al
on the Felix website about the gcc specific hackery
used to allow Mercury to work (Mercury is the
premier logic programming language) .. Felix uses
some of the techniques discussed:
John Skaller <skaller at users dot sourceforge dot net>
Download Felix: http://felix.sf.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://www.haskell.org//pipermail/glasgow-haskell-users/attachments/20050713/88021c5b/attachment.bin
More information about the Glasgow-haskell-users