aboutsummaryrefslogtreecommitdiffstats
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:51 -0400
commitcddd676f401427182b6f7e4d7bfe4de4f5f00017 (patch)
treeb79637834bf4ce2572194ce42f9aba785d51bbe9
parent0642784cb137466460a79da9e86f9958089ea2f6 (diff)
downloadmeta-virtualization-cddd676f401427182b6f7e4d7bfe4de4f5f00017.tar.gz
meta-virtualization-cddd676f401427182b6f7e4d7bfe4de4f5f00017.tar.bz2
meta-virtualization-cddd676f401427182b6f7e4d7bfe4de4f5f00017.zip
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 395694a..89c5980 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=''"
do_compile() {
export GOARCH="${TARGET_GOARCH}"
export GOPATH="${WORKDIR}/git/"
- export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go"
+ export GOROOT="${STAGING_LIBDIR}/go"
# Pass the needed cflags/ldflags so that cgo
# can find the needed headers files and libraries
export CGO_ENABLED="1"
export CFLAGS=""
export LDFLAGS=""
- export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
+ export CGO_CFLAGS="${TARGET_CFLAGS}"
export GO_GCFLAGS=""
- export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
+ export CGO_LDFLAGS="${TARGET_LDFLAGS}"
export GO111MODULE=off
cd ${S}