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

Install Operator SDK on Windows 11 #6586

Closed
kavinduxo opened this issue Oct 1, 2023 · 4 comments
Closed

Install Operator SDK on Windows 11 #6586

kavinduxo opened this issue Oct 1, 2023 · 4 comments
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Milestone

Comments

@kavinduxo
Copy link

kavinduxo commented Oct 1, 2023

Installation Help

Has anyone managed to install Operator SDK on a Windows machine? I'm running with an error.

I tried with "install from GitHub source code"

https://sdk.operatorframework.io/docs/installation/#compile-and-install-from-master

Environment

Windows 11 x64
go version go1.19 windows/386

install cmd -->
$ make install

output -->
go install -gcflags "all=-trimpath=D:/tools/operatorSDK" -asmflags "all=-trimpath=D:/tools/operatorSDK" -ldflags " -X 'github.com/operator-framework/operator-sdk/internal/version.Version=v1.31.0+git' -X 'github.com/operator-framework/operator-sdk/internal/version.GitVersion=v1.31.0-3-gd21ed649' -X 'github.com/operator-framework/operator-sdk/internal/version.GitCommit=d21ed6499ebfc8ecdb4508e1c2a2a0cfd2a151f3' -X 'github.com/operator-framework/operator-sdk/internal/version.KubernetesVersion=v1.26.0' -X 'github.com/operator-framework/operator-sdk/internal/version.ImageVersion=v1.31.0' " ./cmd/{operator-sdk,helm-operator} /# github.com/containerd/containerd/archive C:\Users\KavinduGunathilake\go\pkg\mod\github.com\containerd\containerd@v1.4.11\archive\tar_windows.go:234:19: cannot use syscall.NsecToFiletime(hdr.AccessTime.UnixNano()) (value of type syscall.Filetime) as type "golang.org/x/sys/windows".Filetime in struct literal C:\Users\KavinduGunathilake\go\pkg\mod\github.com\containerd\containerd@v1.4.11\archive\tar_windows.go:235:19: cannot use syscall.NsecToFiletime(hdr.ModTime.UnixNano()) (value of type syscall.Filetime) as type "golang.org/x/sys/windows".Filetime in struct literal C:\Users\KavinduGunathilake\go\pkg\mod\github.com\containerd\containerd@v1.4.11\archive\tar_windows.go:236:19: cannot use syscall.NsecToFiletime(hdr.ChangeTime.UnixNano()) (value of type syscall.Filetime) as type "golang.org/x/sys/windows".Filetime in struct literal C:\Users\KavinduGunathilake\go\pkg\mod\github.com\containerd\containerd@v1.4.11\archive\tar_windows.go:239:17: cannot use syscall.NsecToFiletime(hdr.ModTime.UnixNano()) (value of type syscall.Filetime) as type "golang.org/x/sys/windows".Filetime in struct literal C:\Users\KavinduGunathilake\go\pkg\mod\github.com\containerd\containerd@v1.4.11\archive\tar_windows.go:257:27: cannot use syscall.NsecToFiletime(createTime.UnixNano()) (value of type syscall.Filetime) as type "golang.org/x/sys/windows".Filetime in assignment /# github.com/operator-framework/operator-sdk/internal/generate/clusterserviceversion/bases/definitions internal\generate\clusterserviceversion\bases\definitions\markers.go:172:11: cannot use math.MaxInt64 (untyped int constant 9223372036854775807) as int value in assignment (overflows) make: *** [Makefile:75: install] Error 2

Really appreciate your help on this :)

@varshaprasad96
Copy link
Member

Operator SDK doesn't officially support or build binaries for Windows (https://sdk.operatorframework.io/docs/overview/#platform-support).

However, there have been instances where users could still build SDK binary from master on their windows machines. This error seems to be coming from github.com\containerd\containerd@v1.4.11. Looks like it may have an issue. Also, we have explicitly pinned containerd to 1.4.11 (

github.com/containerd/containerd => github.com/containerd/containerd v1.4.11
) because a bump in it breaks github.com/deislabs/oras.

I would suggest to start by checking if a bump in dependencies fixes these issues without breaking anything else in SDK. If so, we can merge that in master to fix it. Unfortunately, supporting windows builds has not been in our roadmap, but if you would like to try it out, we would appreciate any contributions.

@openshift-bot
Copy link

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci openshift-ci bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 1, 2024
@kavinduxo
Copy link
Author

In conclusion, Operator SDK is not working for Windows. First, I tried WSL2, and it worked fine even though it wasn't smooth. I always had issues with configurations for environment variables and all. What made me suffer the most was the frequent changes in configurations. So, I decided to go for a Linux-based OS. There it's working fine. Thanks for the comments.

@kirillyesikov
Copy link

Just doesn't work on Windows 10. Confirmed :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

No branches or pull requests

4 participants