summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2019-09-17 15:37:23 +0800
committerBruce Ashfield <bruce.ashfield@gmail.com>2019-09-18 13:53:29 -0400
commitb626ea1d49590b1e275d349491d4a6c552b7f20b (patch)
tree64de93b62ed5bd911766c9a2636ab3354992e0bb
parent468a24df91232d292a3ff907085ad17c604a36c1 (diff)
downloadmeta-virtualization-b626ea1d49590b1e275d349491d4a6c552b7f20b.tar.gz
kubernetes: fix compiling failure: execvp: /bin/bash: Argument list too long
Use GNU Make 4.2.1(such as fedora-29) to build k8s in a long directory, it failed with `execvp: /bin/bash: Argument list too long' [snip] $ cd /buildarea1/hjia/wrlinux-1019/I_/suspect_/that_/if_/you_/create_/your_/project_/in_/a_/very_/deep_/directory/build_master-wr_qemux86-64_faw_2019090509/build/tmp-glibc/work/core2-64-wrs-linux/kubernetes/v1.16.0-alpha+git7054e3ead7e1a00ca6ac3ec47ea355b76061a35a-r0/kubernetes-v1.16.0-alpha+git7054e3ead7e1a00ca6ac3ec47ea355b76061a35a/src/import $ make cross KUBE_BUILD_PLATFORMS=linux/amd64 GOLDFLAGS="" |+++ [0804 16:38:32] Building go targets for linux/amd64: | ./vendor/k8s.io/code-generator/cmd/deepcopy-gen |make[1]: execvp: /bin/bash: Argument list too long |make[1]: *** [Makefile.generated_files:184: pkg/kubectl/cmd/testing/zz_generated.deepcopy.go] Error 127 |make: *** [Makefile:557: generated_files] Error 2 ... [snip] From make manual [1] $? The names of all the prerequisites that are newer than the target, with spaces between them. While two `$?' was passed to bash in a line, it caused above failure, drop a duplicated one could workaround the issue. [1] https://www.gnu.org/software/make/manual/html_node/Automatic-Variables.html Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
-rw-r--r--recipes-containers/kubernetes/kubernetes/0001-fix-compiling-failure-execvp-bin-bash-Argument-list-.patch69
-rw-r--r--recipes-containers/kubernetes/kubernetes_git.bb1
2 files changed, 70 insertions, 0 deletions
diff --git a/recipes-containers/kubernetes/kubernetes/0001-fix-compiling-failure-execvp-bin-bash-Argument-list-.patch b/recipes-containers/kubernetes/kubernetes/0001-fix-compiling-failure-execvp-bin-bash-Argument-list-.patch
new file mode 100644
index 00000000..42fd51ac
--- /dev/null
+++ b/recipes-containers/kubernetes/kubernetes/0001-fix-compiling-failure-execvp-bin-bash-Argument-list-.patch
@@ -0,0 +1,69 @@
1From dbca1bfc6ffca8a6536d91a716cb9c5e9bc2f8a0 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Tue, 17 Sep 2019 14:43:30 +0800
4Subject: [PATCH] fix compiling failure: execvp: /bin/bash: Argument list too
5 long
6
7Use GNU Make 4.2.1(such as fedora-29) to build k8s in a long directory,
8it failed with `execvp: /bin/bash: Argument list too long'
9[snip]
10$ cd /buildarea1/hjia/wrlinux-1019/I_/suspect_/that_/if_/you_/create_/your_/project_/in_/a_/very_/deep_/directory/build_master-wr_qemux86-64_faw_2019090509/build/tmp-glibc/work/core2-64-wrs-linux/kubernetes/v1.16.0-alpha+git7054e3ead7e1a00ca6ac3ec47ea355b76061a35a-r0/kubernetes-v1.16.0-alpha+git7054e3ead7e1a00ca6ac3ec47ea355b76061a35a/src/import
11$ make cross KUBE_BUILD_PLATFORMS=linux/amd64 GOLDFLAGS=""
12|+++ [0804 16:38:32] Building go targets for linux/amd64:
13| ./vendor/k8s.io/code-generator/cmd/deepcopy-gen
14|make[1]: execvp: /bin/bash: Argument list too long
15|make[1]: *** [Makefile.generated_files:184: pkg/kubectl/cmd/testing/zz_generated.deepcopy.go] Error 127
16|make: *** [Makefile:557: generated_files] Error 2
17...
18[snip]
19
20From make manual [1]
21$?
22 The names of all the prerequisites that are newer than the target, with spaces between them.
23
24While two `$?' was passed to bash in a line, it caused above failure,
25drop a duplicated one could workaround the issue.
26
27[1] https://www.gnu.org/software/make/manual/html_node/Automatic-Variables.html
28
29Upstream-Status: Submitted [https://github.com/kubernetes/kubernetes/pull/82777]
30
31Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
32---
33 src/import/build/root/Makefile.generated_files | 6 +++---
34 1 file changed, 3 insertions(+), 3 deletions(-)
35
36diff --git a/src/import/build/root/Makefile.generated_files b/src/import/build/root/Makefile.generated_files
37index 4892325..f17f1f3 100644
38--- a/src/import/build/root/Makefile.generated_files
39+++ b/src/import/build/root/Makefile.generated_files
40@@ -182,7 +182,7 @@ $(META_DIR)/$(DEEPCOPY_GEN).todo: $(DEEPCOPY_FILES)
41
42 $(DEEPCOPY_FILES): $(DEEPCOPY_GEN)
43 if [[ "$(DBG_CODEGEN)" == 1 ]]; then \
44- echo "DBG: deepcopy needed $(@D): $?"; \
45+ echo "DBG: deepcopy needed $(@D):"; \
46 ls -lf --full-time $@ $? || true; \
47 fi
48 echo $(PRJ_SRC_PATH)/$(@D) >> $(META_DIR)/$(DEEPCOPY_GEN).todo
49@@ -276,7 +276,7 @@ $(META_DIR)/$(DEFAULTER_GEN).todo: $(DEFAULTER_FILES)
50
51 $(DEFAULTER_FILES): $(DEFAULTER_GEN)
52 if [[ "$(DBG_CODEGEN)" == 1 ]]; then \
53- echo "DBG: defaulter needed $(@D): $?"; \
54+ echo "DBG: defaulter needed $(@D):"; \
55 ls -lf --full-time $@ $? || true; \
56 fi
57 echo $(PRJ_SRC_PATH)/$(@D) >> $(META_DIR)/$(DEFAULTER_GEN).todo
58@@ -380,7 +380,7 @@ $(META_DIR)/$(CONVERSION_GEN).todo: $(CONVERSION_FILES)
59
60 $(CONVERSION_FILES): $(CONVERSION_GEN)
61 if [[ "$(DBG_CODEGEN)" == 1 ]]; then \
62- echo "DBG: conversion needed $(@D): $?"; \
63+ echo "DBG: conversion needed $(@D):"; \
64 ls -lf --full-time $@ $? || true; \
65 fi
66 echo $(PRJ_SRC_PATH)/$(@D) >> $(META_DIR)/$(CONVERSION_GEN).todo
67--
682.7.4
69
diff --git a/recipes-containers/kubernetes/kubernetes_git.bb b/recipes-containers/kubernetes/kubernetes_git.bb
index cc377961..a0e0e471 100644
--- a/recipes-containers/kubernetes/kubernetes_git.bb
+++ b/recipes-containers/kubernetes/kubernetes_git.bb
@@ -11,6 +11,7 @@ SRCREV_kubernetes = "7054e3ead7e1a00ca6ac3ec47ea355b76061a35a"
11SRC_URI = "git://github.com/kubernetes/kubernetes.git;branch=master;name=kubernetes \ 11SRC_URI = "git://github.com/kubernetes/kubernetes.git;branch=master;name=kubernetes \
12 file://0001-hack-lib-golang.sh-use-CC-from-environment.patch \ 12 file://0001-hack-lib-golang.sh-use-CC-from-environment.patch \
13 file://0001-cross-don-t-build-tests-by-default.patch \ 13 file://0001-cross-don-t-build-tests-by-default.patch \
14 file://0001-fix-compiling-failure-execvp-bin-bash-Argument-list-.patch \
14 " 15 "
15 16
16DEPENDS += "rsync-native \ 17DEPENDS += "rsync-native \