-
Notifications
You must be signed in to change notification settings - Fork 819
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
Build fails when vendoring #832
Comments
Hey, Welcome to this repo, Congratulations on opening your issue. Keep Contributing to KubescapeWe'll try to review and add you work as soon as possible and a maintainer will get back to you soon! |
@vladklokun I too got similar error message while |
@vladklokun In |
@dwertent shall I work on this ! |
@Meyazhagan can i work with you man? |
Hey @vladklokun and @Meyazhagan, make: *** [Makefile:25: build] Error 2 To get the context and more details, I tried the following: $ make
git submodule update --init --recursive
cd git2go; make install-static
make[1]: Entering directory '/home/tejas/Projects/Kubescape/kubescape/git2go'
go install --tags "static" ./...
make[1]: Leaving directory '/home/tejas/Projects/Kubescape/kubescape/git2go'
go build -v -tags="gitenabled,static" .
github.com/libgit2/git2go/v33
# pkg-config --cflags --static -- /home/tejas/Projects/Kubescape/kubescape/vendor/github.com/libgit2/git2go/v33/static-build/install/lib/pkgconfig/libgit2.pc
Package vendor/github.com/libgit2/git2go/v33/static-build/install/lib/pkgconfig/libgit2.pc was not found in the pkg-config search path.
Perhaps you should add the directory containing `/home/tejas/Projects/Kubescape/kubescape/vendor/github.com/libgit2/git2go/v33/static-build/install/lib/pkgconfig/libgit2.pc.pc'
to the PKG_CONFIG_PATH environment variable
Package '/home/tejas/Projects/Kubescape/kubescape/vendor/github.com/libgit2/git2go/v33/static-build/install/lib/pkgconfig/libgit2.pc', required by 'virtual:world', not found
pkg-config: exit status 1
make: *** [Makefile:25: build] Error 2 I think there is some issue with git2go in the dependencies, i.e., in the I am interested in working on this issue. How should I proceed further? |
@0xt3j4s Hi! Please feel free to pick up any issues, especially if you see no activity inside them for a prolonged period of time. Regarding your question, I would suggest you start by understanding why
Should As an aside, Next, I would take a look at our All in all, this is might be a rabbit hole that would require you to understand how we fetch and link against Good luck! |
Sure, I'll try to figure out why |
Resolved in release v3.0.4 |
Describe the bug
When vendoring dependencies, building Kubescape fails because pkg-config cannot find built
git2go
artifacts.pkg-config
cannot find the artifacts because it is looking for them in the wrong directory: thevendor
directory instead of thegit2go
directory.Environment
OS: Ubuntu 22.04 LTS
Version: current Git master. Kubescape version is irrelevant, since it is unable to build.
Steps To Reproduce
Steps to reproduce the behavior:
make libgit2
go mod vendor
make build
Expected behavior
The build system is able to build the Kubescape executable and put it in the working directory.
Actual Behavior
The build system fails with an error:
Additional context
I’ve run into this while I was trying to change the code of an upstream module—
opa-utils
. I wanted to change upstream code and adjust Kubescape accordingly.While this use case is better served by using Go workspaces, as I have discovered later, I think that vendoring modules should not break the build process.
A workaround that helped me with vendoring before I moved on to Go workspaces was:
make libgit2
go mod vendor
libgit2
directory to thevendor
directory:cp -r ./git2go ./vendor/github.com/kubescape/libgit2/git2go/v33
make build
The text was updated successfully, but these errors were encountered: