image-automation-controller icon indicating copy to clipboard operation
image-automation-controller copied to clipboard

Facing issue during "make docker-build" for v0.26.0

Open samarth96 opened this issue 2 years ago • 2 comments

i did following steps

git clone https://github.com/fluxcd/image-automation-controller -b v0.26.0 export DOCKER_CLI_EXPERIMENTAL=enabled docker run --rm --privileged multiarch/qemu-user-static --reset -p yes docker buildx create --use make docker-build

I am getting following error

=> [linux/amd64->arm/v7 build 8/9] RUN export PKG_CONFIG_PATH="/usr/local/$(xx-info triple)/lib/pkgconfig" && export CGO_LDFLAGS="$(pkg-config --static --libs --cflags libgit2) -static -fuse-
=> => # Package libgit2 was not found in the pkg-config search path.
=> => # Perhaps you should add the directory containing `libgit2.pc'
=> => # to the PKG_CONFIG_PATH environment variable
=> => # Package 'libgit2', required by 'virtual:world', not found

I tried to add libgit2 and libgit2-dev in Dockerfile But I get below error

[linux/amd64->arm/v7 build 8/9] RUN export PKG_CONFIG_PATH="/usr/local/$(xx-info triple)/lib/pkgconfig" && export CGO_LDFLAGS="$(pkg-config --static --libs --cflags libgit2) -static -fuse-ld=lld" && xx-go build -ldflags "-s -w" -tags 'netgo,osusergo,static_build' -o /source-controller -trimpath main.go;: #0 308.1 # github.com/libgit2/git2go/v33 #0 308.1 /go/pkg/mod/github.com/fluxcd/git2go/[email protected]/Build_system_dynamic.go:12:3: error: "Invalid libgit2 version; this git2go supports libgit2 between v1.3.0 and v1.3.0" #0 308.1 # error "Invalid libgit2 version; this git2go supports libgit2 between v1.3.0 and v1.3.0" #0 308.1 ^ #0 308.1 1 error generated.

samarth96 avatar Jan 02 '23 12:01 samarth96