-
Notifications
You must be signed in to change notification settings - Fork 18k
x/crypto: chacha20Poly1305Open: relocation target runtime.cpuid_ebx7 not defined on Windows #24372
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
Comments
@netvipe 1.10 is the latest release. Does your issue reproduce on that version as well? can you provide a snippet of code that reproduces your issue? The following program runs without issue for me on macOS using 1.10 (I see you’re running windows so maybe that’s a factor):
|
@andybons My various test snippets look very similar to yours. The only thing missing is a call for "c.Open(...)". But a simple import and a reference is enough for the error message to appear. The corresponding lines in chacha20poly1305_amd64.{s,go} are identical, so I don't think the new go version will fix it. The error message only appears on the stated Windows system. It does not appear on another Linux dev system. Reason for the issue seems to be the Intel i5-3570K CPU, which does not support AVX2 at all. I'm pretty sure it's the following code section in chacha20poly1305_amd64.go:
I already though about bypassing it, which is pretty simple, but I don't like to modify public sources for my local build system only. There must be a smarter way ;-) |
Are you using latest version of x/crypto? |
You are right. A complete clear of automatically downloaded sources and cached build files in src and pkg removed the issue. I've already upgraded to go 1.9.4 before creating the ticket. But that did not clear the caches etc. My fault. |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.9.4 windows/amd64
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?set GOARCH=amd64
set GOBIN=
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
What did you do?
I've imported "golang.org/x/crypto/chacha20poly1305" and created instance via chacha20poly1305.New.
Error message appears when compiling code that contains the import.
Already updated to latest golang 1.9 release but some result.
What did you expect to see?
No compiler error
What did you see instead?
golang.org/x/crypto/chacha20poly1305.chacha20Poly1305Open: relocation target runtime.cpuid_ebx7 not defined
golang.org/x/crypto/chacha20poly1305.chacha20Poly1305Seal: relocation target runtime.cpuid_ebx7 not defined
golang.org/x/crypto/chacha20poly1305.chacha20Poly1305Open: undefined: "runtime.cpuid_ebx7"
golang.org/x/crypto/chacha20poly1305.chacha20Poly1305Seal: undefined: "runtime.cpuid_ebx7"
The text was updated successfully, but these errors were encountered: