-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go, x/vgo: compilation errors upon building #26541
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
the same to you, i use docker golang:1.11beta2-stretch |
How did you upgrade from one version to another? It is common to see the class of error you describe if one version of Go is unpacked atop another. |
Also, as of 1.11beta2 you don't need to type I recommend, unless you want to use the old vgo fork, to delete, |
@davecheney I used the standard installer for MacOS from golang.org/dl Is there thorough, official documentation of the new "go build"? |
Try tip.golang.org for the pre release docs.
… On 23 Jul 2018, at 14:33, Dmitriy ***@***.***> wrote:
@davecheney I used the standard installer for MacOS from golang.org/dl
Is there thorough, official documentation of the new "go build"?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I have solved it because the different versions of go runtime are covered by each other |
That looks like a typo. What version did you upgrade from?
Did you rebuild the Did you install the Go toolchain from source, or using the binary installer? (The standalone |
@bcmills you're right that was a typo; I fixed it to say I upgraded from go1.11beta1. I did not rebuilt (I had installed Go using the standard Installer for MacOS at https://golang.org/dl/) |
Honestly, at the moment (The reason you'd want to use |
That answers my questions. Thank you all! |
I installed $ vgo build
go: creating new go.mod: module github.com/some/repo
go: copying requirements from Gopkg.lock
# runtime/internal/atomic
/usr/local/go/src/runtime/internal/atomic/atomic_wasm.go:14:6: Load redeclared in this block
previous declaration at /usr/local/go/src/runtime/internal/atomic/atomic_amd64x.go:13:24
/usr/local/go/src/runtime/internal/atomic/atomic_wasm.go:20:6: Loadp redeclared in this block
previous declaration at /usr/local/go/src/runtime/internal/atomic/atomic_amd64x.go:19:32
/usr/local/go/src/runtime/internal/atomic/atomic_wasm.go:26:6: Load64 redeclared in this block
previous declaration at /usr/local/go/src/runtime/internal/atomic/atomic_amd64x.go:25:26
/usr/local/go/src/runtime/internal/atomic/atomic_wasm.go:32:6: Xadd redeclared in this block
previous declaration at /usr/local/go/src/runtime/internal/atomic/atomic_amd64x.go:30:37
/usr/local/go/src/runtime/internal/atomic/atomic_wasm.go:40:6: Xadd64 redeclared in this block
previous declaration at /usr/local/go/src/runtime/internal/atomic/atomic_amd64x.go:33:39
/usr/local/go/src/runtime/internal/atomic/atomic_wasm.go:48:6: Xadduintptr redeclared in this block
previous declaration at /usr/local/go/src/runtime/internal/atomic/atomic_amd64x.go:36:47
/usr/local/go/src/runtime/internal/atomic/atomic_wasm.go:56:6: Xchg redeclared in this block
previous declaration at /usr/local/go/src/runtime/internal/atomic/atomic_amd64x.go:39:36
/usr/local/go/src/runtime/internal/atomic/atomic_wasm.go:64:6: Xchg64 redeclared in this block
previous declaration at /usr/local/go/src/runtime/internal/atomic/atomic_amd64x.go:42:38
/usr/local/go/src/runtime/internal/atomic/atomic_wasm.go:72:6: Xchguintptr redeclared in this block
previous declaration at /usr/local/go/src/runtime/internal/atomic/atomic_amd64x.go:45:45
/usr/local/go/src/runtime/internal/atomic/atomic_wasm.go:80:6: And8 redeclared in this block
previous declaration at /usr/local/go/src/runtime/internal/atomic/atomic_amd64x.go:48:27
/usr/local/go/src/runtime/internal/atomic/atomic_wasm.go:80:6: too many errors
# runtime/internal/sys
/usr/local/go/src/runtime/internal/sys/arch_wasm.go:8:2: ArchFamily redeclared in this block
previous declaration at /usr/local/go/src/runtime/internal/sys/arch_amd64.go:8:24
/usr/local/go/src/runtime/internal/sys/arch_wasm.go:9:2: BigEndian redeclared in this block
previous declaration at /usr/local/go/src/runtime/internal/sys/arch_amd64.go:9:24
/usr/local/go/src/runtime/internal/sys/arch_wasm.go:10:2: CacheLineSize redeclared in this block
previous declaration at /usr/local/go/src/runtime/internal/sys/arch_amd64.go:10:24
/usr/local/go/src/runtime/internal/sys/arch_wasm.go:11:2: DefaultPhysPageSize redeclared in this block
previous declaration at /usr/local/go/src/runtime/internal/sys/arch_amd64.go:11:24
/usr/local/go/src/runtime/internal/sys/arch_wasm.go:12:2: PCQuantum redeclared in this block
previous declaration at /usr/local/go/src/runtime/internal/sys/arch_amd64.go:12:24
/usr/local/go/src/runtime/internal/sys/arch_wasm.go:13:2: Int64Align redeclared in this block
previous declaration at /usr/local/go/src/runtime/internal/sys/arch_amd64.go:13:24
/usr/local/go/src/runtime/internal/sys/arch_wasm.go:14:2: HugePageSize redeclared in this block
previous declaration at /usr/local/go/src/runtime/internal/sys/arch_amd64.go:14:29
/usr/local/go/src/runtime/internal/sys/arch_wasm.go:15:2: MinFrameSize redeclared in this block
previous declaration at /usr/local/go/src/runtime/internal/sys/arch_amd64.go:15:24
/usr/local/go/src/runtime/internal/sys/arch_wasm.go:18:6: Uintreg redeclared in this block
previous declaration at /usr/local/go/src/runtime/internal/sys/arch_amd64.go:18:6
# internal/cpu
/usr/local/go/src/internal/cpu/cpu_x86.go:9:7: CacheLineSize redeclared in this block
previous declaration at /usr/local/go/src/internal/cpu/cpu_wasm.go:7:23 Also, I don't think go and vgo are the same even in beta2. I tried go build
# github.com/some/repo
./main.go:8:14: undefined: sqs |
I think I misunderstood the comment about vgo. vgo is of course referring to an old install and lives inside GOPATH. |
I think you’ve messed up your go installation.
I’d delete it, download GO1.11beta2 and the use go, not vgo.
I think that will resolve your problem.
… On 26 Jul 2018, at 12:11, Owais Lone ***@***.***> wrote:
I think I misunderstood the comment about vgo. vgo is of course referring to an old install and lives inside GOPATH.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Yup. I had old 1.10 binaries left in GOPATH which were not working. Thanks |
I had this error appear in GoLand after I upgraded Go from 1.10 to 1.11. The problem was resolved when I reinstalled |
The vgo codebase is a fork of Go 1.11 for use only with go 1.10. If you are using go 1.11, then do not combine it with vgo, it will not lead to success.
… On 9 Sep 2018, at 02:37, nicerobot ***@***.***> wrote:
I had this error appear in GoLand when I upgraded Go from 1.10 to 1.11. The problem was resolved when I reinstalled vgo go get -u golang.org/x/vgo using 1.11.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
GoLand seems to do the right thing when vgo is select with the go1.11 SDK also selected. |
What version of Go are you using (
go version
)?go version go1.11beta2 darwin/amd64
Does this issue reproduce with the latest release?
This is happening with the latest release.
What operating system and processor architecture are you using (
go env
)?GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/myusername/Library/Caches/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/myusername/OneDrive/gocode"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/9x/xp9y18vx58q815_7fp24cf5c0000gn/T/go-build936526924=/tmp/go-build -gno-record-gcc-switches -fno-common"
What did you do?
I just now upgraded from version go1.11beta1 to go1.11beta2.
I'm trying to build a program using the
vgo build
command, and I'm getting a bunch of errors and failures after the "go.mod" file is built. It doesn't look like it's something particularly due to the packages being included, since this issue occurs with a couple other packages I tried to build.What did you expect to see?
A successful build.
What did you see instead?
It looks like a few internal packages are not being compiled correctly. There are a lot of "redeclared in this block" errors.
Here's a copy of the complete output by the
vgo build
command:The text was updated successfully, but these errors were encountered: