17.11.2013 12:32, Szymon Acedański:
>When running with CONFIG_PKG_BUILD_USE_JOBSERVER=y (which is the
>default), PKG_JOBS is defined as '--jobserver-fds=2,3 -j'. This
>way bjam gets the '-j' option, which is invalid (a number of
>jobs should follow).
>
>This patch fixes this by not passing '-j' at all if
>CONFIG_PKG_BUILD_USE_JOBSERVER=y.
>
>Tested this change myself with CONFIG_PKG_BUILD_USE_JOBSERVER=y
>and with CONFIG_PKG_BUILD_USE_JOBSERVER=n, running with 'make -j6'
>and observing top. Also tested with CONFIG_PKG_BUILD_PARALLEL=n
>and 'make'.
>

I had the same error during a parallel build and can confirm that the
patch fixes parallel build related errors.

I've found a related bugreport at boost's trac 
https://svn.boost.org/trac/boost/ticket/3388.
Obviously conclusion: bjam can not use a make jobserver.

Since the patch is mangled in patchwork, I send a fixed version inline.

Signed-off-by: Szymon Acedański <[email protected]> 
Tested-by: Mathias Kresin <[email protected]>
---

diff --git a/libs/boost/Makefile b/libs/boost/Makefile
index 832fc57..5804231 100644
--- a/libs/boost/Makefile
+++ b/libs/boost/Makefile
@@ -184,6 +184,13 @@ endef
 CONFIGURE_PREFIX:=$(PKG_INSTALL_DIR)
 TARGET_LDFLAGS += -pthread -lrt
 
+BJAM_JOBS := $(filter -j%,$(PKG_JOBS))
+# Do not try to extract the number of parallel jobs to run if the main
+# Makefile uses the jobserver, which is not supported by bjam.
+ifeq ($(BJAM_JOBS),-j)
+       BJAM_JOBS :=
+endif
+
 define Build/Compile
        +( cd $(PKG_BUILD_DIR) ; \
                echo "using gcc : $(ARCH) : $(GNU_TARGET_NAME)-gcc : 
<compileflags>\"$(TARGET_CFLAGS)\" <cxxflags>\"$(TARGET_CXXFLAGS)\" 
<linkflags>\"$(TARGET_LDFLAGS)\" ;" > tools/build/v2/user-config.jam ; \
@@ -193,7 +200,7 @@ define Build/Compile
                ) \
                bjam \
                        '-sBUILD=release <optimization>space <inlining>on 
<debug-symbols>off' \
-                       $(filter -j%,$(PKG_JOBS)) \
+                       $(BJAM_JOBS) \
                        --toolset=gcc-$(ARCH) --build-type=minimal 
--layout=system \
                        --disable-long-double \
                        $(CONFIGURE_ARGS) \
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to