Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Facing issue during "make docker-build" for v0.30.0 #995

Open
samarth96 opened this issue Jan 2, 2023 · 1 comment
Open

Facing issue during "make docker-build" for v0.30.0 #995

samarth96 opened this issue Jan 2, 2023 · 1 comment

Comments

@samarth96
Copy link

samarth96 commented Jan 2, 2023

i did following steps

git clone https://github.com/fluxcd/source-controller.git -b v0.33.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-l
=> => # 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/v33@v33.0.9-flux/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.

@kingdonb
Copy link
Member

kingdonb commented Jan 6, 2023

The libgit2 should not be required anymore, since Flux v0.37. In recent versions, it should be removed altogether.

The subject of the post says v0.30.0 but this report appears to be about the latest version, v0.33.0

I tried to build using the same steps you did, and I did not get as far. Mine bombed out with an exec format error, (I think I need to go and re-read the build instructions...)

Anyway, I don't have the solution, but I wanted to let you know that re-adding libgit2 should not be necessary at all. It seems likely to me that you have some version mismatch in your checkout, or some other explanation for the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants