From owner-freebsd-questions@FreeBSD.ORG Mon Oct 18 06:25:22 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A454E106564A for ; Mon, 18 Oct 2010 06:25:22 +0000 (UTC) (envelope-from fernando.apesteguia@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 2F6338FC17 for ; Mon, 18 Oct 2010 06:25:21 +0000 (UTC) Received: by bwz16 with SMTP id 16so360005bwz.13 for ; Sun, 17 Oct 2010 23:25:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=7N9r97pCpm99CYpad6cBpN8NvhPKItELTl3SR+uLXXQ=; b=dZzemG9+pCdw2MPG+qAKkU9rm1iHYdah+XTUK85+nG70CW0NW/j4F3JdZ1BgTQNzh0 SW6wf0FgEdv1jK31zoolfRi+vtbX3JakZXtsWXlS7Ykqxhxy/JKpHghmi6CsNGy62saV dq0imZIP2m+dpmzERgiOhOuZz19u6atvVSXcI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=SIQ/wIg1hLydkZAdN5m37J9a0/InsfSSPXj64M5yPUVZV+arGovUcgFG5CuM0T1LNi D0hAXhDeUc+MA4ra7OPolR0LdkhY6jp4fMsn3Dwdxr75xlJIVzjzF19FWZqYDgXe9SsX Wof2eat16mw+weBMwUX96/aXM6jlLqqUrtkBw= MIME-Version: 1.0 Received: by 10.204.120.194 with SMTP id e2mr3893188bkr.200.1287383120809; Sun, 17 Oct 2010 23:25:20 -0700 (PDT) Received: by 10.204.148.82 with HTTP; Sun, 17 Oct 2010 23:25:20 -0700 (PDT) In-Reply-To: <201010171755.o9HHtH1N003230@mail.r-bonomi.com> References: <201010171755.o9HHtH1N003230@mail.r-bonomi.com> Date: Mon, 18 Oct 2010 08:25:20 +0200 Message-ID: From: =?ISO-8859-1?Q?Fernando_Apestegu=EDa?= To: Robert Bonomi Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: rfarmer@predatorlabs.net, freebsd-questions@freebsd.org Subject: Re: libxul compilation problem X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Oct 2010 06:25:22 -0000 On Sun, Oct 17, 2010 at 7:55 PM, Robert Bonomi w= rote: >> From owner-freebsd-questions@freebsd.org =A0Sun Oct 17 11:46:48 2010 >> Date: Sun, 17 Oct 2010 18:47:09 +0200 >> From: =3D?ISO-8859-1?Q?Fernando_Apestegu=3DEDa?=3D >> To: Rob Farmer >> Cc: User Questions >> Subject: Re: libxul compilation problem >> >> 2010/10/16 Rob Farmer : >> > 2010/10/16 Fernando Apestegu=3DEDa : >> >> I didn't run X or whatsoever. That's why I think I should have enough= me=3D >> mory. >> >> In fact after getting that error, I rebooted so I could update the >> >> ports from a "fresh" >> >> running system (nothing cached or so). But even in that case, I'm get= tin=3D >> g the >> >> same error. >> >> >> >> Any VM tuning I can try? >> > >> > I'm not really knowledgeable about that kind of thing. >> > >> > However, the port is marked MAKE_JOBS_SAFE which means that it will >> > try to run multiple compiler instances in parallel, to speed things up >> > if you have multiple CPUs/cores. You can try running with "make >> > -DDISABLE_MAKE_JOBS" to just run one at a time - maybe you have enough >> > memory for that but not multiple jobs at once? >> >> Hi Rob, >> >> The machine has one single core cpu. Finally I was able to compile the >> thing, compiling >> the offending file by hand (nsHtml5ElementName.cpp) without the -O2 >> optimization flag. >> With this flag, cc1plus eats up all the memory of my system in a few >> seconds. Without >> the flag, the file is compiled without any problems and quite fast. >> >> Should this issue be a candidate for filing a PR? > > *ONLY* if you can provide a 'fix' _with_ the report! =A0 > (Make sure the fix works on a machine with only 64mb ram and 256m swap. ) Hehe, OK, I'll try to have a look at it. > > Turning on optimization virtually _always_ results in the compiler needin= g > more resources. =A0 "How much" more depends on the size, complexity, and = ' > optimizability' of the code being compiled. > > The "simple" fix for your problem is to add swap space to the system. > swap space does -not- have to be in a dedicated partition, see 'man swapo= n' > for how to use a -file- as temporary swap space. I had done it if disabling the optimization wouldn't have changed anything.= The main problem was that I didn't know how much swap I had to add. Right now I have an updated system but I will have a look at how much RAM this takes using -O2. > > > Note: if you find someting that won't compile, given a combined 4 gigs of > RAM and swap space, and the build isthe only thing running beyond core > system services, *then* you've got the basis for 'good' PR filing. Thanks! > > >