From owner-freebsd-questions@FreeBSD.ORG Sun Oct 17 17:57:19 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 DA07C106566B for ; Sun, 17 Oct 2010 17:57:19 +0000 (UTC) (envelope-from bonomi@mail.r-bonomi.com) Received: from mail.r-bonomi.com (ns2.r-bonomi.com [204.87.227.129]) by mx1.freebsd.org (Postfix) with ESMTP id 6D6048FC0C for ; Sun, 17 Oct 2010 17:57:18 +0000 (UTC) Received: (from bonomi@localhost) by mail.r-bonomi.com (8.14.3/rdb1) id o9HHtH1N003230; Sun, 17 Oct 2010 12:55:17 -0500 (CDT) Date: Sun, 17 Oct 2010 12:55:17 -0500 (CDT) From: Robert Bonomi Message-ID: <201010171755.o9HHtH1N003230@mail.r-bonomi.com> To: fernando.apesteguia@gmail.com, rfarmer@predatorlabs.net Cc: 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: Sun, 17 Oct 2010 17:57:19 -0000 > From owner-freebsd-questions@freebsd.org Sun Oct 17 11:46:48 2010 > Date: Sun, 17 Oct 2010 18:47:09 +0200 > From: =?ISO-8859-1?Q?Fernando_Apestegu=EDa?= > To: Rob Farmer > Cc: User Questions > Subject: Re: libxul compilation problem > > 2010/10/16 Rob Farmer : > > 2010/10/16 Fernando Apestegu=EDa : > >> I didn't run X or whatsoever. That's why I think I should have enough me= > 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 gettin= > 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! (Make sure the fix works on a machine with only 64mb ram and 256m swap. ) Turning on optimization virtually _always_ results in the compiler needing more resources. "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 swapon' for how to use a -file- as temporary swap space. 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.