[Haskell-cafe] trouble installing ghc 6.6: xargs: /usr/bin/ar: terminated by signal 11

Thomas Hartman tphyahoo at gmail.com
Tue Feb 20 03:24:23 EST 2007


I finally got around to trying this, but still no luck. now getting
missing cmm.h error.

thartman at linodewhyou:~/haskellInstalls/ghc-6.6$ cat mk/build.mk
        SplitObjs=NO

after doing sudo make > make.out

thartman at linodewhyou:~/haskellInstalls/ghc-6.6$ tail make.out
------------------------------------------------------------------------
------------------------------------------------------------------------
== make all -r;
 in /home/thartman/haskellInstalls/ghc-6.6/rts
------------------------------------------------------------------------
../compiler/ghc-inplace -H16m -O -optc-O2 -static -I. -#include
HCIncludes.h -fvia-C -dcmm-lint     -c Apply.cmm -o Apply.o

Apply.cmm:13:17:  error: Cmm.h: No such file or directory
make[1]: *** [Apply.o] Error 1
make: *** [stage1] Error 1
thartman at linodewhyou:~/haskellInstalls/ghc-6.6$

anyone seen this?

thanks, thomas.

2007/1/7, Duncan Coutts <duncan.coutts at worc.ox.ac.uk>:
> On Sat, 2007-01-06 at 15:30 -0800, tphyahoo wrote:
> > I'm having trouble installing ghc 6.6. On ubuntu, virtual server (user mode
> > linux).
> >
> > Something seems to be killing the process, no idea why.
> >
> > Anyone seen this?
>
> Yes.
>
> > /usr/bin/ar: creating libHSbase.a
> > xargs: /usr/bin/ar: terminated by signal 11
>
>
> What is happening is that the ghc build system is linking thousands and
> thousands of tiny .o files into libHSbase.a. GNU ar isn't optimised for
> this use-case and it takes far more memory than it really needs to. So
> what happens is that ar takes >500Mb of memory and your virtual
> machine / virtual server probably isn't configured with that much memory
> and so the linux kernel OOM killer terminates the ar process.
>
> To make this worse, since there are so many .o files, it takes several
> invocations of ar to link them all. On each invocation ar is building
> the symbol index (-q is ignored) and this is what takes the most time
> and memory. It's a good deal quicker to use a custom program (100 lines
> of Haskell) to build libHSbase.a and then use ranlib just once to build
> the symbol index.
>
> I submitted a patch to gnu binutils to make ar take less memory when
> linking 1000's of files so it now only takes around 100Mb rather than
> 500Mb when linking libHSbase.a. That patch is included in version 2.17 I
> think (in other words most systems don't have it yet).
>
> What you can do in the mean time is either configure your virtual
> machine with more memory or turn off the split-objs feature when you
> configure ghc. Just add SplitObjs=NO" to your mk/build.mk file (which
> may not exist to start with). (The Gentoo ebuild does this
> automatically)
>
> Duncan
>
>


More information about the Haskell-Cafe mailing list