Hi Óscar, 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? Regards, chenwj -- Wei-Ren Chen (陳韋任) Computer Systems Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667 Homepage: http://people.cs.nctu.edu.tw/~chenwj
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
Hi David,> | David, do you build LLVM/Clang in what mode?Now I use "--enable-optimized" option to make a Release+Asserts build, LLVM/Clang get built finally...> 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-assertionsThanks for the tip.> 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)?Looks *not* out of memory, the ld (collect2) just keeps running, but llc never get linked. Regards, chenwj -- Wei-Ren Chen (陳韋任) Computer Systems Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667 Homepage: http://people.cs.nctu.edu.tw/~chenwj