Go 1.9 gives runtime error on Windows 10 -


i installed go 1.9 on windows 10 , when ran class 'hello world' program gave me following error.

# runtime c:\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) c:\go\src\runtime\mstkbar.go:162:24: division 0 c:\go\src\runtime\mstkbar.go:162:43: invalid expression unsafe.sizeof(composite literal) c:\go\src\runtime\mstkbar.go:162:44: undefined: stkbar c:\go\src\runtime\mstkbar.go:212:4: gp.stkbar undefined (type *g has no field or method stkbar) c:\go\src\runtime\mstkbar.go:213:15: gp.stkbar undefined (type *g has no field or method stkbar) c:\go\src\runtime\mstkbar.go:216:23: undefined: stackbarrierpc c:\go\src\runtime\mstkbar.go:226:28: gp.stkbarpos undefined (type *g has no field or method stkbarpos) c:\go\src\runtime\mstkbar.go:227:19: gp.stkbarpos undefined (type *g has no field or method stkbarpos) c:\go\src\runtime\mstkbar.go:248:41: undefined: stkbar c:\go\src\runtime\mstkbar.go:227:19: many errors 

when ran go env, gave me following output,

set goarch=amd64 set gobin= set goexe=.exe set gohostarch=amd64 set gohostos=windows set goos=windows set gopath=c:\users\indu\go set gorace= set goroot=c:\go set gotooldir=c:\go\pkg\tool\windows_amd64 set gccgo=gccgo set cc=gcc set gogccflags=-m64 -mthreads -fmessage-length=0 set cxx=g++ set cgo_enabled=1 set cgo_cflags=-g -o2 set cgo_cppflags= set cgo_cxxflags=-g -o2 set cgo_fflags=-g -o2 set cgo_ldflags=-g -o2 set pkg_config=pkg-config 

really weird issues in runtime no obvious cause caused not uninstalling pervious version before installing new one.

sadly the go installation instructions make no mention of issue.

in general should move or delete old go install, , install new version scratch.

if building source (the way do) best move old version diferent directory, , configure temporary environment can use old version build new one. if installing official binaries deleting old version simplest.

regardless of how installing should never place own code in same tree runtime code, deleting old runtime , reinstalling/rebuilding should possible.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -