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

cmd/go: can't build any go program on freebsd-11.1 #22141

Closed
bakul opened this issue Oct 5, 2017 · 3 comments
Closed

cmd/go: can't build any go program on freebsd-11.1 #22141

bakul opened this issue Oct 5, 2017 · 3 comments
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.

Comments

@bakul
Copy link

bakul commented Oct 5, 2017

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go version go1.9.1 freebsd/386

Does this issue reproduce with the latest release?

Yes.

Do note that the test succeeds with go1.4 built from go1.4-bootstrap-20170531.tar.gz
but I haven't been able to build go locally even when I had Freebsd-10.3

What operating system and processor architecture are you using (go env)?

$ uname -rsp
FreeBSD 11.1-RELEASE-p1 i386

$ go env
GOARCH="386"
GOBIN=""
GOEXE=""
GOHOSTARCH="386"
GOHOSTOS="freebsd"
GOOS="freebsd"
GOPATH="/home/bakul/go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/freebsd_386"
GCCGO="gccgo"
GO386="sse2"
CC="clang"
GOGCCFLAGS="-fPIC -m32 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build210827576=/tmp/go-build -gno-record-gcc-switches"
CXX="clang++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"

What did you do?

$ cat > hello.go <<EOF
package main
import "fmt"
func main() {
        fmt.Println("Hello")
}
EOF
$ go build hello.go

What did you expect to see?

build succeeds

What did you see instead?

$ go build hello.go
# runtime
/usr/local/go/src/runtime/mstkbar.go:151:10: debug.gcstackbarrieroff undefined (type struct { allocfreetrace int32; cgocheck int32; efence int32; gccheckmark int32; gcpacertrace int32; gcshrinkstackoff int32; gcrescanstacks int32; gcstoptheworld int32; gctrace int32; invalidptr int32; sbrk int32; scavenge int32; scheddetail int32; schedtrace int32 } has no field or method gcstackbarrieroff)
/usr/local/go/src/runtime/mstkbar.go:162:24: division by zero
/usr/local/go/src/runtime/mstkbar.go:162:43: invalid expression unsafe.Sizeof(composite literal)
/usr/local/go/src/runtime/mstkbar.go:162:44: undefined: stkbar
/usr/local/go/src/runtime/mstkbar.go:212:4: gp.stkbar undefined (type *g has no field or method stkbar)
/usr/local/go/src/runtime/mstkbar.go:213:15: gp.stkbar undefined (type *g has no field or method stkbar)
/usr/local/go/src/runtime/mstkbar.go:216:23: undefined: stackBarrierPC
/usr/local/go/src/runtime/mstkbar.go:226:28: gp.stkbarPos undefined (type *g has no field or method stkbarPos)
/usr/local/go/src/runtime/mstkbar.go:227:19: gp.stkbarPos undefined (type *g has no field or method stkbarPos)
/usr/local/go/src/runtime/mstkbar.go:248:41: undefined: stkbar
/usr/local/go/src/runtime/mstkbar.go:227:19: too many errors
@ALTree ALTree changed the title can't build any go program on freebsd-11.1 cmd/go: can't build any go program on freebsd-11.1 Oct 5, 2017
@ALTree ALTree added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Oct 5, 2017
@ianlancetaylor
Copy link
Contributor

You unpacked a new release on top of an old release. That won't work. You need to unpack the new release in an empty directory.

@xvilo
Copy link

xvilo commented Dec 5, 2017

@ianlancetaylor can you elaborate on how to do this?
I've make deinstalled go within ports.
Than updated ports and did a cd /usr/ports/lang/go/ && make install clean only, this still gives the output.

@davecheney
Copy link
Contributor

@xvilo please open a new issue.

@golang golang locked and limited conversation to collaborators Dec 5, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

5 participants