Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 May 2009 13:18:26 +0200
From:      David Naylor <naylor.b.david@gmail.com>
To:        "Ion-Mihai Tetcu" <itetcu@freebsd.org>
Cc:        pgollucci@p6m7g8.com, pav@freebsd.org, freebsd-ports@freebsd.org
Subject:   Re: MAKE_JOBS_UNSAFE (some more ports)
Message-ID:  <200905231318.29346.naylor.b.david@gmail.com>
In-Reply-To: <20090523135133.71a92669@it.buh.tecnik93.com>
References:  <20090522.195350.193746535.chat95@mac.com> <20090523.182426.193741786.chat95@mac.com> <20090523135133.71a92669@it.buh.tecnik93.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--nextPart1469016.yjcZGTeecn
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

On Saturday 23 May 2009 12:51:33 Ion-Mihai Tetcu wrote:
> On Sat, 23 May 2009 18:24:26 +0900 (JST)
> Maho NAKATA <chat95@mac.com> wrote:
> > > Please see attached for the patch.  The changes to bsd.port.mk:
> > > - MAKE_JOBS_NUMBER always defined
> > > - MAKE_JOBS_NUMBER forced to 1 if UNSAFE of DISABLE
>
> AFAIR there are ports that compile OK w/o MAKE_JOBS_SAFE but fail with
> MAKE_JOBS_NUMBER=3D1

That is quite a problem.  And this reveals a problem with openoffice-2*, it=
=20
doesn't work since it does (in-effect):

=2Eif (${MAKE_JOBS_NUMBER} > 1)

which will not work for MAKE_JOBS_NUMBER=3D`${SYSCTL} -n kern.smp.cpus`.  I=
s=20
there anyway for MAKE_JOBS_NUMBER to get a resolved value (I think expandin=
g=20
make to expose the number of cores on the system [rather radical, I know]).=
 =20
If MAKE_JOBS_NUMBER can be 'fixed' then the solution is straight forward:

=2Eif (${MAKE_JOBS_NUMBER} > 1)
	# Use concurrent build
=2Eelse
	# Use standard build
=2Eendif

> > > - MAKE_JOBS_NUMBER defaults (but user defined) to number of cores
>
> This part looks OK, I wonder if there's any reason t ain't like this
> now; Pav?
> -.if defined(MAKE_JOBS_NUMBER)
> +MAKE_JOBS_NUMBER?=3D	`${SYSCTL} -n kern.smp.cpus`
>  _MAKE_JOBS=3D		-j${MAKE_JOBS_NUMBER}
> -.else
> -_MAKE_JOBS=3D		-j`${SYSCTL} -n kern.smp.cpus`
> -.endif
>
> I believe pav@ didn't put the ' && !defined(MAKE_JOBS_SAFE)' part
> intentionally until we get to test all our ports.
> -.if defined(FORCE_MAKE_JOBS)
> +.if defined(FORCE_MAKE_JOBS) && !defined(MAKE_JOBS_SAFE)
>  BUILD_FAIL_MESSAGE+=3D	"You have chosen to use multiple make jobs
> (parallelization) for all ports.  This port was not tested for this
> setting.  Please remove FORCE_MAKE_JOBS and retry the build before
> reporting the failure to the maintainer."

Sorry but I don't see how this would change anything.  The message will onl=
y=20
get displayed if the port fails AND -DFORCE_MAKE_JOBS, which is the less=20
likely scenario. =20

I only changed it because when testing the command output with `make build =
=2Dn`=20
the offset changed with -DFORCE_MAKE_JOBS on a safe port.  I just found it=
=20
annoying...=20

> > > I've then used MAKE_JOBS_NUMBER to set MAXPROCESSES, MAXMODULES and
> > > NUMOFPROCESSES for openoffice-* (not including 1.*).
> > >
> > > I believe openoffice-2* can me marked as SAFE while openoffice-3*
> > > should not be marked at all (since it sometimes works..., very well
> > > for me :-).
> > >
> > > This patch just makes openoffice-* behave like other ports in
> > > regards to parallel builds and the usual MAKE_JOBS variables now
> > > works as expected.
>
> Nice, thanks.



--nextPart1469016.yjcZGTeecn
Content-Type: application/pgp-signature; name=signature.asc 
Content-Description: This is a digitally signed message part.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (FreeBSD)

iEYEABECAAYFAkoX24UACgkQUaaFgP9pFrJIGgCeLAQ/0uFP4dWstkzPSeLrsrud
I+YAn3Q1gMIMMzDNc4UCyNeubBxPe9yf
=cVJM
-----END PGP SIGNATURE-----

--nextPart1469016.yjcZGTeecn--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905231318.29346.naylor.b.david>