On Wed, Aug 22, 2012 at 8:05 PM, Michael Mol <[email protected]> wrote: > On Wed, Aug 22, 2012 at 2:52 PM, Jorge Almeida <[email protected]> wrote: >> # tar -xJvf /usr/portage/distfiles/m4-1.4.16.tar.xz >> xz: (stdin): Cannot allocate memory >> >> The box has 2G ram + 1G swap. I'm installing Gentoo from an existing distro. > > How much do you have free? From xz's manpage:
Almost all of it! It's a one-user workstation, which was essentialy idle. > > I read the man page of xz, but it suggested nothing to me. > > Three things come to mind: > > 1) You may not have enough memory free > 2) There may be a bug (either compile/link-induced or code-induced) in > the copy of xz you're using > 3) Upstream used some insane settings, causing a massive increase in > the amount of RAM required to decompress that stream. > > > You could download the .tar.xz file, decompress it on a different box, > and then recompress it with lighter settings. > > unxz filename.tar.xz > xz -1 filename.tar > Done that. It extracts now, so 3) is the correct hypothesis, and "insane" is really the appropriate word. Of course, the hash digests are now wrong, so emerge still fails. Any idea how to find which amount of memory is needed? I would setup appropriate swap, if possible. The LFS site http://www.linuxfromscratch.org/lfs/view/development/chapter03/packages.html shows that there exists a tar.bz2 tarball. I think the ebuild should pull that... Can't believe there are no gentooers out there with boxes with less ram. Thanks a lot Jorge Almeida

