From owner-freebsd-ports@FreeBSD.ORG Sun Oct 19 15:04:09 2008 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF406106568A; Sun, 19 Oct 2008 15:04:09 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.9.129]) by mx1.freebsd.org (Postfix) with ESMTP id 94B548FC2A; Sun, 19 Oct 2008 15:04:09 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 43CFA730AC; Sun, 19 Oct 2008 16:52:34 +0200 (CEST) Date: Sun, 19 Oct 2008 16:52:34 +0200 From: Luigi Rizzo To: ports@freebsd.org, openoffice@FreeBSD.org Message-ID: <20081019145234.GA67034@onelab2.iet.unipi.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Cc: Subject: unreasonable amount of memory used in openoffice build X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Oct 2008 15:04:09 -0000 hi, i noticed on my laptop (Dell X1 w/ 512MB ram - i386, RELENG_7 that openoffice3 is using an unreasonable amount of memory to build one of its components (during the build of resourcemodel, the offending file is unxfbsdi.pro/misc/qnametostr.cxx) which causes the build machine to spend a huge amount of time swapping. It seems to be a known issue http://bugs.gentoo.org/show_bug.cgi?format=multiple&id=215291 and our port includes a workaround that is applied only on amd64 with the following section in the port's Makefile: .if ${ARCH} == amd64 WITHOUT_MOZILLA= yes LIB_DEPENDS+= boost_regex:${PORTSDIR}/devel/boost CONFIGURE_ARGS+= --with-system-boost=yes #i58343# .if (${OSVERSION} >= 700042) EXTRA_PATCHES+= ${FILESDIR}/amd64-gcc42-workaround .endif .endif I would suggest to apply the fix unconditionally (at least by default, possibly override it with some build option if needed). On amd64 according to the above URL the problem is particularly bad as it requires more than 4GB of memory (RAM/SWAP) but even on i386 the compiler process grows well above 1GB of memory and together with other stuff (browser, X and more) easily consuming 2-300MB each, it is not unlikely to hit the swap on many boxes. Makes sense ? cheers luigi