python waf bypasses _MAKE_JOBS number

sson sson at FreeBSD.org
Fri Jan 9 18:35:21 UTC 2015


Antoine Brodin-2 wrote
> On Fri, Jan 9, 2015 at 5:52 PM, Sean Bruno <

> sbruno@

> > wrote:
>> Marcus:
>>
>> The thing that I would like "fixed" is python waf ignoring the fact
>> that it should not try and detect the number of CPUs on the system.
>>
> 
> Let me rephrase the problem,  there are some problems in some
> individual ports using waf.
> Those ports do not respect ${MAKE_JOBS_NUMBER},  especially when
> MAKE_JOBS_NUMBER=1.
> This breaks qemu which is not multi job friendly  (people using qemu
> have DISABLE_MAKE_JOBS=yes which sets MAKE_JOBS_NUMBER to 1).
> 
> Cheers,
> 
> Antoine
> _______________________________________________

> freebsd-python@

>  mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-python
> To unsubscribe, send any mail to "

> freebsd-python-unsubscribe@

> "


Actually Qemu (user-mode) is thread friendly (for the most part, anyway). 
Lots of other threaded programs will run just fine.  There is a known
problem with dealing with signals and threads but this is not the case with
waf (and shows up usually with cmake instead).    The problem with waf seems
to be the old bug that was reported in
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=160717 seems to still
exist in the FreeBSD/arm, FreeBSD/mips, and maybe other threading
implementations.

The workaround is to only use "--jobs=1" with python waf.  Of course, this
is what Proudriere wants to do anyway but it seems that all the port
maintainers that use the waf build system assume if the "--job=..." argument
is not given then python waf will assume that it should be "--jobs=1" by
default.

Look at the Makefile for the devel/talloc port for example…  Note that
Poudriere defines the DISABLE_MAKE_JOB variable.

.if !defined(DISABLE_MAKE_JOBS) && !defined(MAKE_JOBS_UNSAFE)
CONFIGURE_ARGS+=        --jobs=${MAKE_JOBS_NUMBER}
_MAKE_JOBS+=            --jobs=${MAKE_JOBS_NUMBER}
.endif

Therefore, CONFIGURE_ARGS and _MAKE_JOBS never get set to “—jobs=1” and
Python waf then assumes it should be “—jobs=<number of cores>”.

Maybe it should be?...

.if !defined(DISABLE_MAKE_JOBS) && !defined(MAKE_JOBS_UNSAFE)
 CONFIGURE_ARGS+=        --jobs=${MAKE_JOBS_NUMBER}
 _MAKE_JOBS+=            --jobs=${MAKE_JOBS_NUMBER}
.else
 CONFIGURE_ARGS+=  “—jobs=1”
 _MAKE_JOBS+= “—jobs=1"
.endif

So maybe it is more like a documentation bug with waf?

Best Regards,

-stacey.



--
View this message in context: http://freebsd.1045724.n5.nabble.com/python-waf-bypasses-MAKE-JOBS-number-tp5978938p5979566.html
Sent from the freebsd-python mailing list archive at Nabble.com.


More information about the freebsd-python mailing list