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

not enough arguments in call to (_C2func_bcc_func_load) #1

Open
NobinPegasus opened this issue May 31, 2024 · 4 comments
Open

not enough arguments in call to (_C2func_bcc_func_load) #1

NobinPegasus opened this issue May 31, 2024 · 4 comments

Comments

@NobinPegasus
Copy link

When I try to build using
go build -o snoopy this command I find the following error:

pegasus@pegasus:~/Documents/ssl-ebpf-projects/snoopy$ go build -o snoopy
# github.com/iovisor/gobpf/bcc
../../../go/pkg/mod/github.com/iovisor/[email protected]/bcc/module.go:230:132: not enough arguments in call to (_C2func_bcc_func_load)
	have (unsafe.Pointer, _Ctype_int, *_Ctype_char, *_Ctype_struct_bpf_insn, _Ctype_int, *_Ctype_char, _Ctype_uint, _Ctype_int, *_Ctype_char, _Ctype_uint, nil)
	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)
@tks98
Copy link
Owner

tks98 commented May 31, 2024

@NobinPegasus this is most likely due to the gobpf bindings not being updated to fully support the latest version of bcc.

I installed bcc using the guide provided here: https://github.com/iovisor/bcc/blob/master/INSTALL.md#ubuntu---binary

You may need to target an older version of bcc that is compatible with gobpf v0.2.0. Here are the relevant versions that you might need:

  • gobpf version: v0.2.0
  • bcc version: 0.16.17-3.3

For reference, here is a screenshot showing the versions installed on my setup

Screenshot 2024-05-31 at 4 53 11 PM

@NobinPegasus
Copy link
Author

The iovisor build documentation is not up to date. They normally don't respond to issues. Or response very slow.
Here's my configuration:

pegasus@pegasus:~/Documents/ssl-ebpf-projects/snoopy$ uname -a
Linux pegasus 6.8.0-31-generic #31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
pegasus@pegasus:~/Documents/ssl-ebpf-projects/snoopy$ cat go.mod | grep "gobpf"
	github.com/iovisor/gobpf v0.2.0
pegasus@pegasus:~/Documents/ssl-ebpf-projects/snoopy$ dpkg -l | grep "bcc"
ii  libcc1-0:amd64                                 14-20240412-0ubuntu1                       amd64        GCC cc1 plugin for GDB

@tks98
Copy link
Owner

tks98 commented Jun 3, 2024

@NobinPegasus it doesn't look bcc-tools are installed - I'd start here and install it for your OS https://github.com/iovisor/bcc/blob/master/INSTALL.md and then see if you can compile snoopy.

@NobinPegasus
Copy link
Author

@tks98 I've the bcc-tools installed

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