From fcc09c8c3639ca5c529d4f28db9b1d090331739f Mon Sep 17 00:00:00 2001 From: Bruce Ashfield Date: Thu, 19 Apr 2018 16:49:41 -0400 Subject: runc/containerd: fix build with go 1.9.x go 1.9.x was triggering linkage errors on some build hosts due to missing symbols. | tmp/work/core2-64-poky-linux/runc-docker/1.0.0-rc5+gitAUTOINC+4fc53a81fb-r0/recipe-sysroot/usr/lib/../lib/libc.a(dl-reloc-static-pie.o): In function `elf_mac: | /usr/src/debug/glibc/2.27-r0/git/sysdeps/x86_64/dl-machine.h:59: undefined reference to `_DYNAMIC' | tmp/work/core2-64-poky-linux/runc-docker/1.0.0-rc5+gitAUTOINC+4fc53a81fb-r0/recipe-sysroot/usr/lib/../lib/libc.a(dl-reloc-static-pie.o): In function `elf_get: | /usr/src/debug/glibc/2.27-r0/git/elf/get-dynamic-info.h:48: undefined reference to `_DYNAMIC' By ensuring that our sysroot provided go binary and build flags make it into the build enviroment we can build properly with 1.9 and 1.10 Signed-off-by: Bruce Ashfield --- .../0001-Disable-building-recvtty.patch | 23 ------------------ ...1-build-drop-recvtty-and-use-GOBUILDFLAGS.patch | 27 ++++++++++++++++++++++ recipes-containers/runc/runc-docker_git.bb | 2 +- recipes-containers/runc/runc.inc | 2 +- 4 files changed, 29 insertions(+), 25 deletions(-) delete mode 100644 recipes-containers/runc/runc-docker/0001-Disable-building-recvtty.patch create mode 100644 recipes-containers/runc/runc-docker/0001-build-drop-recvtty-and-use-GOBUILDFLAGS.patch (limited to 'recipes-containers/runc') diff --git a/recipes-containers/runc/runc-docker/0001-Disable-building-recvtty.patch b/recipes-containers/runc/runc-docker/0001-Disable-building-recvtty.patch deleted file mode 100644 index 8de1b170..00000000 --- a/recipes-containers/runc/runc-docker/0001-Disable-building-recvtty.patch +++ /dev/null @@ -1,23 +0,0 @@ -From aa2fc7b0eacba61175f083cc8d8adc233bcd0575 Mon Sep 17 00:00:00 2001 -From: Paul Barker -Date: Thu, 12 Oct 2017 11:34:24 +0000 -Subject: [PATCH] Disable building recvtty - -Signed-off-by: Paul Barker -Upstream-status: Inappropriate ---- - Makefile | 1 - - 1 file changed, 1 deletion(-) - -Index: git/src/import/Makefile -=================================================================== ---- git.orig/src/import/Makefile -+++ git/src/import/Makefile -@@ -40,7 +40,6 @@ - - static: $(SOURCES) - CGO_ENABLED=1 $(GO) build $(EXTRA_FLAGS) -tags "$(BUILDTAGS) netgo cgo static_build" -installsuffix netgo -ldflags "-w -extldflags -static -X main.gitCommit=${COMMIT} -X main.version=${VERSION} $(EXTRA_LDFLAGS)" -o runc . -- CGO_ENABLED=1 $(GO) build $(EXTRA_FLAGS) -tags "$(BUILDTAGS) netgo cgo static_build" -installsuffix netgo -ldflags "-w -extldflags -static -X main.gitCommit=${COMMIT} -X main.version=${VERSION} $(EXTRA_LDFLAGS)" -o contrib/cmd/recvtty/recvtty ./contrib/cmd/recvtty - - release: - script/release.sh -r release/$(VERSION) -v $(VERSION) diff --git a/recipes-containers/runc/runc-docker/0001-build-drop-recvtty-and-use-GOBUILDFLAGS.patch b/recipes-containers/runc/runc-docker/0001-build-drop-recvtty-and-use-GOBUILDFLAGS.patch new file mode 100644 index 00000000..f885aaf7 --- /dev/null +++ b/recipes-containers/runc/runc-docker/0001-build-drop-recvtty-and-use-GOBUILDFLAGS.patch @@ -0,0 +1,27 @@ +From a9a2b9e72027d0b2357f6dfe8b154762aaa8dd02 Mon Sep 17 00:00:00 2001 +From: Bruce Ashfield +Date: Thu, 19 Apr 2018 16:39:41 -0400 +Subject: [PATCH] build: drop recvtty and use GOBUILDFLAGS + +Signed-off-by: Bruce Ashfield +--- + Makefile | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/src/import/Makefile b/src/import/Makefile +index c6de11d..0e9bddb 100644 +--- a/src/import/Makefile ++++ b/src/import/Makefile +@@ -39,8 +39,7 @@ contrib/cmd/recvtty/recvtty: $(SOURCES) + $(GO) build -buildmode=pie $(EXTRA_FLAGS) -ldflags "-X main.gitCommit=${COMMIT} -X main.version=${VERSION} $(EXTRA_LDFLAGS)" -tags "$(BUILDTAGS)" -o contrib/cmd/recvtty/recvtty ./contrib/cmd/recvtty + + static: $(SOURCES) +- CGO_ENABLED=1 $(GO) build $(EXTRA_FLAGS) -tags "$(BUILDTAGS) netgo cgo static_build" -installsuffix netgo -ldflags "-w -extldflags -static -X main.gitCommit=${COMMIT} -X main.version=${VERSION} $(EXTRA_LDFLAGS)" -o runc . +- CGO_ENABLED=1 $(GO) build $(EXTRA_FLAGS) -tags "$(BUILDTAGS) netgo cgo static_build" -installsuffix netgo -ldflags "-w -extldflags -static -X main.gitCommit=${COMMIT} -X main.version=${VERSION} $(EXTRA_LDFLAGS)" -o contrib/cmd/recvtty/recvtty ./contrib/cmd/recvtty ++ CGO_ENABLED=1 $(GO) build -tags "$(BUILDTAGS) netgo cgo static_build" -installsuffix netgo -ldflags "-w -extldflags -static -X main.gitCommit=${COMMIT} -X main.version=${VERSION} $(EXTRA_LDFLAGS)" $(GOBUILDFLAGS) -o runc . + + release: + script/release.sh -r release/$(VERSION) -v $(VERSION) +-- +2.7.4 + diff --git a/recipes-containers/runc/runc-docker_git.bb b/recipes-containers/runc/runc-docker_git.bb index 9acfbae4..81e5a5d4 100644 --- a/recipes-containers/runc/runc-docker_git.bb +++ b/recipes-containers/runc/runc-docker_git.bb @@ -5,7 +5,7 @@ include runc.inc SRCREV_runc-docker = "4fc53a81fb7c994640722ac585fa9ca548971871" SRC_URI = "git://github.com/opencontainers/runc;nobranch=1;name=runc-docker \ file://0001-runc-Add-console-socket-dev-null.patch \ - file://0001-Disable-building-recvtty.patch \ + file://0001-build-drop-recvtty-and-use-GOBUILDFLAGS.patch \ file://0001-runc-docker-SIGUSR1-daemonize.patch \ " diff --git a/recipes-containers/runc/runc.inc b/recipes-containers/runc/runc.inc index ec017225..9199cef9 100644 --- a/recipes-containers/runc/runc.inc +++ b/recipes-containers/runc/runc.inc @@ -51,7 +51,7 @@ do_compile() { export CFLAGS="" export LDFLAGS="" - oe_runmake static + oe_runmake static } do_install() { -- cgit v1.2.3-54-g00ecf