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

Fails to build with current bcc #100

Closed
Vogtinator opened this issue Aug 26, 2022 · 5 comments · Fixed by #104
Closed

Fails to build with current bcc #100

Vogtinator opened this issue Aug 26, 2022 · 5 comments · Fixed by #104

Comments

@Vogtinator
Copy link

bcc added two additional parameters to bcc_func_load which aren't passed here:

[  141s] GO111MODULE=on go build -mod=vendor -mod=vendor -o bin/oci-seccomp-bpf-hook -ldflags "-X main.version=v1.2.6" github.com/containers/oci-seccomp-bpf-hook
[  141s] # github.com/iovisor/gobpf/bcc
[  141s] vendor/github.com/iovisor/gobpf/bcc/module.go:230:28: not enough arguments in call to _C2func_bcc_func_load
[  141s]        have (unsafe.Pointer, _Ctype_int, *_Ctype_char, *_Ctype_struct_bpf_insn, _Ctype_int, *_Ctype_char, _Ctype_uint, _Ctype_int, *_Ctype_char, _Ctype_uint, nil)
[  141s]        want (unsafe.Pointer, _Ctype_int, *_Ctype_char, *_Ctype_struct_bpf_insn, _Ctype_int, *_Ctype_char, _Ctype_uint, _Ctype_int, *_Ctype_char, _Ctype_uint, *_Ctype_char, _Ctype_int)
[  141s] make: *** [Makefile:49: binary] Error 2

Unfortunately it looks like gobpf is dead: iovisor/gobpf#311

@vrothberg
Copy link
Member

Thanks for reaching out, @Vogtinator!

I suggest to wait a bit more on iovisor/gobpf#311.

We may need to prioritize getting #93 done. Cc: @saschagrunert

@saschagrunert
Copy link
Member

Libbpf 1.0.0 has been released a couple of days ago which seems to be a great road to stabilization: https://github.com/libbpf/libbpf/releases/tag/v1.0.0

I think we can start working on it when aquasecurity/libbpfgo#216 got merged (and released).

@martinetd
Copy link
Contributor

the libbpfgo change has been merged but I'm not sure we can count on a release (haven't explicitly asked yet) -- would pinning against the latest commit for this repo be something to consider, or should I try to be annoying over there?
As far as I can see we're already using arbitrary commits for seccomp and runtime-spec

@vrothberg
Copy link
Member

Thanks for the ping! I am OK vendoring a non-release commit.

martinetd added a commit to martinetd/oci-seccomp-bpf-hook that referenced this issue Oct 11, 2022
bcc v0.25.0 broke compatibility with bcc_func_load and requires updating
the gobpf wrapper.

Fixes: containers#100
Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
@martinetd
Copy link
Contributor

Thanks, opened #104 with gobpf version bump!

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

Successfully merging a pull request may close this issue.

4 participants