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

invalid operation: signed shift count 8 (untyped int constant) requires go1.13 or later #158

Closed
thediveo opened this issue May 2, 2022 · 4 comments

Comments

@thediveo
Copy link
Contributor

thediveo commented May 2, 2022

Trying to use nftables in a Go workspace causes the following warning/error (for instance, when working with VSCode and the official go add-on):

invalid operation: signed shift count 8 (untyped int constant) requires go1.13 or later

Is there something blocking upgrading the go.mod to 1.17 or 1.18?

@stapelberg
Copy link
Collaborator

No blockers that I know of. Bumped the go.mod version to 1.17, so this should be fixed

@gustavo-iniguez-goya
Copy link
Contributor

Depending on go >= 1.16 version will add glibc >= 2.32 as dependency, which is not available on older distros (due to pthread_sigmask)

On our case, we're compiling with go1.15 to workaround this problem (we don't offer a compilation/package of opensnitch per distribution). For now we'll use nftables@76ed01e

@stapelberg
Copy link
Collaborator

Could opensnatch be built without cgo, to produce a statically linked binary without glibc dependencies?

Go 1.15 is quite old at this point. I see much better performance in Go 1.18.

@gustavo-iniguez-goya
Copy link
Contributor

No at this point, we depend on libnetfilter_queue. For now it's not a problem, unless there's an important bug fix that we'd have to apply. In such case I'll offer 2 packages, for old distros and new distros.

Just wanted to point out tht this problem exist

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

3 participants