MAKE_JOBS_UNSAFE (some more ports)
David Naylor
naylor.b.david at gmail.com
Sat May 23 11:17:38 UTC 2009
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 at 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=1
That is quite a problem. And this reveals a problem with openoffice-2*, it
doesn't work since it does (in-effect):
.if (${MAKE_JOBS_NUMBER} > 1)
which will not work for MAKE_JOBS_NUMBER=`${SYSCTL} -n kern.smp.cpus`. Is
there anyway for MAKE_JOBS_NUMBER to get a resolved value (I think expanding
make to expose the number of cores on the system [rather radical, I know]).
If MAKE_JOBS_NUMBER can be 'fixed' then the solution is straight forward:
.if (${MAKE_JOBS_NUMBER} > 1)
# Use concurrent build
.else
# Use standard build
.endif
> > > - 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?= `${SYSCTL} -n kern.smp.cpus`
> _MAKE_JOBS= -j${MAKE_JOBS_NUMBER}
> -.else
> -_MAKE_JOBS= -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+= "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 only
get displayed if the port fails AND -DFORCE_MAKE_JOBS, which is the less
likely scenario.
I only changed it because when testing the command output with `make build -n`
the offset changed with -DFORCE_MAKE_JOBS on a safe port. I just found it
annoying...
> > > 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part.
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20090523/0058c300/attachment.pgp
More information about the freebsd-ports
mailing list