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

Getting flags undefined errors. #357

Open
bbhikkaji opened this issue Jun 12, 2018 · 7 comments
Open

Getting flags undefined errors. #357

bbhikkaji opened this issue Jun 12, 2018 · 7 comments

Comments

@bbhikkaji
Copy link

Was trying to play with it but go get gives following errors

go get github.com/vishvananda/netlink

github.com/vishvananda/netlink

vishvananda/netlink/bridge_linux.go:22:27: undefined: unix.IFLA_EXT_MASK
vishvananda/netlink/bridge_linux.go:38:9: undefined: unix.IFLA_AF_SPEC
vishvananda/netlink/bridge_linux.go:90:21: undefined: unix.IFLA_AF_SPEC
vishvananda/netlink/link_linux.go:424:23: undefined: unix.IFLA_VFINFO_LIST
vishvananda/netlink/link_linux.go:454:23: undefined: unix.IFLA_VFINFO_LIST
vishvananda/netlink/link_linux.go:484:23: undefined: unix.IFLA_VFINFO_LIST
vishvananda/netlink/link_linux.go:515:23: undefined: unix.IFLA_VFINFO_LIST
vishvananda/netlink/link_linux.go:549:23: undefined: unix.IFLA_VFINFO_LIST
vishvananda/netlink/link_linux.go:596:23: undefined: unix.IFLA_VFINFO_LIST
vishvananda/netlink/link_linux.go:720:23: undefined: unix.IFLA_NET_NS_FD
vishvananda/netlink/link_linux.go:720:23: too many errors

@jellonek
Copy link
Contributor

Which version of golang are you using? These constants are defined in https://github.com/golang/sys/blob/master/unix/linux/types.go

@bbhikkaji
Copy link
Author

i am using 1.6.2

go version go1.6.2 linux/amd64

@jellonek
Copy link
Contributor

So please upgrade to more recent version.

@ianvernon
Copy link

ianvernon commented Aug 15, 2018

I hit this as well - this is because the Makefile gets dependencies via go get: https://github.com/vishvananda/netlink/blob/09a46322b222b19a80cd0d2a0e09e1678e150333/Makefile (which gets the latest version, from master, of the libraries)

I will update this when I find a version of golang.org/x/sys/unix that works with this package.

@jsleeio
Copy link

jsleeio commented Oct 8, 2018

I am also seeing this issue. Interestingly it happens when I use glide to manage vendoring but not when I use dep.

However, my project also uses the Kubernetes client-go library which really doesn't work well with dep yet, so I'm stuck with glide. :-(

edit: this may be because the Kube folks have pinned a specific commit for golang.org/x/sys/unix :-(

@trevrosen
Copy link
Contributor

trevrosen commented Oct 17, 2018

I ran into this as well. For what it's worth, this got me past the error to a successful build in my Docker container (using dep and go v1.11):

[[constraint]]
  branch = "master"
  name = "github.com/vishvananda/netlink"

[[override]]
  branch = "release-branch.go1.11"
  name = "golang.org/x/sys"

YMMV of course. I'm not really certain why this worked correctly, but at this point I've spent too much time on it to care much beyond documenting it here for the next person. 😸

@fredhsu
Copy link

fredhsu commented Oct 30, 2018

Thanks @trevrosen that helped me out! Here's a glide version for those who might be using it for k8s client:

import:
- package: k8s.io/client-go
  version: v7.0.0
- package: github.com/vishvananda/netlink
  version: master
- package: golang.org/x/sys
  version: release-branch.go1.11

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

6 participants