summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2022-06-12 01:00:02 -0700
committerBruce Ashfield <bruce.ashfield@gmail.com>2022-06-20 12:09:46 -0400
commit1a312f283e9570b69010d025523ca99759cae48e (patch)
tree4c42f4d342412a33c2687f0551203c95767ba6f2
parent9c8e3597f70ff453f302c5b54cd8bc5ad85dd2c9 (diff)
downloadmeta-virtualization-1a312f283e9570b69010d025523ca99759cae48e.tar.gz
docker-distribution: fix build error on new hosts
Fix settings for GOROOT, CGO_CFLAGS and CGO_LDFLAGS. The previous setting for GOROOT is no longer valid as the directory does not exist for now. So adjust the GOROOT setting. Currently CGO_CFLAGS is set to use BUILDSDK_CFLAGS, and this is incorrect. We need target flags instead of SDK related flags. Such setting happens to work for some hosts. However, when building on newer hosts, we get QA error like below: ERROR: docker-distribution-v2.7.1-r0 do_package_qa: QA Issue: /usr/sbin/registry contained in package docker-registry requires libc.so.6(GLIBC_2.34)(64bit), but no providers found in RDEPENDS_docker-registry? [file-rdeps] The above error was found on hardknott on host Fedora 35. Tracking down the error and I found it's using host stuff which is likely to be caused by using incorrect CGO_CFLAGS. As the master branch is using the same settings, it has the same issue. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
-rw-r--r--recipes-containers/docker-distribution/docker-distribution_git.bb6
1 files changed, 3 insertions, 3 deletions
diff --git a/recipes-containers/docker-distribution/docker-distribution_git.bb b/recipes-containers/docker-distribution/docker-distribution_git.bb
index 395694aa..89c59802 100644
--- a/recipes-containers/docker-distribution/docker-distribution_git.bb
+++ b/recipes-containers/docker-distribution/docker-distribution_git.bb
@@ -25,15 +25,15 @@ EXTRA_OEMAKE="BUILDTAGS=''"
25do_compile() { 25do_compile() {
26 export GOARCH="${TARGET_GOARCH}" 26 export GOARCH="${TARGET_GOARCH}"
27 export GOPATH="${WORKDIR}/git/" 27 export GOPATH="${WORKDIR}/git/"
28 export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go" 28 export GOROOT="${STAGING_LIBDIR}/go"
29 # Pass the needed cflags/ldflags so that cgo 29 # Pass the needed cflags/ldflags so that cgo
30 # can find the needed headers files and libraries 30 # can find the needed headers files and libraries
31 export CGO_ENABLED="1" 31 export CGO_ENABLED="1"
32 export CFLAGS="" 32 export CFLAGS=""
33 export LDFLAGS="" 33 export LDFLAGS=""
34 export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}" 34 export CGO_CFLAGS="${TARGET_CFLAGS}"
35 export GO_GCFLAGS="" 35 export GO_GCFLAGS=""
36 export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}" 36 export CGO_LDFLAGS="${TARGET_LDFLAGS}"
37 export GO111MODULE=off 37 export GO111MODULE=off
38 38
39 cd ${S} 39 cd ${S}