<p>I tried following the instructions from the official documentation page of &quot;<strong>Operator SDK</strong>&quot;. The device I'm trying to install it on is running on Windows 10, AMD64. I installed GNU Make via Chocolatey.</p>
<pre><code> make --version
GNU Make 4.4.1
Built for Windows32
Copyright (C) 1988-2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later &lt;https://gnu.org/licenses/gpl.html&gt;
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
</code></pre>
<p>As per the &quot;<a href="https://sdk.operatorframework.io/docs/installation/#compile-and-install-from-master" rel="nofollow noreferrer">Command and install from master</a>&quot; section of the official documentation:</p>
<pre><code>git clone https://github.com/operator-framework/operator-sdk
cd operator-sdk
git checkout master
make install
</code></pre>
<p>The last line &quot;make install&quot; fails:</p>
<pre><code>make install
go install -gcflags &quot;all=-trimpath=C:/Users/erjan/Downloads/operator_k8s_sdk&quot; -asmflags &quot;all=-trimpath=C:/Users/erjan/Downloads/operator_k8s_sdk&quot; -ldflags &quot; -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' &quot;  ./cmd/# github.com/containerd/containerd/archive
..\..\..\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 &quot;golang.org/x/sys/windows&quot;.Filetime value in struct literal
..\..\..\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 &quot;golang.org/x/sys/windows&quot;.Filetime value in struct literal
..\..\..\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 &quot;golang.org/x/sys/windows&quot;.Filetime value in struct literal
..\..\..\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 &quot;golang.org/x/sys/windows&quot;.Filetime value in struct literal
..\..\..\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 &quot;golang.org/x/sys/windows&quot;.Filetime value in assignment
make: *** [Makefile:75: install] Error 1
</code></pre>
<p>What could be the reason for this error?</p>

ERJAN
<p>I see there are several lines where Go is complaining about a type mismatch. Specifically, it is mentioning that <code>syscall.Filetime</code> cannot be used as <code>&quot;golang.org/x/sys/windows&quot;.Filetime</code>.</p>
<pre><code>..\..\..\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 &quot;golang.org/x/sys/windows&quot;.Filetime value in struct literal
</code></pre>
<p>A value of type <code>syscall.Filetime</code> is being used where a value of type <code>&quot;golang.org/x/sys/windows&quot;.Filetime</code> is expected. This is a type mismatch issue. The file <code>tar_windows.go</code> within the <code>github.com/containerd/containerd</code> package seems to be the source of these errors, and it appears to be related to how file timestamps are being handled on Windows.</p>
<p><a href="https://github.com/containerd/containerd/releases/tag/v1.4.11" rel="nofollow noreferrer"><code>containerd/containerd</code> v1.4.11</a> seems quite old, considering the <a href="https://github.com/operator-framework/operator-sdk/blob/d21ed6499ebfc8ecdb4508e1c2a2a0cfd2a151f3/go.mod#L72" rel="nofollow noreferrer">operator-framework/operator-sdk</a> project itself needs <a href="https://github.com/containerd/containerd/releases/tag/v1.7.0" rel="nofollow noreferrer"><code>containerd</code> v1.7.0</a></p>
<p>Since I got the same error through <code>make install</code>, I tried first <code>go build -a -v ...</code>, which does not trigger errors.
The Makefile fails on <code>go install ./cmd/{operator-sdk,helm-operator}</code></p>
<ul>
<li><code>go install ./cmd/helm-operator</code> works.</li>
<li><code>go install ./cmd/operator-sdk</code> has the error</li>
</ul>
<p>That bug is confirmed with your issue <a href="https://github.com/operator-framework/operator-sdk/issues/6585" rel="nofollow noreferrer"><code>operator-framework/operator-sdk</code> issue 6585</a></p>
<blockquote>
<p>We do not officially support or build binaries for windows. But we are open to receiving any help with contributions.<br />
Duplicate of <a href="https://github.com/operator-framework/operator-sdk/issues/6586" rel="nofollow noreferrer">#6586</a></p>
<p>Operator SDK <a href="https://sdk.operatorframework.io/docs/overview/#platform-support" rel="nofollow noreferrer">doesn't officially support or build binaries for Windows</a>.</p>
<p>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 <code>github.com\containerd\containerd@v1.4.11</code>.<br />
Looks like it may have an issue. Also, we have explicitly pinned <code>containerd</code> to 1.4.11:</p>
<p><a href="https://github.com/operator-framework/operator-sdk/blob/d21ed6499ebfc8ecdb4508e1c2a2a0cfd2a151f3/go.mod#L243" rel="nofollow noreferrer">operator-sdk/go.mod</a>:</p>
<pre><code>github.com/containerd/containerd =&gt; github.com/containerd/containerd v1.4.11 
</code></pre>
<p>because a bump in it breaks github.com/deislabs/oras.</p>
<p>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.</p>
</blockquote>
