Skip to contentSkip to conversation

go: add back 1.12 version to avoid compilation failure

PATCH Superseded Chen Qi 2 participants 5 messages Dec 6, 2019 – Dec 9, 2019 1 message not in the archive

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Chen Qi

author
#0 lore raw

PATCH 1/2 go: add back 1.12 version to avoid compilation failure

go 1.12 was removed from oe-core, but currently k8s cannot be built successfully with go 1.13. See link below.

https://github.com/kubernetes/kubernetes/issues/82531

We need to wait for k8s to support go 1.13 and update it to latest release, as well as its depedencies. Before this is done, add back go 1.12 and use it.

---
 recipes-containers/kubernetes/go-1.12.inc     |  24 ++
 ...ow-CC-and-CXX-to-have-multiple-words.patch |  31 ++
 ...o1.12-security-net-textproto-don-t-n.patch | 163 ++++++++++
 ...ent-based-hash-generation-less-pedan.patch | 218 ++++++++++++++
 ...-to-be-overridden-in-the-environment.patch |  48 +++
 ...4-ld-add-soname-to-shareable-objects.patch |  45 +++
 ...de-CC-when-building-dist-and-go_boot.patch |  37 +++
 ...dist-separate-host-and-target-builds.patch | 282 ++++++++++++++++++
 ...d-go-make-GOROOT-precious-by-default.patch | 106 +++++++
 ...008-use-GOBUILDMODE-to-set-buildmode.patch |  37 +++
 ...place-glibc-dynamic-linker-with-musl.patch | 112 +++++++
 recipes-containers/kubernetes/go-common.inc   |  32 ++
 .../kubernetes/go-cross-canadian.inc          |  66 ++++
 .../kubernetes/go-cross-canadian_1.12.bb      |   2 +
 recipes-containers/kubernetes/go-cross.inc    |  62 ++++
 .../kubernetes/go-cross_1.12.bb               |   2 +
 recipes-containers/kubernetes/go-crosssdk.inc |  50 ++++
 .../kubernetes/go-crosssdk_1.12.bb            |   2 +
 recipes-containers/kubernetes/go-native.inc   |  55 ++++
 .../kubernetes/go-native_1.12.bb              |   2 +
 recipes-containers/kubernetes/go-runtime.inc  |  96 ++++++
 .../kubernetes/go-runtime_1.12.bb             |   2 +
 recipes-containers/kubernetes/go-target.inc   |  54 ++++
 recipes-containers/kubernetes/go_1.12.bb      |  14 +
 24 files changed, 1542 insertions(+)
 create mode 100644 recipes-containers/kubernetes/go-1.12.inc
 create mode 100644 recipes-containers/kubernetes/go-1.12/0001-allow-CC-and-CXX-to-have-multiple-words.patch
 create mode 100644 recipes-containers/kubernetes/go-1.12/0001-release-branch.go1.12-security-net-textproto-don-t-n.patch
 create mode 100644 recipes-containers/kubernetes/go-1.12/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch
 create mode 100644 recipes-containers/kubernetes/go-1.12/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch
 create mode 100644 recipes-containers/kubernetes/go-1.12/0004-ld-add-soname-to-shareable-objects.patch
 create mode 100644 recipes-containers/kubernetes/go-1.12/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch
 create mode 100644 recipes-containers/kubernetes/go-1.12/0006-cmd-dist-separate-host-and-target-builds.patch
 create mode 100644 recipes-containers/kubernetes/go-1.12/0007-cmd-go-make-GOROOT-precious-by-default.patch
 create mode 100644 recipes-containers/kubernetes/go-1.12/0008-use-GOBUILDMODE-to-set-buildmode.patch
 create mode 100644 recipes-containers/kubernetes/go-1.12/0009-ld-replace-glibc-dynamic-linker-with-musl.patch
 create mode 100644 recipes-containers/kubernetes/go-common.inc
 create mode 100644 recipes-containers/kubernetes/go-cross-canadian.inc
 create mode 100644 recipes-containers/kubernetes/go-cross-canadian_1.12.bb
 create mode 100644 recipes-containers/kubernetes/go-cross.inc
 create mode 100644 recipes-containers/kubernetes/go-cross_1.12.bb
 create mode 100644 recipes-containers/kubernetes/go-crosssdk.inc
 create mode 100644 recipes-containers/kubernetes/go-crosssdk_1.12.bb
 create mode 100644 recipes-containers/kubernetes/go-native.inc
 create mode 100644 recipes-containers/kubernetes/go-native_1.12.bb
 create mode 100644 recipes-containers/kubernetes/go-runtime.inc
 create mode 100644 recipes-containers/kubernetes/go-runtime_1.12.bb
 create mode 100644 recipes-containers/kubernetes/go-target.inc
 create mode 100644 recipes-containers/kubernetes/go_1.12.bb
recipes-containers/kubernetes/go-1.12.inc new file +24 -0
new file mode 100644
index 0000000..ed14b17
@@ -0,0 +1,24 @@
+require go-common.inc
+
+GO_BASEVERSION = "1.12"
+GO_MINOR = ".9"
+PV .= "${GO_MINOR}"
+FILESEXTRAPATHS_prepend := "${FILE_DIRNAME}/go-${GO_BASEVERSION}:"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707"
+
+SRC_URI += "\
+    file://0001-allow-CC-and-CXX-to-have-multiple-words.patch \
+    file://0002-cmd-go-make-content-based-hash-generation-less-pedan.patch \
+    file://0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch \
+    file://0004-ld-add-soname-to-shareable-objects.patch \
+    file://0005-make.bash-override-CC-when-building-dist-and-go_boot.patch \
+    file://0006-cmd-dist-separate-host-and-target-builds.patch \
+    file://0007-cmd-go-make-GOROOT-precious-by-default.patch \
+    file://0008-use-GOBUILDMODE-to-set-buildmode.patch \
+    file://0001-release-branch.go1.12-security-net-textproto-don-t-n.patch \
+"
+SRC_URI_append_libc-musl = " file://0009-ld-replace-glibc-dynamic-linker-with-musl.patch"
+
+SRC_URI[main.md5sum] = "6132109d4050da349eadc9f7b0304ef4"
+SRC_URI[main.sha256sum] = "ab0e56ed9c4732a653ed22e232652709afbf573e710f56a07f7fdeca578d62fc"
recipes-containers/kubernetes/go-1.12/0001-allow-CC-and-CXX-to-have-multiple-words.patch new file +31 -0
new file mode 100644
index 0000000..4442858
@@ -0,0 +1,31 @@
+From 7cc519aa5f84cf8fc7ac8c10fc69aa8040330ea0 Mon Sep 17 00:00:00 2001
+From: Matt Madison <[email protected]>
+Date: Mon, 19 Feb 2018 08:49:33 -0800
+Subject: [PATCH] allow CC and CXX to have multiple words
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Matt Madison <[email protected]>
+
+---
+ src/cmd/go/internal/envcmd/env.go | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/cmd/go/internal/envcmd/env.go b/src/cmd/go/internal/envcmd/env.go
+index afadbad..cedbfbf 100644
+--- a/src/cmd/go/internal/envcmd/env.go
++++ b/src/cmd/go/internal/envcmd/env.go
+@@ -85,11 +85,11 @@ func MkEnv() []cfg.EnvVar {
+ 
+ 	cc := cfg.DefaultCC(cfg.Goos, cfg.Goarch)
+ 	if env := strings.Fields(os.Getenv("CC")); len(env) > 0 {
+-		cc = env[0]
++		cc = strings.Join(env, " ")
+ 	}
+ 	cxx := cfg.DefaultCXX(cfg.Goos, cfg.Goarch)
+ 	if env := strings.Fields(os.Getenv("CXX")); len(env) > 0 {
+-		cxx = env[0]
++		cxx = strings.Join(env, " ")
+ 	}
+ 	env = append(env, cfg.EnvVar{Name: "CC", Value: cc})
+ 	env = append(env, cfg.EnvVar{Name: "CXX", Value: cxx})
recipes-containers/kubernetes/go-1.12/0001-release-branch.go1.12-security-net-textproto-don-t-n.patch new file +163 -0

163 lines not on this page · raw message

recipes-containers/kubernetes/go-1.12/0002-cmd-go-make-content-based-hash-generation-less-pedan.patch new file +218 -0

218 lines not on this page · raw message

recipes-containers/kubernetes/go-1.12/0003-allow-GOTOOLDIR-to-be-overridden-in-the-environment.patch new file +48 -0

48 lines not on this page · raw message

recipes-containers/kubernetes/go-1.12/0004-ld-add-soname-to-shareable-objects.patch new file +45 -0

45 lines not on this page · raw message

recipes-containers/kubernetes/go-1.12/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch new file +37 -0
new file mode 100644
index 0000000..ace8de9
@@ -0,0 +1,37 @@
+From 1bf15aa8fb773604b2524cfdab493fa4d8fa9285 Mon Sep 17 00:00:00 2001
+From: Matt Madison <[email protected]>
+Date: Sat, 17 Feb 2018 06:32:45 -0800
+Subject: [PATCH] make.bash: override CC when building dist and go_bootstrap
+
+for handling OE cross-canadian builds.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Matt Madison <[email protected]>
+
+---
+ src/make.bash | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/make.bash b/src/make.bash
+index 78882d9..25943d0 100755
+--- a/src/make.bash
++++ b/src/make.bash
+@@ -163,7 +163,7 @@ if [ "$GOROOT_BOOTSTRAP" = "$GOROOT" ]; then
+ 	exit 1
+ fi
+ rm -f cmd/dist/dist
+-GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist
++CC="${BUILD_CC:-${CC}}" GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist
+ 
+ # -e doesn't propagate out of eval, so check success by hand.
+ eval $(./cmd/dist/dist env -p || echo FAIL=true)
+@@ -194,7 +194,7 @@ fi
+ # Run dist bootstrap to complete make.bash.
+ # Bootstrap installs a proper cmd/dist, built with the new toolchain.
+ # Throw ours, built with Go 1.4, away after bootstrap.
+-./cmd/dist/dist bootstrap $buildall $vflag $GO_DISTFLAGS "$@"
++CC="${BUILD_CC:-${CC}}" ./cmd/dist/dist bootstrap $buildall $vflag $GO_DISTFLAGS "$@"
+ rm -f ./cmd/dist/dist
+ 
+ # DO NOT ADD ANY NEW CODE HERE.
recipes-containers/kubernetes/go-1.12/0006-cmd-dist-separate-host-and-target-builds.patch new file +282 -0

282 lines not on this page · raw message

recipes-containers/kubernetes/go-1.12/0007-cmd-go-make-GOROOT-precious-by-default.patch new file +106 -0

106 lines not on this page · raw message

recipes-containers/kubernetes/go-1.12/0008-use-GOBUILDMODE-to-set-buildmode.patch new file +37 -0
new file mode 100644
index 0000000..225cf43
@@ -0,0 +1,37 @@
+From 0e0c247f0caec23528889ff09d98348cba9028f1 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <[email protected]>
+Date: Fri, 26 Oct 2018 15:02:32 +0800
+Subject: [PATCH] use GOBUILDMODE to set buildmode
+
+While building go itself, the go build system does not support
+to set `-buildmode=pie' from environment.
+
+Add GOBUILDMODE to support it which make PIE executables the default
+build mode, as PIE executables are required as of Yocto
+
+Refers: https://groups.google.com/forum/#!topic/golang-dev/gRCe5URKewI
+Upstream-Status: Denied [upstream choose antoher solution: `17a256b
+cmd/go: -buildmode=pie for android/arm']
+
+Signed-off-by: Hongxu Jia <[email protected]>
+---
+ src/cmd/go/internal/work/build.go | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+Index: go/src/cmd/go/internal/work/build.go
+===================================================================
+--- go.orig/src/cmd/go/internal/work/build.go
++++ go/src/cmd/go/internal/work/build.go
+@@ -223,7 +223,11 @@ func AddBuildFlags(cmd *base.Command) {
+ 
+ 	cmd.Flag.Var(&load.BuildAsmflags, "asmflags", "")
+ 	cmd.Flag.Var(buildCompiler{}, "compiler", "")
+-	cmd.Flag.StringVar(&cfg.BuildBuildmode, "buildmode", "default", "")
++	if bm := os.Getenv("GOBUILDMODE"); bm != "" {
++		cmd.Flag.StringVar(&cfg.BuildBuildmode, "buildmode", bm, "")
++	} else {
++		cmd.Flag.StringVar(&cfg.BuildBuildmode, "buildmode", "default", "")
++	}
+ 	cmd.Flag.Var(&load.BuildGcflags, "gcflags", "")
+ 	cmd.Flag.Var(&load.BuildGccgoflags, "gccgoflags", "")
+ 	cmd.Flag.StringVar(&cfg.BuildMod, "mod", "", "")
recipes-containers/kubernetes/go-1.12/0009-ld-replace-glibc-dynamic-linker-with-musl.patch new file +112 -0

112 lines not on this page · raw message

recipes-containers/kubernetes/go-common.inc new file +32 -0
new file mode 100644
index 0000000..93a3d3b
@@ -0,0 +1,32 @@
+SUMMARY = "Go programming language compiler"
+DESCRIPTION = " The Go programming language is an open source project to make \
+ programmers more productive. Go is expressive, concise, clean, and\
+ efficient. Its concurrency mechanisms make it easy to write programs\
+ that get the most out of multicore and networked machines, while its\
+ novel type system enables flexible and modular program construction.\
+ Go compiles quickly to machine code yet has the convenience of\
+ garbage collection and the power of run-time reflection. It's a\
+ fast, statically typed, compiled language that feels like a\
+ dynamically typed, interpreted language."
+
+HOMEPAGE = " http://golang.org/"
+LICENSE = "BSD-3-Clause"
+
+inherit goarch
+
+SRC_URI = "http://golang.org/dl/go${PV}.src.tar.gz;name=main"
+S = "${WORKDIR}/go"
+B = "${S}"
+UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.src\.tar"
+
+INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
+SSTATE_SCAN_CMD = "true"
+
+export GOROOT_OVERRIDE = "1"
+export GOTMPDIR ?= "${WORKDIR}/go-tmp"
+GOTMPDIR[vardepvalue] = ""
+export CGO_ENABLED = "1"
+
+do_compile_prepend() {
+	BUILD_CC=${BUILD_CC}
+}
recipes-containers/kubernetes/go-cross-canadian.inc new file +66 -0

66 lines not on this page · raw message

recipes-containers/kubernetes/go-cross-canadian_1.12.bb new file +2 -0
new file mode 100644
index 0000000..7ac9449
@@ -0,0 +1,2 @@
+require go-cross-canadian.inc
+require go-${PV}.inc
recipes-containers/kubernetes/go-cross.inc new file +62 -0

62 lines not on this page · raw message

recipes-containers/kubernetes/go-cross_1.12.bb new file +2 -0
new file mode 100644
index 0000000..80b5a03
@@ -0,0 +1,2 @@
+require go-cross.inc
+require go-${PV}.inc
recipes-containers/kubernetes/go-crosssdk.inc new file +50 -0

50 lines not on this page · raw message

recipes-containers/kubernetes/go-crosssdk_1.12.bb new file +2 -0
new file mode 100644
index 0000000..1857c8a
@@ -0,0 +1,2 @@
+require go-crosssdk.inc
+require go-${PV}.inc
recipes-containers/kubernetes/go-native.inc new file +55 -0

55 lines not on this page · raw message

recipes-containers/kubernetes/go-native_1.12.bb new file +2 -0
new file mode 100644
index 0000000..bbf3c0d
@@ -0,0 +1,2 @@
+require ${PN}.inc
+require go-${PV}.inc
recipes-containers/kubernetes/go-runtime.inc new file +96 -0

96 lines not on this page · raw message

recipes-containers/kubernetes/go-runtime_1.12.bb new file +2 -0
new file mode 100644
index 0000000..43b68b4
@@ -0,0 +1,2 @@
+require go-${PV}.inc
+require go-runtime.inc
recipes-containers/kubernetes/go-target.inc new file +54 -0

54 lines not on this page · raw message

recipes-containers/kubernetes/go_1.12.bb new file +14 -0
new file mode 100644
index 0000000..42cdb04
@@ -0,0 +1,14 @@
+require go-${PV}.inc
+require go-target.inc
+
+export GOBUILDMODE=""
+
+# Add pie to GOBUILDMODE to satisfy "textrel" QA checking, but mips
+# doesn't support -buildmode=pie, so skip the QA checking for mips and its
+# variants.
+python() {
+    if 'mips' in d.getVar('TARGET_ARCH'):
+        d.appendVar('INSANE_SKIP_%s' % d.getVar('PN'), " textrel")
+    else:
+        d.setVar('GOBUILDMODE', 'pie')
+}
Signature · 1 line
2.17.1
author
#1 lore raw

PATCH 2/2 layer.conf: use go 1.12 version

kubernetes could not be built correctly with go 1.13. Use 1.12 version in layer.conf.

---
 conf/layer.conf | 4 ++++
 1 file changed, 4 insertions(+)
conf/layer.conf +4 -0
index dfca6da..2d008bb 100644
@@ -41,3 +41,7 @@ PREFERRED_PROVIDER_virtual/docker ?= "docker-ce"
 INHERIT += "sanity-meta-virt"
 
 require ${@bb.utils.contains('DISTRO_FEATURES', 'virtualization', 'meta-virt-default-versions.inc', '', d)}
+
+# Use go 1.12 to avoid k8s build failure.
+# Remove this after https://github.com/kubernetes/kubernetes/issues/82531 is resolved and k8s is updated to a working version.
+GOVERSION = "1.12%"
Signature · 1 line
2.17.1
#2 lore raw

Re: [meta-virtualization][PATCH 2/2] layer.conf: use go 1.12 version

Quoted 3 lines · Chen Qi

kubernetes could not be built correctly with go 1.13. Use 1.12 version in layer.conf.

We unfortunately can't set the version of GO like this, since it would impact someone that simply includes meta-virt in their layers.

I see two options for this:

- create a k8s distro feature and only set the go version when it is
enabled .. or we re-use the virtualization distro feature (which is a better idea)
- put the preferred GO version into the meta-virt .inc file that is
included when virtualization is in distro features

Although, I recall someone saying that the .inc wasn't working properly and isn't actually triggering .. I found the email from Mark hatle that describes the problem. If you check the list archives for the subject: "[meta-virtualization] conf/layer.conf is broken". You'll find a description of the problem.

The fix for that, is to make the .inc work like the one in meta-cube:
https://github.com/WindRiver-OpenSourceLabs/meta-overc/blob/wr-10.19-20190121/meta-cube/conf/layer.conf

The .inc is the best solution, and this is a good opportunity to fix it (it hasn't been working correctly for some time now). I'll try and make those changes today, and follow up later with the results.

Bruce

Quoted 29 lines
---
 conf/layer.conf | 4 ++++
 1 file changed, 4 insertions(+)
conf/layer.conf +4 -1
index dfca6da..2d008bb 100644
@@ -41,3 +41,7 @@ PREFERRED_PROVIDER_virtual/docker ?= "docker-ce"
 INHERIT += "sanity-meta-virt"
 
 require ${@bb.utils.contains('DISTRO_FEATURES', 'virtualization', 'meta-virt-default-versions.inc', '', d)}
+
+# Use go 1.12 to avoid k8s build failure.
+# Remove this after https://github.com/kubernetes/kubernetes/issues/82531 is resolved and k8s is updated to a working version.
+GOVERSION = "1.12%"
--

2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#4829): https://lists.yoctoproject.org/g/meta-virtualization/message/4829
Mute This Topic: https://lists.yoctoproject.org/mt/67394161/1050810
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw

Re: [meta-virtualization][PATCH 2/2] layer.conf: use go 1.12 version

Quoted 23 lines · Bruce Ashfield via Lists.Yoctoproject.Org
Quoted 3 lines · Chen Qi

kubernetes could not be built correctly with go 1.13. Use 1.12 version in layer.conf.

We unfortunately can't set the version of GO like this, since it would impact someone that simply includes meta-virt in their layers.

I see two options for this:

- create a k8s distro feature and only set the go version when it is
enabled .. or we re-use the virtualization distro feature (which is a better idea)
- put the preferred GO version into the meta-virt .inc file that is
included when virtualization is in distro features

Although, I recall someone saying that the .inc wasn't working properly and isn't actually triggering .. I found the email from Mark hatle that describes the problem. If you check the list archives for the subject: "[meta-virtualization] conf/layer.conf is broken". You'll find a description of the problem.

Quoted 6 lines

The fix for that, is to make the .inc work like the one in meta-cube:
https://github.com/WindRiver-OpenSourceLabs/meta-overc/blob/wr-10.19-20190121/meta-cube/conf/layer.conf

The .inc is the best solution, and this is a good opportunity to fix it (it hasn't been working correctly for some time now). I'll try and make those changes today, and follow up later with the results.

FYI: I fixed the conditional include and pushed the commit to master [conf: fix meta-virt version / config include], so we can now use the .inc to set the go version.

Bruce

Quoted 48 lines

Bruce

Quoted 21 lines
---
 conf/layer.conf | 4 ++++
 1 file changed, 4 insertions(+)
conf/layer.conf +4 -1
index dfca6da..2d008bb 100644
@@ -41,3 +41,7 @@ PREFERRED_PROVIDER_virtual/docker ?= "docker-ce"
 INHERIT += "sanity-meta-virt"
 
 require ${@bb.utils.contains('DISTRO_FEATURES', 'virtualization', 'meta-virt-default-versions.inc', '', d)}
+
+# Use go 1.12 to avoid k8s build failure.
+# Remove this after https://github.com/kubernetes/kubernetes/issues/82531 is resolved and k8s is updated to a working version.
+GOVERSION = "1.12%"
--

2.17.1

Quoted 8 lines

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#4829): https://lists.yoctoproject.org/g/meta-virtualization/message/4829
Mute This Topic: https://lists.yoctoproject.org/mt/67394161/1050810
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#4831): https://lists.yoctoproject.org/g/meta-virtualization/message/4831
Mute This Topic: https://lists.yoctoproject.org/mt/67394161/1050810
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
author
#5 lore raw

Re: [meta-virtualization][PATCH 2/2] layer.conf: use go 1.12 version

Quoted 26 lines · Bruce Ashfield
Quoted 23 lines · Bruce Ashfield via Lists.Yoctoproject.Org
Quoted 2 lines · Chen Qi

kubernetes could not be built correctly with go 1.13. Use 1.12 version in layer.conf.

We unfortunately can't set the version of GO like this, since it would impact someone that simply includes meta-virt in their layers.

I see two options for this:

- create a k8s distro feature and only set the go version when it is
enabled .. or we re-use the virtualization distro feature (which is a better idea)
- put the preferred GO version into the meta-virt .inc file that is
included when virtualization is in distro features

Although, I recall someone saying that the .inc wasn't working properly and isn't actually triggering .. I found the email from Mark hatle that describes the problem. If you check the list archives for the subject: "[meta-virtualization] conf/layer.conf is broken". You'll find a description of the problem.

The fix for that, is to make the .inc work like the one in meta-cube:
https://github.com/WindRiver-OpenSourceLabs/meta-overc/blob/wr-10.19-20190121/meta-cube/conf/layer.conf

Quoted 8 lines
Quoted 3 lines

The .inc is the best solution, and this is a good opportunity to fix it (it hasn't been working correctly for some time now). I'll try and make those changes today, and follow up later with the results.

FYI: I fixed the conditional include and pushed the commit to master [conf: fix meta-virt version / config include], so we can now use the .inc to set the go version.

Bruce

Thanks! I'll send out V2.

Regards,
Chen Qi

Quoted 47 lines
Quoted 45 lines

Bruce

Quoted 20 lines
---
  conf/layer.conf | 4 ++++
  1 file changed, 4 insertions(+)
conf/layer.conf +4 -1
index dfca6da..2d008bb 100644
@@ -41,3 +41,7 @@ PREFERRED_PROVIDER_virtual/docker ?= "docker-ce"
  INHERIT += "sanity-meta-virt"
 
  require ${@bb.utils.contains('DISTRO_FEATURES', 'virtualization', 'meta-virt-default-versions.inc', '', d)}
+
+# Use go 1.12 to avoid k8s build failure.
+# Remove this after https://github.com/kubernetes/kubernetes/issues/82531 is resolved and k8s is updated to a working version.
+GOVERSION = "1.12%"
--

2.17.1

Quoted 8 lines

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#4829): https://lists.yoctoproject.org/g/meta-virtualization/message/4829
Mute This Topic: https://lists.yoctoproject.org/mt/67394161/1050810
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#4831): https://lists.yoctoproject.org/g/meta-virtualization/message/4831
Mute This Topic: https://lists.yoctoproject.org/mt/67394161/1050810
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-