# vanilla-sources won't emerge - out of memory

## grant123

I'm trying to emerge vanilla-sources on the 256MB Beaglebone.  It always fails partway through the install phase with this in dmesg:

Out of memory: Kill process 2591 (emerge) score 828 or sacrifice child

Killed process 2591 (emerge) total-vm:225676kB, anon-rss:218456kB, file-rss:0kB

Is there anything I can do to emerge vanilla-sources?

----------

## Aquous

Add more swap.

----------

## Hu

Do you need to put the sources on the Beaglebone?  It will likely be a very slow compilation even if you get it to work.  The kernel build system has excellent support for cross-compilation, so you may be better served by using a general purpose x86/amd64 machine to cross-compile a kernel for your Beaglebone.

----------

## grant123

 *Quote:*   

> Add more swap.

 

Not sure why I couldn't come up with that myself.  Worked great, thank you.

----------

## grant123

 *Quote:*   

> Do you need to put the sources on the Beaglebone? It will likely be a very slow compilation even if you get it to work. The kernel build system has excellent support for cross-compilation, so you may be better served by using a general purpose x86/amd64 machine to cross-compile a kernel for your Beaglebone.

 

I've read that cross-compiling is easier said than done.  I'm OK with slow compiles anyway.

----------

## NeddySeagoon

grant123,

Thats why Gentoo provides crossdev.

If you add distcc and take care that your cross compiler is the same version as that on your beaglebone, your helper(s) can do all the heavy lifting for anything that will not cross compile.

----------

