Repository navigation
Closed
Description
Description
Compiling Cli 23.0.0 failed with the following error :
.go_work/build/src/github.com/docker/cli/cli/compose/schema/schema.go:62:12: pattern data/config_schema_v*.json: no matching files found
Full log :
( cd /home/username/works/openwrt/build_dir/target-x86_64_glibc_custom/docker-23.0.0; GOOS="linux" GOARCH="amd64" GO386="" GOAMD64="v1" GOARM="" GOMIPS="" GOMIPS64="" GOPPC64="" CGO_ENABLED=1 CC="ccache_cc" CXX="ccache_cxx" CGO_CFLAGS="-mtune=tigerlake -march=tigerlake -O3 -funsafe-math-optimizations -ftree-vectorize -fno-caller-saves -fno-plt -mtune=tigerlake -march=tigerlake -O3 -funsafe-math-optimizations -ftree-vectorize -fhonour-copts -fmacro-prefix-map=/home/username/works/openwrt/build_dir/target-x86_64_glibc_custom/docker-23.0.0=docker-23.0.0 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro" CGO_CPPFLAGS="-I/home/username/works/openwrt/staging_dir/toolchain-x86_64_gcc-12.2.0_glibc/usr/include -I/home/username/works/openwrt/staging_dir/toolchain-x86_64_gcc-12.2.0_glibc/include" CGO_CXXFLAGS="-mtune=tigerlake -march=tigerlake -O3 -funsafe-math-optimizations -ftree-vectorize -fno-caller-saves -fno-plt -mtune=tigerlake -march=tigerlake -O3 -funsafe-math-optimizations -ftree-vectorize -fhonour-copts -fmacro-prefix-map=/home/username/works/openwrt/build_dir/target-x86_64_glibc_custom/docker-23.0.0=docker-23.0.0 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro" CGO_LDFLAGS="-L/home/username/works/openwrt/staging_dir/toolchain-x86_64_gcc-12.2.0_glibc/usr/lib -L/home/username/works/openwrt/staging_dir/toolchain-x86_64_gcc-12.2.0_glibc/lib -znow -zrelro -lc -lgcc_eh" GOPATH="/home/username/works/openwrt/build_dir/target-x86_64_glibc_custom/docker-23.0.0/.go_work/build" GOCACHE="/home/username/works/openwrt/tmp/go-build" GOMODCACHE="/home/username/works/openwrt/dl/go-mod-cache" GOENV=off GO111MODULE=auto GITCOMMIT=e92dd87 GO_LINKMODE=static VERSION=23.0.0 ./scripts/build/binary; )
Building static docker-linux-amd64
+ go build -o build/docker-linux-amd64 -tags osusergo pkcs11 -ldflags -X "github.com/docker/cli/cli/version.GitCommit=e92dd87" -X "github.com/docker/cli/cli/version.BuildTime=2023-02-03T08:38:11Z" -X "github.com/docker/cli/cli/version.Version=23.0.0" -extldflags -static -buildmode=pie github.com/docker/cli/cmd/docker
.go_work/build/src/github.com/docker/cli/cli/compose/schema/schema.go:62:12: pattern data/config_schema_v*.json: no matching files found
make[2]: *** [Makefile:76: /home/username/works/openwrt/build_dir/target-x86_64_glibc_custom/docker-23.0.0/.built] Error 1
make[2]: Leaving directory '/home/username/works/openwrt/feeds/packages/utils/docker'
time: package/feeds/packages/docker/compile#11.08#4.83#17.00
ERROR: package/feeds/packages/docker failed to build.
make[1]: *** [package/Makefile:116: package/feeds/packages/docker/compile] Error 1
make[1]: Leaving directory '/home/username/works/openwrt'
make: *** [/home/username/works/openwrt/include/toplevel.mk:231: package/docker/compile] Error 2
Reproduce
Compiling docker cli 23.0.0 on OpenWrt
Expected behavior
No response
docker version
Nonedocker info
NoneAdditional Info
No response
Activity
trippleflux commentedon Feb 3, 2023
Using back esc is working fine, the patch :
001-schema-fix.patch
thaJeztah commentedon Feb 4, 2023
What version of Go is this on?
trippleflux commentedon Feb 5, 2023
@thaJeztah
Version 1.19.5
thaJeztah commentedon Feb 6, 2023
Is the source located in GOPATH? (this project currently does not yet provide a go.mod)?
Trying to reproduce in a fresh environment in a container (I'm setting
CGO_ENABLED=0related to #3494 (comment), but it worked without as well);docker run -it --rm golang:1.19.5-bullseye git clone https://github.com/docker/cli /go/src/github.com/docker/cli cd /go/src/github.com/docker/cli git checkout v23.0.0 DISABLE_WARN_OUTSIDE_CONTAINER=1 CGO_ENABLED=0 make binary ./build/docker-linux-arm64 --version Docker version 23.0.0, build e92dd87c32trippleflux commentedon Feb 9, 2023
Hmm, I am building docker 23.0.0 for OpenWrt targeted x86_64, the docker makefile is located here, also I am not a go lang programmer so not quite sure on how proceed with your request.
thaJeztah commentedon Feb 28, 2023
I suspect the issue is either in
Build/Prepare/Defaultbeing called; don't know what that does)go envas part of that makefile for debugging)I tried some steps in a fresh environment (running on a
golang:1.19container), and ran some steps similar to what that script calls (but that's without the additional scripts that it may be calling), and in that situation things built;Download and extract the tar;
curl -o docker.tgz https://codeload.github.com/docker/cli/tar.gz/v23.0.1 mkdir -p /go/src/github.com/docker/cli tar -C /go/src/github.com/docker/cli --strip-components 1 -xvzf docker.tgz cd src/github.com/docker/cli/After that;
./build/docker --version Docker version v23.0.1, build a5ee5b1dfc9b8f08ed9e020bb54fc18550173ef6 ./build/docker version Client: Version: v23.0.1 API version: 1.42 Go version: go1.19.6 Git commit: a5ee5b1dfc9b8f08ed9e020bb54fc18550173ef6 Built: Tue Feb 28 12:20:29 2023 OS/Arch: linux/amd64 Context: default Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?The above steps were for v23.0.1, but also tried on v23.0.0, downloading the tar-ball from the same location as the script does.
So from the above, I don't think there's a bug in this repository, but possibly in the OpenWRT scripts to build the binaries, and I'd recommend opening a ticket with the OpenWRT project to see if they can help.
I'm closing the ticket here, but feel free to continue the conversation