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

Build error: ui/protocol/ui_grpc.pb.go: undefined: grpc.StaticMethod #1142

Open
UffeJakobsen opened this issue Jun 6, 2024 · 9 comments
Open

Comments

@UffeJakobsen
Copy link

On Archlinux I'm trying to build and install opensnitch (UI) from AUR as I've done lots of times before

I'm using latest and greatest opensnitch-git PKGBUILD from AUR:

https://aur.archlinux.org/packages/opensnitch-git

...
==> Starting build()...
go: finding module for package github.com/golang/protobuf/protoc-gen-go
go: downloading github.com/golang/protobuf v1.5.4
go: downloading google.golang.org/protobuf v1.33.0
go: finding module for package google.golang.org/grpc/cmd/protoc-gen-go-grpc
go: downloading google.golang.org/grpc v1.64.0
go: downloading google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.4.0
go: downloading google.golang.org/protobuf v1.34.1
~/.cache/yay/opensnitch-git/src/opensnitch/proto ~/.cache/yay/opensnitch-git/src/opensnitch
protoc -I. ui.proto --go_out=../daemon/ui/protocol/ --go-grpc_out=../daemon/ui/protocol/ --go_opt=paths=source_relative --go-grpc_opt=paths=source_relative
python3 -m grpc_tools.protoc -I. --python_out=../ui/opensnitch/ --grpc_python_out=../ui/opensnitch/ ui.proto
~/.cache/yay/opensnitch-git/src/opensnitch
~/.cache/yay/opensnitch-git/src/opensnitch/daemon ~/.cache/yay/opensnitch-git/src/opensnitch
go: downloading github.com/google/gopacket v1.1.19
go: downloading github.com/iovisor/gobpf v0.2.0
go: downloading github.com/varlink/go v0.4.0
go: downloading github.com/vishvananda/netlink v1.1.1-0.20220115184804-dd687eb2f2d4
go: downloading golang.org/x/sys v0.13.0
go: downloading github.com/fsnotify/fsnotify v1.4.7
go: downloading golang.org/x/net v0.17.0
go: downloading google.golang.org/grpc v1.32.0
go: downloading google.golang.org/protobuf v1.26.0
go: downloading github.com/golang/protobuf v1.5.0
go: downloading github.com/google/nftables v0.1.0
go: downloading github.com/google/uuid v1.3.0
go: downloading github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae
go: downloading google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55
go: downloading github.com/mdlayher/netlink v1.4.2
go: downloading golang.org/x/text v0.13.0
go: downloading github.com/google/go-cmp v0.5.6
go: downloading github.com/josharian/native v0.0.0-20200817173448-b6b71def0850
go: downloading github.com/mdlayher/socket v0.0.0-20211102153432-57e3fa563ecb
go: downloading honnef.co/go/tools v0.2.2
go: downloading golang.org/x/tools v0.6.0
go: downloading github.com/BurntSushi/toml v0.4.1
go: downloading golang.org/x/mod v0.8.0
go: module github.com/golang/protobuf is deprecated: Use the "google.golang.org/protobuf" module instead.
# github.com/evilsocket/opensnitch/daemon/ui/protocol
ui/protocol/ui_grpc.pb.go:19:16: undefined: grpc.SupportPackageIsVersion8
ui/protocol/ui_grpc.pb.go:49:41: undefined: grpc.StaticMethod
ui/protocol/ui_grpc.pb.go:59:41: undefined: grpc.StaticMethod
ui/protocol/ui_grpc.pb.go:69:41: undefined: grpc.StaticMethod
ui/protocol/ui_grpc.pb.go:79:41: undefined: grpc.StaticMethod
ui/protocol/ui_grpc.pb.go:111:41: undefined: grpc.StaticMethod
make: *** [Makefile:21: opensnitchd] Error 1
@MrNanook
Copy link

Same here on Manjaro Unstable (opensnitch-git on AUR).

@gustavo-iniguez-goya
Copy link
Collaborator

hey @UffeJakobsen @MrNanook ,

could you install v1.3.0 of the grpc generator , recompile the proto + daemon and see if it works?

~ $ cd opensnitch-git/
~ $ go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.3.0
~ $ cd proto/; make clean; make
~ $ cd daemon; go build -o opensnitchd .

@JCallicoat
Copy link

JCallicoat commented Jun 11, 2024

could you install v1.3.0 of the grpc generator , recompile the proto + daemon and see if it works?

I had the same problem on arch. That fixes the build for me. I added a comment on the AUR package referencing this work around.

@UffeJakobsen
Copy link
Author

The temporary workaround also works here

@gustavo-iniguez-goya
Copy link
Collaborator

hey folks,

I've realized that with latest AUR package, if the daemon starts before the GUI, it never establishes the connection. I'm not sure if this is due to generating the protobuffers with latest versions.

The connection is in IDLE state and closing the connection in this situation solves the problem. But I wanted to know if you're also having this issue.

On the other hand, is any of you filtering connections by md5 checksums? it's only available on the opensnitch-git AUR package (Preferences -> Nodes -> Rules -> [ ] Enable checksums verification), just to know if it works fine or if it causes any problem.

@UffeJakobsen
Copy link
Author

On the other hand, is any of you filtering connections by md5 checksums? it's only available on the opensnitch-git AUR package (Preferences -> Nodes -> Rules -> [ ] Enable checksums verification), just to know if it works fine or if it causes any problem.

FYI: I'm the original creator of this issue - and I have actually setup my preferences to verify md5 checksums...

@gustavo-iniguez-goya
Copy link
Collaborator

thank you for the feedback @UffeJakobsen 👍

did anyone notice the issue connecting with the GUI? does the daemon connect to the GUI as expected on your systems?

@MrNanook
Copy link

@gustavo-iniguez-goya daemon does connect with GUI as expected here (manjaro unstable).

@lsfxz
Copy link

lsfxz commented Jul 25, 2024

Just a quick question (sorry for taking so long to update the AUR opensnitch-git package btw: I just plainly forgot), as I've just been wanting to update the PKGBUILD: is it intentional that the 1.6.0 branch and master have diverged?
(If I "just keep building" with the -git package as is, it would then build from the (also recently updated) master branch, but would not "really" pull in the "real latest version" (which is usually what one would "expect" an AUR -git package to do).
I could, of course, point the PKGBUILD to use a separate branch, but that way another future branch change might get missed for a while, too.)

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

5 participants