external/nss/UnpackedTarball_nss.mk                      |    1 
 external/nss/nss-restore-manual-pre-dependencies.patch.1 |   83 +++++++++++++++
 2 files changed, 84 insertions(+)

New commits:
commit e13d8f6a5d481cab3fb450cf1244aec0f4e10e06
Author:     Jan-Marek Glogowski <glo...@fbihome.de>
AuthorDate: Thu Oct 1 12:57:53 2020 +0200
Commit:     Michael Stahl <michael.st...@cib.de>
CommitDate: Wed Oct 28 08:20:32 2020 +0100

    nss: restore manual pre-dependency build
    
    We had some seldom build failures on Windows, with errors like:
    PermissionError: [WinError 32] The process cannot access the file
    because it is being used by another process: '..../nssckmdt.h'.
    
    This happens, because of the "." / parent shell hack. Thinking
    about it again, it doesn't prevent the parent make to run in
    parallel to the "." directory make. So I tried to use a terminal
    match-all rule like
    
    ifneq (,$(filter .,$(DIRS)))
    %::
            # empty terminal rule triggered
    $(error can't happen)
    endif
    
    to stop the original parent make, but that doesn't work and the
    $(error ...) is triggered.
    
    So AFAIK I'm out of options here and have to restore the old
    manual pre-dependency build variant - still much better then no
    parallel build.
    
    An alternative idea was to put the rest of the rules.mk in the
    "else" of the terminal rule, to skip all normal rules, but this
    still leaves out all rules from the rest of the make-files,
    which might result in some hard to debug errors.
    
    This reverts my upstream patch 15608:744881490c78.
    
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103777
    Tested-by: Jenkins
    Reviewed-by: Tor Lillqvist <t...@collabora.com>
    Reviewed-by: Jan-Marek Glogowski <glo...@fbihome.de>
    (cherry picked from commit d2f9c55e065d559de903d540da28502646714a24)
    
    Change-Id: I9e2e9e1ec9f35697c7853c92f60434f514cba5ab
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104882
    Tested-by: Michael Stahl <michael.st...@cib.de>
    Reviewed-by: Michael Stahl <michael.st...@cib.de>

diff --git a/external/nss/UnpackedTarball_nss.mk 
b/external/nss/UnpackedTarball_nss.mk
index 2e6e7f80e3ee..100b32b31efe 100644
--- a/external/nss/UnpackedTarball_nss.mk
+++ b/external/nss/UnpackedTarball_nss.mk
@@ -21,6 +21,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,nss,\
     external/nss/clang-cl.patch.0 \
     external/nss/nss.vs2015.patch \
     external/nss/nss.vs2015.pdb.patch \
+    external/nss/nss-restore-manual-pre-dependencies.patch.1 \
     $(if $(filter iOS,$(OS)), \
         external/nss/nss-ios.patch) \
     $(if $(filter ANDROID,$(OS)), \
diff --git a/external/nss/nss-restore-manual-pre-dependencies.patch.1 
b/external/nss/nss-restore-manual-pre-dependencies.patch.1
new file mode 100644
index 000000000000..ebcc5b48c540
--- /dev/null
+++ b/external/nss/nss-restore-manual-pre-dependencies.patch.1
@@ -0,0 +1,83 @@
+Revert of upstream:
+
+changeset:   15608:744881490c78
+user:        Jan-Marek Glogowski <glo...@fbihome.de>
+date:        Wed May 13 19:00:40 2020 +0000
+summary:     Bug 1637083 Replace pre-dependency with shell hack r=rrelyea
+
+--- b/nss/coreconf/rules.mk    Wed May 13 19:00:40 2020 +0000
++++ a/nss/coreconf/rules.mk    Tue May 12 21:33:43 2020 +0000
+@@ -31,21 +31,10 @@
+ USE_NT_C_SYNTAX=1
+ endif
+ 
+-# For whatever reason, "." can't be handled using make conditionals.
+-# Based on automake's SUBDIRS "." handling.
+ ifdef DIRS
+ ifndef IGNORE_DIRS
+-ifneq (,$(filter .,$(DIRS)))
+-TARGETS = $(NULL)
+-ALL_TRASH = $(NULL)
+-endif
+-
+ $(DIRS):
++      $(IGNORE_ERROR)@$(MAKE) -C $@ $(MAKECMDGOALS)
+-      $(IGNORE_ERROR)@if [ "$@" != "." ]; then \
+-              $(MAKE) -C $@ $(MAKECMDGOALS) ; \
+-      else \
+-              IGNORE_DIRS=1 $(MAKE) -C $@ $(MAKECMDGOALS) ; \
+-      fi
+       @$(CLICK_STOPWATCH)
+ endif
+ endif
+@@ -84,9 +73,7 @@
+ check: $(DIRS)
+ 
+ clean clobber: $(DIRS)
+-ifneq (,$(ALL_TRASH))
+       rm -rf $(ALL_TRASH)
+-endif
+ 
+ realclean clobber_all: $(DIRS)
+       rm -rf $(wildcard *.OBJ) dist $(ALL_TRASH)
+--- b/nss/lib/ckfw/builtins/manifest.mn        Wed May 13 19:00:40 2020 +0000
++++ a/nss/lib/ckfw/builtins/manifest.mn        Tue May 12 21:33:43 2020 +0000
+@@ -5,9 +5,7 @@
+ 
+ CORE_DEPTH = ../../..
+ 
++DIRS = testlib
+-DIRS = . testlib
+-
+-testlib: .
+ 
+ MODULE = nss
+ 
+--- b/nss/lib/ckfw/manifest.mn Wed May 13 19:00:40 2020 +0000
++++ a/nss/lib/ckfw/manifest.mn Tue May 12 21:33:43 2020 +0000
+@@ -5,9 +5,7 @@
+ 
+ CORE_DEPTH = ../..
+ 
++DIRS = builtins
+-DIRS = . builtins
+-
+-builtins: .
+ 
+ PRIVATE_EXPORTS = \
+       ck.h              \
+--- b/nss/manifest.mn  Wed May 13 19:00:40 2020 +0000
++++ a/nss/manifest.mn  Tue May 12 21:33:43 2020 +0000
+@@ -23,6 +23,12 @@
+       # no real way to encode these in any sensible way
+       $(MAKE) -C coreconf/nsinstall program
+       $(MAKE) export
++      # pre-build child dir -> parent dir dependencies
++      # ckfw/builtins -> ckfw
++      IGNORE_DIRS=1 $(MAKE) -C lib/ckfw libs
++      # ckfw/builtins/testlib -> ckfw/builtins + base
++      $(MAKE) -C lib/base libs
++      IGNORE_DIRS=1 $(MAKE) -C lib/ckfw/builtins libs
+ 
+ all: prepare_build
+       $(MAKE) libs
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to