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

Cross compile for Windows: undefined: syscall.Stat_t #23

Closed
quantonganh opened this issue Oct 2, 2017 · 6 comments
Closed

Cross compile for Windows: undefined: syscall.Stat_t #23

quantonganh opened this issue Oct 2, 2017 · 6 comments

Comments

@quantonganh
Copy link

# github.com/vishvananda/netns
../../../../../godeps/src/github.com/vishvananda/netns/netns.go:27:13: undefined: syscall.Stat_t
../../../../../godeps/src/github.com/vishvananda/netns/netns.go:28:12: undefined: syscall.Fstat
../../../../../godeps/src/github.com/vishvananda/netns/netns.go:31:12: undefined: syscall.Fstat
../../../../../godeps/src/github.com/vishvananda/netns/netns.go:39:8: undefined: syscall.Stat_t
../../../../../godeps/src/github.com/vishvananda/netns/netns.go:43:12: undefined: syscall.Fstat
../../../../../godeps/src/github.com/vishvananda/netns/netns.go:52:8: undefined: syscall.Stat_t
../../../../../godeps/src/github.com/vishvananda/netns/netns.go:56:12: undefined: syscall.Fstat
../../../../../godeps/src/github.com/vishvananda/netns/netns.go:70:29: cannot use int(*ns) (type int) as type syscall.Handle in argument to syscall.Close
@willfurnell
Copy link

Hi, I'm still having this issue - @vishvananda was this solved? Thanks.

@wentaojin
Copy link

@quantonganh Hi,I‘m meet this problem,Can you tell me how solve?Thanks

@wu0407
Copy link

wu0407 commented Jan 13, 2021

Set this in .vscode/settings.json when you use vscode on windows

{
    "go.toolsEnvVars": {
    "GOFLAGS": "-tags=linux"
    }
}

sayboras added a commit to sayboras/netns that referenced this issue May 1, 2022
This commit is to make sure there is no compilication issue
with windows.

Fixes vishvananda#23

Signed-off-by: Tam Mach <sayboras@yahoo.com>
sayboras added a commit to sayboras/cilium that referenced this issue May 2, 2022
This commit is to make sure there is no compilation issue
with windows for netlink and netns packages

Relates to vishvananda/netlink#146
Relates to vishvananda/netns#23

Suggested-by: Tobias Klauser <tobias@cilium.io>
Signed-off-by: Tam Mach <tam.mach@cilium.io>
aditighag pushed a commit to cilium/cilium that referenced this issue May 2, 2022
This commit is to make sure there is no compilation issue
with windows for netlink and netns packages

Relates to vishvananda/netlink#146
Relates to vishvananda/netns#23

Suggested-by: Tobias Klauser <tobias@cilium.io>
Signed-off-by: Tam Mach <tam.mach@cilium.io>
@Aeswolf
Copy link

Aeswolf commented Oct 24, 2022

Adding that to the setting.json just enabled vscode not to identify syscall.Stat_t as an error but upon compiling, the output is undefined syscall.Stat_t

sayboras added a commit to sayboras/netns that referenced this issue Oct 28, 2022
This commit is to make sure there is no compilication issue
with windows.

Fixes vishvananda#23

Signed-off-by: Tam Mach <sayboras@yahoo.com>
sayboras added a commit to sayboras/netns that referenced this issue Oct 28, 2022
This commit is to make sure there is no compilication issue
with windows.

Fixes vishvananda#23

Signed-off-by: Tam Mach <sayboras@yahoo.com>
@jeffwidman
Copy link
Collaborator

I think #61 solved this, so closing. If still an issue for syscall.Stat_t, please comment and we can re-open, or if you see a different cross-compilation issue please file a new issue (or submit a PR fixing it!).

@lucheng0127
Copy link

@quantonganh Hi,I‘m meet this problem,Can you tell me how solve?Thanks

Update netns to github.com/vishvananda/netns v0.0.4 works.

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.

7 participants