Date: Sat, 28 Aug 2010 14:28:02 +0200 From: David Naylor <naylor.b.david@gmail.com> To: Greg Lewis <glewis@freebsd.org> Cc: Anonymous <swell.k@gmail.com>, freebsd-ports@freebsd.org Subject: Re: MAKE_JOBS and openjdk6 Message-ID: <201008281428.06609.naylor.b.david@gmail.com> In-Reply-To: <8662z58gid.fsf@gmail.com> References: <201006251808.29467.naylor.b.david@gmail.com> <861vazh881.fsf@gmail.com> <8662z58gid.fsf@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--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 <swell.k@gmail.com> writes: > > David Naylor <naylor.b.david@gmail.com> writes: > >>> %% > >>> Index: java/openjdk6/Makefile > >>>=20 > >>> @@ -266,3 +267,6 @@ post-install: > >>> @${CAT} ${PKGMESSAGE} > >>> =20 > >>> .include <bsd.port.post.mk> > >>>=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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201008281428.06609.naylor.b.david>