So dpb has been using MAKE_JOBS for a while, and landry said it would be
cool to actually have it work with regular builds as well.
This patch:
- admits that parallel make is going to be used;
- renames PARALLEL_BUILD to something that reflects its actual usage
(and consumers as well): PARALLEL_USES_MAKE
- adds a PARALLEL_MAKE_JOBS that allows the user to tweak the number
of MAKE_JOBS used if they want (set to hw.ncpuonline)
The names are somewhat straightforward, though not particularly inspired,
so I'm game for suggestions.
The logic itself is also possibly improvable...
Index: infrastructure/mk/bsd.port.mk
===================================================================
RCS file: /cvs/ports/infrastructure/mk/bsd.port.mk,v
retrieving revision 1.1505
diff -u -p -r1.1505 bsd.port.mk
--- infrastructure/mk/bsd.port.mk 26 Nov 2019 11:49:02 -0000 1.1505
+++ infrastructure/mk/bsd.port.mk 1 Dec 2019 10:26:58 -0000
@@ -454,19 +454,23 @@ ALL_FAKE_FLAGS= ${MAKE_FLAGS:N-j[0-9]*}
_PKG_ADD += -L ${LOCALBASE}
.endif
-# XXX this stuff is not production-ready, because there are too many bugs in
-# parallel make yet. MAKE_JOBS>1 is known to work on a few ports and used
-# sparingly by dpb (DPB_PROPERTIES=parallel) for obvious gains.
+# XXX there are still many bugs in parallel make.
+# so MAKE_JOBS is used sparingly by dpb for obvious gains.
#
-PARALLEL_BUILD ?= Yes
-PARALLEL_INSTALL ?= ${PARALLEL_BUILD}
+PARALLEL_USES_MAKE ?= Yes
+
+.if !defined(MAKE_JOBS) && ${DPB_PROPERTIES:Mparallel})
+. if defined(PARALLEL_MAKE_JOBS)
+MAKE_JOBS = ${PARALLEL_MAKE_JOBS}
+. else
+MAKE_JOBS !!= sysctl -n hw.ncpuonline
+. endif
+.endif
MAKE_JOBS ?= 1
.if ${MAKE_JOBS} != 1
-. if ${PARALLEL_BUILD:L} == "yes"
+. if ${PARALLEL_USES_MAKE:L} == "yes"
MAKE_FLAGS += -j${MAKE_JOBS}
-. endif
-. if ${PARALLEL_INSTALL:L} == "yes"
ALL_FAKE_FLAGS += -j${MAKE_JOBS}
. endif
.endif
Index: editors/libreoffice/Makefile
===================================================================
RCS file: /cvs/ports/editors/libreoffice/Makefile,v
retrieving revision 1.221
diff -u -p -r1.221 Makefile
--- editors/libreoffice/Makefile 6 Nov 2019 12:21:06 -0000 1.221
+++ editors/libreoffice/Makefile 1 Dec 2019 10:26:58 -0000
@@ -354,11 +354,11 @@ CONFIGURE_ARGS+=--without-java
.endif
# XXX libreoffice has its own way to build things in parallel
-PARALLEL_BUILD = No
+PARALLEL_USES_MAKE = No
.if defined(MAKE_JOBS)
NCPU= ${MAKE_JOBS}
.elif ${FLAVOR:Mparallel}
-NCPU!= echo $$((`sysctl -n hw.ncpuonline` + 1))
+NCPU!!= echo $$((`sysctl -n hw.ncpuonline` + 1))
.else
NCPU= 1
.endif
Index: devel/jdk/1.8/Makefile
===================================================================
RCS file: /cvs/ports/devel/jdk/1.8/Makefile,v
retrieving revision 1.48
diff -u -p -r1.48 Makefile
--- devel/jdk/1.8/Makefile 21 Nov 2019 17:39:08 -0000 1.48
+++ devel/jdk/1.8/Makefile 1 Dec 2019 10:26:58 -0000
@@ -84,7 +84,7 @@ USE_GMAKE= Yes
GMAKE= ${LOCALBASE}/bin/gmake
# Don't call make -jN, instead pass MAKE_JOBS to --with-jobs
-PARALLEL_BUILD= No
+PARALLEL_USES_MAKE= No
CONFIGURE_STYLE=gnu
CONFIGURE_ARGS= --disable-option-checking \
Index: devel/jdk/11/Makefile
===================================================================
RCS file: /cvs/ports/devel/jdk/11/Makefile,v
retrieving revision 1.11
diff -u -p -r1.11 Makefile
--- devel/jdk/11/Makefile 26 Oct 2019 17:04:15 -0000 1.11
+++ devel/jdk/11/Makefile 1 Dec 2019 10:26:58 -0000
@@ -84,7 +84,7 @@ USE_GMAKE= Yes
GMAKE= ${LOCALBASE}/bin/gmake
# Don't call make -jN, instead pass MAKE_JOBS to --with-jobs
-PARALLEL_BUILD= No
+PARALLEL_USES_MAKE= No
CONFIGURE_STYLE=gnu
CONFIGURE_ENV+= AUTOCONF_VERSION=${AUTOCONF_VERSION} \
Sunday, December 01, 2019
Fails to build devel/spidermonkey60 on mips64el/loongson
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCAAdFiEEiKQfd6o81mjI+LWALell7WOCXJMFAl3jkocACgkQLell7WOC
XJMtig/+OggtocpKDOwL4l7eufh3OQ6+jeitpOORVGW/0h4gLZBT5c0KoWQsNk+r
scDdY6F115QEuy5G9EGglqse7JCXslglQokJTieO/Aer2wJuLpcxU5AfojkpPGh1
wRUygto+0Re0ODpl7c47UGuY86eYu2YhWIrUFp5nNjUBQ6S0nVvr7kSMryRcqea+
P+OHrEuaQdHUDJqM2ObD2B1qMVsd9XtiT8rGFKTf8CyIrrbk2cqVO7AWfvlwLvA7
Ftz4dz/EZQfrrFTzPCs+eV4dpocAppldnk78+nF1KAGrlfq+5m8hlxH/X61lIfQ3
3HbpFGW29Wu7u2cfvHweik8QVzeVw+v2UDZD/EUvtEIDbvhZoV91kV/NWQQW6jrw
Mwfeows8SylazoXoMZh/TL6CT3IV+oVAhd4omIZcPv6HoN+AEuu6fDGVPts9tCmX
VimLa3iSLTimH/Efck6cwNlx5kqoeSYL8Cy4rQo8PJOcpr2yX7S5Vme1+MYUG4CZ
5aGPnX6iwxjufk0sdDYDz1XnbbzTp78CQ91aFtll+LphztA4rUri75blMYNy+b6H
kbZZFynngLsS5c01DUmRsRx4Scl/uD7cXGr3GnpXXgcM2fgMbs9bvN/6DENGrl3H
wNkR1zVz7sLo62f1wi3hJ+2nNhWGGJjiTjRezi2Eql5AqrvuGD0=
=BzMD
-----END PGP SIGNATURE-----
Hi Ports maintainers,
I'm having trouble to get devel/spidermonkey60 to build on mips64el.
The initial problem was the following error:
------8<------
usr/ports/pobj/spidermonkey-60.8.0/firefox-60.8.0/js/src/jit/mips64/LIR-mips64.h:17:45:
error: no matching function for call to 'js::jit::LInstructionHelper<1,
1, 0>::LInstructionHelper()'
explicit LUnbox(const LAllocation& input) { setOperand(0, input); }
------8<------
It turned out that JIT was not well supported on MIPS as suggested in
the Debian bug[1], and the solution is to disable JIT on MIPS[2]. I
added it to the configure args and get passed this issue. Probably this
patch[7] should be applied.
However the second issue is more complicated. The error message is the
following:
------8<------
/usr/ports/pobj/spidermonkey-60.8.0/firefox-60.8.0/js/src/wasm/WasmSignalHandlers.cpp:101:26:
error: 'ucontext_t' {aka 'struct sigcontext'} has no member named
'sc_rsp'; did you mean 'sc_mask'?
#define RSP_sig(p) ((p)->sc_rsp)
^~~~~~
/usr/ports/pobj/spidermonkey-60.8.0/firefox-60.8.0/js/src/wasm/WasmSignalHandlers.cpp:450:19:
note: in expansion of macro 'RSP_sig'
#define SP_sig(p) RSP_sig(p)
^~~~~~~
/usr/ports/pobj/spidermonkey-60.8.0/firefox-60.8.0/js/src/wasm/WasmSignalHandlers.cpp:481:37:
note: in expansion of macro 'SP_sig'
return reinterpret_cast<uint8_t*>(SP_sig(context));
^~~~~~
In file included from
/usr/ports/pobj/spidermonkey-60.8.0/firefox-60.8.0/js/src/js/src/Unified_cpp_js_src41.cpp:2:
/usr/ports/pobj/spidermonkey-60.8.0/firefox-60.8.0/js/src/wasm/WasmSignalHandlers.cpp:
In function 'uint8_t* ContextToLR(ucontext_t*)':
/usr/ports/pobj/spidermonkey-60.8.0/firefox-60.8.0/js/src/wasm/WasmSignalHandlers.cpp:451:19:
error: 'R31_sig' was not declared in this scope
#define LR_sig(p) R31_sig(p)
------8<------
It seems that some members are missing from "struct sigcontext". The
relevant code from Firefox can be found at [3], which assumes some
members are available on OpenBSD. However, it turns out they are
available for some archs (e.g. AMD64[4]), but it's not for MIPS64[5].
The latest version of Firefox provides a more fine-grained check of
symbols for OpenBSD archs[6] but still assumes some symbols to be
available for all archs which are missing in MIPS64. And I'm not sure
about how this can be handled properly.
On the other hand, I think this target is dragged in as an indirect
dependency of Emacs because I think it needs gjs and WASM may not be
required. Is there a way to disable compiling the WASM part?
[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=908486
[2]
https://salsa.debian.org/gnome-team/mozjs60/blob/debian/master/debian/rules#L42
[3]
https://hg.mozilla.org/mozilla-central/file/e33efdb3e1517d521deb949de3fcd6d9946ea440/js/src/wasm/WasmSignalHandlers.cpp#l103
[4]
https://github.com/openbsd/src/blob/b66614995ab119f75167daaa7755b34001836821/sys/arch/amd64/include/signal.h#L54
[5]
https://github.com/openbsd/src/blob/b66614995ab119f75167daaa7755b34001836821/sys/arch/mips64/include/signal.h#L56
[6]
https://hg.mozilla.org/mozilla-central/file/8504d70d827261346737af1cbe9b96acf6756b6d/js/src/wasm/WasmSignalHandlers.cpp#l80
[7] Patch for disabling JIT on MIPS* archs:
Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/spidermonkey60/Makefile,v
retrieving revision 1.12
diff -u -p -r1.12 Makefile
--- Makefile 26 Sep 2019 13:00:21 -0000 1.12
+++ Makefile 1 Dec 2019 10:12:07 -0000
@@ -78,6 +78,12 @@ CONFIGURE_ARGS = --disable-debug \
# /usr/bin/ld.lld: error: undefined symbol:
std::__1::basic_ostream<char, std::__1::char_traits<char>
>::operator<<(unsigned long long)
CONFIGURE_ARGS += --disable-js-shell
+# Build failure on mips64{,el}. Related bug on Debian:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=908486
+# error: no matching function for call to
'js::jit::LInstructionHelper<1, 1, 0>::LInstructionHelper()'
+.if ${MACHINE_ARCH} == "mips64" || ${MACHINE_ARCH} == "mips64el"
+CONFIGURE_ARGS += --disable-ion
+.endif
+
SO_VERSION = ${LIBmozjs-${MOZILLA_VERSION}_VERSION}
SUBST_VARS += SO_VERSION
cvs server: Diffing patches
cvs server: Diffing pkg
iQIzBAEBCAAdFiEEiKQfd6o81mjI+LWALell7WOCXJMFAl3jkocACgkQLell7WOC
XJMtig/+OggtocpKDOwL4l7eufh3OQ6+jeitpOORVGW/0h4gLZBT5c0KoWQsNk+r
scDdY6F115QEuy5G9EGglqse7JCXslglQokJTieO/Aer2wJuLpcxU5AfojkpPGh1
wRUygto+0Re0ODpl7c47UGuY86eYu2YhWIrUFp5nNjUBQ6S0nVvr7kSMryRcqea+
P+OHrEuaQdHUDJqM2ObD2B1qMVsd9XtiT8rGFKTf8CyIrrbk2cqVO7AWfvlwLvA7
Ftz4dz/EZQfrrFTzPCs+eV4dpocAppldnk78+nF1KAGrlfq+5m8hlxH/X61lIfQ3
3HbpFGW29Wu7u2cfvHweik8QVzeVw+v2UDZD/EUvtEIDbvhZoV91kV/NWQQW6jrw
Mwfeows8SylazoXoMZh/TL6CT3IV+oVAhd4omIZcPv6HoN+AEuu6fDGVPts9tCmX
VimLa3iSLTimH/Efck6cwNlx5kqoeSYL8Cy4rQo8PJOcpr2yX7S5Vme1+MYUG4CZ
5aGPnX6iwxjufk0sdDYDz1XnbbzTp78CQ91aFtll+LphztA4rUri75blMYNy+b6H
kbZZFynngLsS5c01DUmRsRx4Scl/uD7cXGr3GnpXXgcM2fgMbs9bvN/6DENGrl3H
wNkR1zVz7sLo62f1wi3hJ+2nNhWGGJjiTjRezi2Eql5AqrvuGD0=
=BzMD
-----END PGP SIGNATURE-----
Hi Ports maintainers,
I'm having trouble to get devel/spidermonkey60 to build on mips64el.
The initial problem was the following error:
------8<------
usr/ports/pobj/spidermonkey-60.8.0/firefox-60.8.0/js/src/jit/mips64/LIR-mips64.h:17:45:
error: no matching function for call to 'js::jit::LInstructionHelper<1,
1, 0>::LInstructionHelper()'
explicit LUnbox(const LAllocation& input) { setOperand(0, input); }
------8<------
It turned out that JIT was not well supported on MIPS as suggested in
the Debian bug[1], and the solution is to disable JIT on MIPS[2]. I
added it to the configure args and get passed this issue. Probably this
patch[7] should be applied.
However the second issue is more complicated. The error message is the
following:
------8<------
/usr/ports/pobj/spidermonkey-60.8.0/firefox-60.8.0/js/src/wasm/WasmSignalHandlers.cpp:101:26:
error: 'ucontext_t' {aka 'struct sigcontext'} has no member named
'sc_rsp'; did you mean 'sc_mask'?
#define RSP_sig(p) ((p)->sc_rsp)
^~~~~~
/usr/ports/pobj/spidermonkey-60.8.0/firefox-60.8.0/js/src/wasm/WasmSignalHandlers.cpp:450:19:
note: in expansion of macro 'RSP_sig'
#define SP_sig(p) RSP_sig(p)
^~~~~~~
/usr/ports/pobj/spidermonkey-60.8.0/firefox-60.8.0/js/src/wasm/WasmSignalHandlers.cpp:481:37:
note: in expansion of macro 'SP_sig'
return reinterpret_cast<uint8_t*>(SP_sig(context));
^~~~~~
In file included from
/usr/ports/pobj/spidermonkey-60.8.0/firefox-60.8.0/js/src/js/src/Unified_cpp_js_src41.cpp:2:
/usr/ports/pobj/spidermonkey-60.8.0/firefox-60.8.0/js/src/wasm/WasmSignalHandlers.cpp:
In function 'uint8_t* ContextToLR(ucontext_t*)':
/usr/ports/pobj/spidermonkey-60.8.0/firefox-60.8.0/js/src/wasm/WasmSignalHandlers.cpp:451:19:
error: 'R31_sig' was not declared in this scope
#define LR_sig(p) R31_sig(p)
------8<------
It seems that some members are missing from "struct sigcontext". The
relevant code from Firefox can be found at [3], which assumes some
members are available on OpenBSD. However, it turns out they are
available for some archs (e.g. AMD64[4]), but it's not for MIPS64[5].
The latest version of Firefox provides a more fine-grained check of
symbols for OpenBSD archs[6] but still assumes some symbols to be
available for all archs which are missing in MIPS64. And I'm not sure
about how this can be handled properly.
On the other hand, I think this target is dragged in as an indirect
dependency of Emacs because I think it needs gjs and WASM may not be
required. Is there a way to disable compiling the WASM part?
[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=908486
[2]
https://salsa.debian.org/gnome-team/mozjs60/blob/debian/master/debian/rules#L42
[3]
https://hg.mozilla.org/mozilla-central/file/e33efdb3e1517d521deb949de3fcd6d9946ea440/js/src/wasm/WasmSignalHandlers.cpp#l103
[4]
https://github.com/openbsd/src/blob/b66614995ab119f75167daaa7755b34001836821/sys/arch/amd64/include/signal.h#L54
[5]
https://github.com/openbsd/src/blob/b66614995ab119f75167daaa7755b34001836821/sys/arch/mips64/include/signal.h#L56
[6]
https://hg.mozilla.org/mozilla-central/file/8504d70d827261346737af1cbe9b96acf6756b6d/js/src/wasm/WasmSignalHandlers.cpp#l80
[7] Patch for disabling JIT on MIPS* archs:
Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/spidermonkey60/Makefile,v
retrieving revision 1.12
diff -u -p -r1.12 Makefile
--- Makefile 26 Sep 2019 13:00:21 -0000 1.12
+++ Makefile 1 Dec 2019 10:12:07 -0000
@@ -78,6 +78,12 @@ CONFIGURE_ARGS = --disable-debug \
# /usr/bin/ld.lld: error: undefined symbol:
std::__1::basic_ostream<char, std::__1::char_traits<char>
>::operator<<(unsigned long long)
CONFIGURE_ARGS += --disable-js-shell
+# Build failure on mips64{,el}. Related bug on Debian:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=908486
+# error: no matching function for call to
'js::jit::LInstructionHelper<1, 1, 0>::LInstructionHelper()'
+.if ${MACHINE_ARCH} == "mips64" || ${MACHINE_ARCH} == "mips64el"
+CONFIGURE_ARGS += --disable-ion
+.endif
+
SO_VERSION = ${LIBmozjs-${MOZILLA_VERSION}_VERSION}
SUBST_VARS += SO_VERSION
cvs server: Diffing patches
cvs server: Diffing pkg
Subscribe to:
Posts (Atom)