[arch-general] virtual memory exhausted

Jorge Almeida jjalmeida at gmail.com
Fri Jul 29 17:44:09 EDT 2011


On Fri, Jul 29, 2011 at 10:21 PM, Jan Steffens <jan.steffens at gmail.com> wrote:
> On Fri, Jul 29, 2011 at 1:28 PM, Jorge Almeida <jjalmeida at gmail.com> wrote:
>> I'm not sure this is an Arch issue, but I can't figure out what else can be.
>>
>> I'm trying to compile non-Arch stuff in an arch host. I tried Binutils
>> (of LFS) and Buildroot (of uclibc). Both failed with the "virtual
>> memory exhausted: Cannot allocate memory" error.
>> The computer is a one-user workstation, which wasn't doing anything
>> else worth mentioning...
>> I tried both as root and as  common user, same problem...
>>
>>
>
> Add a few gigabytes of swap, if you can. If that doesn't work, try
> running x86_64, if you don't.
>

I already found a solution. The problem is that the limits are too
restrictive.  There's probably a reason to have those values as
default, but  then nobody seems to understand this stuff that much,
judging by Google...
The solution is to issue, as root

ulimit -u unlimited lfs
ulimit -v unlimited lfs

and then do the compiling as user lfs. By the way: this syntax (with
the user as argument) seems to be completely undocumented! How hard
could it be to add a few characters to the bash man page? (And finding
that ulimit is a bash build-in is another matter, I don't remember how
I found it.) I still don't know how to change the default...

Cheers

JA


More information about the arch-general mailing list