[LLVMdev] Stuck on linking llc on ARM

David Tweed david.tweed at arm.com
Tue Sep 11 01:15:28 PDT 2012


On Tue, Sep 11, 2012 at 04:45:23AM +0200, Óscar Fuentes wrote:
> "陳韋任 (Wei-Ren Chen)" <chenwj at iis.sinica.edu.tw> writes:
> 
> >   I have been stuck on compiling LLVM/Clang (r163485) on pandaboard which has
> > following configuration,
> >
> >   - Ubuntu 11.04 + 1G Mem + 1G Swap + 32G SD card
> >   - GCC 4.5.2
> >   - GNU gold (GNU Binutils for Ubuntu 2.21.0.20110327) 1.11
> >
> > The compiling process stucks on linking llc, I am pretty surprised on
> > this. Anyone has similar issue or any idea? Thanks!
> 
> Are you building for Release or Debug? Debug is the default mode and it
> requires lots of memory for linking. As stated on the Getting Started
> document, for building in Release mode pass
> 
> --enable-optimized
> 
> to the configure script.

|  But I already enable swap space, doesn't it help? Anyway, I'll try
| your suggestion. :)

|  David, do you build LLVM/Clang in what mode?

Unfortunately I don't have any silver bullets. I'm using a Pandaboard with 1G of memory and 1G of swap, with as little other stuff running. Definitely don't build with debug symbols unless you are going to use them (which sometimes is important for use). I've also wrapped the linker to ensure only 1 instance is running at any given time. With that linking clang _just_ squeezes under the OOM threshold. As regards configure for a combined llvm+clant tree, I'm using

env CC="ccache /usr/bin/gcc " CXX="ccache /usr/bin/g++ " ./configure -C --disable-bindings --build=armv7l-unknown-linux-gnueabi --host=armv7l-unknown-linux-gnueabi --target=armv7l-unknown-linux-gnueabi --with-cpu=cortex-a9 --with-fpu=neon --with-abi=aapcs --with-float=hard --enable-assertions

Getting stuck sounds like a strange symptom: I've seen plenty of OOM kills but never anything getting "stuck". Does vmstat indicate something is still going on (CPU, disk, etc)?

HTH,
Dave







More information about the llvm-dev mailing list