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
cmd/go: Using cgo and quic-go under certain circumstance causes multiple definition errors #19198
Comments
Can you show us the complete output of |
go build -gcflags '-N' -x
|
I can reproduce it here on windows-amd64 with gcc 4.9.1. For example, I can see 2 different "bswapMask" symbols in go.o:
So I have changed cmd/link:
to see more
I will let @ianlancetaylor decide what needs to be done here, if anything. Alex |
crypto/aes is being a bit dubious in declaring some unqualified symbols as global, but I think that ultimately the error is that
Here @alexbrainman Do you want try a patch to |
I tried this:
and the problem goes away. Should I send a CL? I think this needs a test. What would the test do? Where would the test live? Thank you. Alex |
Sending a CL would be great, thanks. In this case I would not bother to make it conditional on I think the test can be a program with two packages that both have an asm file that both say
A name like |
Where will this test live? Alex |
Since we have no good place for that kind of test, I would put it in cmd/go/go_test.go, as with |
In fact, it looks like |
I will have a go. Thank you. Alex |
I had to change too many things, so I created new test. Alex |
CL https://golang.org/cl/37810 mentions this issue. |
What version of Go are you using (
go version
)?go version go1.8 windows/amd64
go version go1.7.5 windows/amd64
go version go1.7.1 windows/amd64
What operating system and processor architecture are you using (
go env
)?Windows, AMD64
Only Windows. I tested on Linux and it works fine.
What did you do?
go build -gcflags '-N'
the following code. I add-gcflag '-N'
so I can paste shorter code here.Almost everything in these codes is necessary to reproduce.
What did you expect to see?
Build successfully.
What did you see instead?
Errors:
"github.com/lucas-clemente/quic-go" is a pure Go package, so I think this is a bug in Go code.
I reproduced it on AppVeyor at https://ci.appveyor.com/project/crvv/gocryptoaes.
The text was updated successfully, but these errors were encountered: