From owner-freebsd-ports@FreeBSD.ORG Sat Aug 28 12:50:57 2010 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 790C01065697 for ; Sat, 28 Aug 2010 12:50:57 +0000 (UTC) (envelope-from naylor.b.david@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id F34DF8FC16 for ; Sat, 28 Aug 2010 12:50:56 +0000 (UTC) Received: by wyb33 with SMTP id 33so5494702wyb.13 for ; Sat, 28 Aug 2010 05:50:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:organization:to:subject :date:user-agent:cc:references:in-reply-to:mime-version:content-type :content-transfer-encoding:message-id; bh=RdxAshQqS/XtHS9PFZgEoi5aKC+s5JfwTptg2Ayh7SY=; b=SPNNRQSHo+I6D/pwNwGYFjb42cYPFRre4bYCwoP0bTGEod44JSlUnCns1lzNJBDL56 dQZkp2V61IA/T1OlReOn96OLyHguASEmGEph0i1acXgCv4UsOEkWFPY/B0xgv06duY8G RPExrn4BS3zhQxqeCytEb0Wf138GYUGbVNZP0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:organization:to:subject:date:user-agent:cc:references :in-reply-to:mime-version:content-type:content-transfer-encoding :message-id; b=itrl1KnEGRYc7+/9ZBMlSsyyaabJDbVawuTIRVvO6XcwdGkaeE5rfiSnzZ/rdpNqdC qdmKHznELgC/CDVJvN6Gj39ayf7anMJYNkrJZGZYU43VfTDQeERwvn/rKWzqlaanDCoH 1O0W9VvDB/6kWPBfdB+H5NlsZf56l71RSoXzs= Received: by 10.227.134.138 with SMTP id j10mr1933912wbt.207.1282998481353; Sat, 28 Aug 2010 05:28:01 -0700 (PDT) Received: from dragon.dg (41-132-25-181.dsl.mweb.co.za [41.132.25.181]) by mx.google.com with ESMTPS id e31sm4385694wbe.23.2010.08.28.05.27.56 (version=SSLv3 cipher=RC4-MD5); Sat, 28 Aug 2010 05:28:00 -0700 (PDT) From: David Naylor Organization: Private To: Greg Lewis Date: Sat, 28 Aug 2010 14:28:02 +0200 User-Agent: KMail/1.13.5 (FreeBSD/9.0-CURRENT; KDE/4.4.5; amd64; ; ) References: <201006251808.29467.naylor.b.david@gmail.com> <861vazh881.fsf@gmail.com> <8662z58gid.fsf@gmail.com> In-Reply-To: <8662z58gid.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart4421716.jxItr0NUF4"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201008281428.06609.naylor.b.david@gmail.com> Cc: Anonymous , freebsd-ports@freebsd.org Subject: Re: MAKE_JOBS and openjdk6 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: Sat, 28 Aug 2010 12:50:57 -0000 --nextPart4421716.jxItr0NUF4 Content-Type: multipart/mixed; boundary="Boundary-01=_TDQeMXi12GFUSlq" Content-Transfer-Encoding: 7bit --Boundary-01=_TDQeMXi12GFUSlq Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Friday 20 August 2010 17:12:42 Anonymous wrote: > Anonymous writes: > > David Naylor writes: > >>> %% > >>> Index: java/openjdk6/Makefile > >>>=20 > >>> @@ -266,3 +267,6 @@ post-install: > >>> @${CAT} ${PKGMESSAGE} > >>> =20 > >>> .include > >>>=20 > >>> + > >>> +# XXX: use `?=3D' in bsd.port.mk > >>> +_MAKE_JOBS=3D > >>> %% > >>=20 > >> Yes, I prefer this approach. See attached for the patch that does thi= s. > >> I will file a PR about this shortly. > >=20 > > I've filed ports/148754 about defining empty _MAKE_JOBS so it's not > > forgotten. >=20 > That PR was recently committed. So, you can try to resurrect ports/148753. I've had a look at openjdk6 and it appears it really is MAKE_JOBS_UNSAFE. = =20 There are portions of it that are able to use make jobs and those are compi= led=20 using HOTSPOT_BUILD_JOBS. =20 I suggest that either: - openjdk stops using HOTSPOT_BUILD_JOBS and declares itself unsafe, or - declare itself make jobs safe and use HOTSPOT_BUILD_JOBS for those parts= =20 that can use it Attached is a patch that achieves the latter suggestion. =20 The problem with the port as it stands now is that it breaks with=20 =46ORCE_MAKE_JOBS, does not honour MAKE_JOBS_NUMBER and that it will consum= e a=20 lot of resources when building, more so than what is reasonably expected. = =20 Simply declaring the port make jobs unsafe does not fix the resource=20 consumption that some programs/scripts may take into account. =20 Taking the first option will result in slower build times when the port is = able=20 to build faster. =20 Taking the second option results in overriding a 'private' variable. There= is=20 precedent in ports for using that 'private' variable. With the recently=20 committed changes using the 'private' variable is less intrusive. =20 I recommend the second option. It allows the port to build as fast as=20 possible, to honour MAKE_JOBS_NUMBER and does not employ any hacks. =20 Regards --Boundary-01=_TDQeMXi12GFUSlq Content-Type: text/x-patch; charset="ISO-8859-1"; name="openjdk6.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="openjdk6.diff" diff -ur /usr/ports/java/openjdk6/Makefile openjdk6/Makefile =2D-- /usr/ports/java/openjdk6/Makefile 2010-07-15 22:29:26.000000000 +0200 +++ openjdk6/Makefile 2010-07-15 22:33:45.000000000 +0200 @@ -48,6 +48,7 @@ =20 # java extracts directly to the cwd WRKSRC=3D ${WRKDIR} +MAKE_JOBS_SAFE=3D yes =20 USE_GMAKE=3D yes USE_MOTIF=3D yes @@ -145,8 +146,10 @@ USE_DISPLAY=3D yes .endif =20 =2DBUILD_JOBS_NUMBER!=3D ${SYSCTL} -n kern.smp.cpus =2DMAKE_ENV+=3D HOTSPOT_BUILD_JOBS=3D${BUILD_JOBS_NUMBER} +.if !defined(DISABLE_MAKE_JOBS) +MAKE_ENV+=3D HOTSPOT_BUILD_JOBS=3D${MAKE_JOBS_NUMBER} +_MAKE_JOBS=3D +.endif =20 COPYDIRS=3D \ hotspot/src/os/linux/launcher \ --Boundary-01=_TDQeMXi12GFUSlq-- --nextPart4421716.jxItr0NUF4 Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (FreeBSD) iEYEABECAAYFAkx5ANYACgkQUaaFgP9pFrLW6gCgjkdBwjA2jJKn+TveAldH84ms MKYAnAw/tS/qvVN/vdkenOlBJNaOVyxP =0U3J -----END PGP SIGNATURE----- --nextPart4421716.jxItr0NUF4--