gvm
gvm copied to clipboard
gvm install fails on macOS 10.12.4
Go 1.4
$ gvm install go1.4
Downloading Go source...
Installing go1.4...
* Compiling...
ERROR: Failed to compile. Check the logs at /Users/ashald/.gvm/logs/go-go1.4-compile.log
ERROR: Failed to use installed version
$ cat /Users/ashald/.gvm/logs/go-go1.4-compile.log
# Building C bootstrap tool.
cmd/dist
# Building compilers and Go bootstrap tool for host, darwin/amd64.
lib9
libbio
liblink
cmd/cc
cmd/gc
cmd/6l
/Users/ashald/.gvm/gos/go1.4/src/cmd/6l/../ld/dwarf.c:1472:15: error: implicit conversion from 'int' to 'char' changes value from 156 to -100 [-Werror,-Wconstant-conversion]
/Users/ashald/.gvm/gos/go1.4/src/cmd/6l/../ld/dwarf.c:1756:21: error: implicit conversion from 'int' to 'char' changes value from 144 to -112 [-Werror,-Wconstant-conversion]
/Users/ashald/.gvm/gos/go1.4/src/cmd/6l/../ld/lib.h:168:13: note: expanded from macro 'cput'
go tool dist: FAILED: clang -Wall -Wstrict-prototypes -Wextra -Wunused -Wno-sign-compare -Wno-missing-braces -Wno-parentheses -Wno-unknown-pragmas -Wno-switch -Wno-comment -Wno-missing-field-initializers -Werror -fno-common -ggdb -pipe -Wuninitialized -O2 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -mmacosx-version-min=10.6 -c -m64 -I /Users/ashald/.gvm/gos/go1.4/include -I /Users/ashald/.gvm/gos/go1.4/src/cmd/6l -o /Users/ashald/.gvm/gos/go1.4/pkg/obj/cmd/6l/dwarf.o /Users/ashald/.gvm/gos/go1.4/src/cmd/6l/../ld/dwarf.c
Try gvm install go1.4 --binary
Worked for me and others: https://github.com/moovweb/gvm/issues/217
mark
Try gvm2...
gvm install go1.8.3
cat /Users/zephiro/.gvm/logs/go-go1.8.3-compile.log
##### Building Go bootstrap tool.
cmd/dist
##### Building Go toolchain using /Users/zephiro/.gvm/gos/go1.4.
failed MSpanList_Insert 0x129d490 0x453326e49a8 0x0
fatal error: MSpanList_Insert
runtime stack:
runtime.MSpanList_Insert(0x827d98, 0x129d490)
/usr/local/go/src/runtime/mheap.c:692 +0x8f
runtime.MHeap_Free(0x827b20, 0x129d490, 0xc200000000)
/usr/local/go/src/runtime/mheap.c:500 +0x5b
runtime.MCentral_FreeSpan(0x8314b8, 0x129d490, 0x2, 0xc208100000, 0xc208101000, 0x0, 0x64)
/usr/local/go/src/runtime/mcentral.c:181 +0x1bb
runtime.MSpan_Sweep(0x129d490, 0x2f00000000, 0x1)
/usr/local/go/src/runtime/mgc0.c:1096 +0x477
runtime.MHeap_Alloc(0x827b20, 0x1, 0x1000000001f, 0x977a9)
/usr/local/go/src/runtime/mheap.c:240 +0x66
runtime.MCentral_CacheSpan(0x830738, 0x1)
/usr/local/go/src/runtime/mcentral.c:85 +0x167
runtime.MCache_Refill(0x1297000, 0xc20000001f, 0x112d5e)
/usr/local/go/src/runtime/mcache.c:90 +0xa0
goroutine 1 [running]:
runtime.switchtoM()
/usr/local/go/src/runtime/asm_amd64.s:198 fp=0xc208113f88 sp=0xc208113f80
runtime.mallocgc(0x400, 0x0, 0x3, 0xa4780)
/usr/local/go/src/runtime/malloc.go:178 +0x85b fp=0xc208114038 sp=0xc208113f88
runtime.rawmem(0x400, 0x400)
/usr/local/go/src/runtime/malloc.go:371 +0x39 fp=0xc208114060 sp=0xc208114038
runtime.growslice(0x475c20, 0xc20805ba00, 0x200, 0x200, 0x1, 0x0, 0x0, 0x0)
/usr/local/go/src/runtime/slice.go:83 +0x2e1 fp=0xc2081140e0 sp=0xc208114060
go/build.(*importReader).readByte(0xc2080f2140, 0x2f)
/usr/local/go/src/go/build/read.go:43 +0x10e fp=0xc208114178 sp=0xc2081140e0
go/build.(*importReader).peekByte(0xc2080f2140, 0x5b1c01, 0x29)
/usr/local/go/src/go/build/read.go:89 +0x263 fp=0xc2081141d0 sp=0xc208114178
go/build.readImports(0x12a98f0, 0xc20802c2e0, 0xc20802c200, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/go/src/go/build/read.go:209 +0x13e fp=0xc208114230 sp=0xc2081141d0
go/build.(*Context).matchFile(0x817c40, 0xc208117260, 0x50, 0xc208116651, 0x5, 0x1, 0xc2080c5ef0, 0x0, 0x0, 0x0, ...)
/usr/local/go/src/go/build/build.go:958 +0x615 fp=0xc208114378 sp=0xc208114230
go/build.(*Context).Import(0x817c40, 0x5a3a50, 0x1, 0xc208061680, 0x50, 0x0, 0xc208070fa0, 0x0, 0x0)
/usr/local/go/src/go/build/build.go:624 +0x2529 fp=0xc208114cb0 sp=0xc208114378
go/build.(*Context).ImportDir(0x817c40, 0xc208061680, 0x50, 0x0, 0x6a4e80, 0x0, 0x0)
/usr/local/go/src/go/build/build.go:406 +0x7f fp=0xc208114d10 sp=0xc208114cb0
main.func·027(0xc208061680, 0x50, 0x12a9068, 0xc208061720, 0x0, 0x0, 0x0, 0x0)
/usr/local/go/src/cmd/go/main.go:569 +0x6aa fp=0xc208114e50 sp=0xc208114d10
path/filepath.walk(0xc208061680, 0x50, 0x12a9068, 0xc208061720, 0xc2081157d0, 0x0, 0x0)
/usr/local/go/src/path/filepath/path.go:347 +0xa2 fp=0xc208114f98 sp=0xc208114e50
path/filepath.walk(0xc208061f90, 0x4d, 0x12a9068, 0xc2080f2050, 0xc2081157d0, 0x0, 0x0)
/usr/local/go/src/path/filepath/path.go:372 +0x61b fp=0xc2081150e0 sp=0xc208114f98
path/filepath.walk(0xc208060550, 0x44, 0x12a9068, 0xc2080605f0, 0xc2081157d0, 0x0, 0x0)
/usr/local/go/src/path/filepath/path.go:372 +0x61b fp=0xc208115228 sp=0xc2081150e0
path/filepath.walk(0xc2080ad540, 0x3f, 0x12a9068, 0xc208060fa0, 0xc2081157d0, 0x0, 0x0)
/usr/local/go/src/path/filepath/path.go:372 +0x61b fp=0xc208115370 sp=0xc208115228
path/filepath.walk(0xc2080ad3c0, 0x3b, 0x12a9068, 0xc208060f50, 0xc2081157d0, 0x0, 0x0)
/usr/local/go/src/path/filepath/path.go:372 +0x61b fp=0xc2081154b8 sp=0xc208115370
path/filepath.walk(0xc2080acf40, 0x32, 0x12a9068, 0xc208060f00, 0xc2081157d0, 0x0, 0x0)
/usr/local/go/src/path/filepath/path.go:372 +0x61b fp=0xc208115600 sp=0xc2081154b8
path/filepath.Walk(0xc2080acf40, 0x32, 0xc2081157d0, 0x0, 0x0)
/usr/local/go/src/path/filepath/path.go:394 +0x118 fp=0xc208115678 sp=0xc208115600
main.matchPackages(0x7fff5fbff51b, 0x11, 0x0, 0x0, 0x0)
/usr/local/go/src/cmd/go/main.go:577 +0x728 fp=0xc208115810 sp=0xc208115678
main.allPackages(0x7fff5fbff51b, 0x11, 0x0, 0x0, 0x0)
/usr/local/go/src/cmd/go/main.go:481 +0x75 fp=0xc2081158e0 sp=0xc208115810
main.importPaths(0xc20808e4c0, 0x1, 0x1, 0x0, 0x0, 0x0)
/usr/local/go/src/cmd/go/main.go:329 +0x396 fp=0xc2081159e0 sp=0xc2081158e0
main.packagesAndErrors(0xc20800a050, 0x1, 0x1, 0x0, 0x0, 0x0)
/usr/local/go/src/cmd/go/pkg.go:899 +0x251 fp=0xc208115b08 sp=0xc2081159e0
main.packagesForBuild(0xc20800a050, 0x1, 0x1, 0x0, 0x0, 0x0)
/usr/local/go/src/cmd/go/pkg.go:919 +0x85 fp=0xc208115c28 sp=0xc208115b08
main.runInstall(0x812dc0, 0xc20800a050, 0x1, 0x1)
/usr/local/go/src/cmd/go/build.go:330 +0x66 fp=0xc208115d78 sp=0xc208115c28
main.main()
/usr/local/go/src/cmd/go/main.go:163 +0x851 fp=0xc208115f98 sp=0xc208115d78
runtime.main()
/usr/local/go/src/runtime/proc.go:63 +0xf3 fp=0xc208115fe0 sp=0xc208115f98
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:2232 +0x1 fp=0xc208115fe8 sp=0xc208115fe0
goroutine 5 [syscall]:
os/signal.loop()
/usr/local/go/src/os/signal/signal_unix.go:21 +0x2d
created by os/signal.init·1
/usr/local/go/src/os/signal/signal_unix.go:27 +0x43
go tool dist: FAILED: /Users/zephiro/.gvm/gos/go1.4/bin/go install -gcflags=-l -tags=math_big_pure_go -v bootstrap/cmd/...: exit status 2
Binary version doesn't run on macos 10.13.2:
$ gvm install go1.4 -B
Installing go1.4 from binary source
$ gvm use go1.4
Now using version go1.4
$ go version
failed MSpanList_Insert 0x1604000 0x3664e9fcff90c 0x0
fatal error: MSpanList_Insert
runtime stack:
runtime.throw(0x7ffa6b)
/usr/local/go/src/runtime/panic.go:491 +0xad fp=0x7ffeefbff270 sp=0x7ffeefbff240
runtime.MSpanList_Insert(0x82af28, 0x1604000)
/usr/local/go/src/runtime/mheap.c:692 +0x8f fp=0x7ffeefbff298 sp=0x7ffeefbff270
MHeap_FreeSpanLocked(0x827b20, 0x1604000, 0x100)
/usr/local/go/src/runtime/mheap.c:583 +0x163 fp=0x7ffeefbff2d8 sp=0x7ffeefbff298
MHeap_Grow(0x827b20, 0x8, 0x0)
/usr/local/go/src/runtime/mheap.c:420 +0x1a8 fp=0x7ffeefbff318 sp=0x7ffeefbff2d8
MHeap_AllocSpanLocked(0x827b20, 0x1, 0x122e080)
/usr/local/go/src/runtime/mheap.c:298 +0x365 fp=0x7ffeefbff358 sp=0x7ffeefbff318
mheap_alloc(0x827b20, 0x1, 0x7f0000000012, 0x7fff6525e403)
/usr/local/go/src/runtime/mheap.c:190 +0x121 fp=0x7ffeefbff380 sp=0x7ffeefbff358
runtime.MHeap_Alloc(0x827b20, 0x1, 0x10000000012, 0x977a9)
/usr/local/go/src/runtime/mheap.c:240 +0x66 fp=0x7ffeefbff3b8 sp=0x7ffeefbff380
MCentral_Grow(0x82f898, 0x1233200)
/usr/local/go/src/runtime/mcentral.c:197 +0x8b fp=0x7ffeefbff420 sp=0x7ffeefbff3b8
runtime.MCentral_CacheSpan(0x82f898, 0x7ffeefbff490)
/usr/local/go/src/runtime/mcentral.c:85 +0x167 fp=0x7ffeefbff458 sp=0x7ffeefbff420
runtime.MCache_Refill(0x1600000, 0x12, 0x7ffeefbff4b0)
/usr/local/go/src/runtime/mcache.c:90 +0xa0 fp=0x7ffeefbff480 sp=0x7ffeefbff458
runtime.mcacheRefill_m()
/usr/local/go/src/runtime/malloc.c:368 +0x57 fp=0x7ffeefbff4a0 sp=0x7ffeefbff480
runtime.onM(0x6a2870)
/usr/local/go/src/runtime/asm_amd64.s:273 +0x9a fp=0x7ffeefbff4a8 sp=0x7ffeefbff4a0
runtime.mallocgc(0x120, 0x590240, 0x0, 0x0)
/usr/local/go/src/runtime/malloc.go:178 +0x85b fp=0x7ffeefbff558 sp=0x7ffeefbff4a8
runtime.newobject(0x590240, 0x1600000)
/usr/local/go/src/runtime/malloc.go:353 +0x49 fp=0x7ffeefbff580 sp=0x7ffeefbff558
runtime.newG(0xb17fa)
/usr/local/go/src/runtime/proc.go:233 +0x2a fp=0x7ffeefbff598 sp=0x7ffeefbff580
allocg(0x817ac0)
/usr/local/go/src/runtime/proc.c:925 +0x1f fp=0x7ffeefbff5a8 sp=0x7ffeefbff598
runtime.malg(0x8000, 0x817e40)
/usr/local/go/src/runtime/proc.c:2106 +0x1f fp=0x7ffeefbff5d8 sp=0x7ffeefbff5a8
runtime.mpreinit(0x818680)
/usr/local/go/src/runtime/os_darwin.c:137 +0x27 fp=0x7ffeefbff5f0 sp=0x7ffeefbff5d8
mcommoninit(0x818680)
/usr/local/go/src/runtime/proc.c:201 +0xc9 fp=0x7ffeefbff618 sp=0x7ffeefbff5f0
runtime.schedinit()
/usr/local/go/src/runtime/proc.c:138 +0x6e fp=0x7ffeefbff640 sp=0x7ffeefbff618
runtime.rt0_go(0x7ffeefbff678, 0x2, 0x7ffeefbff678, 0x0, 0x0, 0x2, 0x7ffeefbff818, 0x7ffeefbff81b, 0x0, 0x7ffeefbff823, ...)
/usr/local/go/src/runtime/asm_amd64.s:95 +0x116 fp=0x7ffeefbff648 sp=0x7ffeefbff640
I'm getting the same.
I'm getting the same too.
Apologize if this is not totally relevant to the OP's question. I came here because I tried to install go1.4 as a bootstrap to install later versions of go, but I only did so because that was what was recommended in the gvm error message. I found that instead I could install go1.1.0.1 from binary instead and it works.
gvm install go1.10.1 -B
gvm install go1.9.5
works for me
I was seeing the same errors as above on my new MBP. @brightredchilli 's solution worked. I simply installed the binary version of 1.11.4:
gvm install go1.11.4 -B.
Confirmed that this go is working for me:
~/Scratch go version
go version go1.11.4 darwin/amd64
~/Scratch which go
/Users/zqk/.gvm/gos/go1.11.4/bin/go
~/Scratch go run hello-world.go
hello world
It seems like installing go1.4 to bootstrap go1.5++ is not necessary. Note that I had no issues with installing go1.4, it was only non-binary go1.5++ that gave me issues unlike OP.
gvm install go1.12 --binary # don't install go1.4
For those who still have troubled to install go because of this issue on latest Mac OS Catalina, you may want to try this step:
Note:
Just incase you already followed the readme file which guided you to install go1.4, i suggest you to remove it first by running gvm uninstall go1.4
1. gvm install go1.8 -B
2. gvm use go1.8 --default
3. export GOROOT_BOOTSTRAP=$GOROOT
4. gvm install go1.13 (whatever version after 1.8 you want to install, in my case i want to use 1.13)
Not necessary vs breaking Did we manage to track a reason why those preinstalled v1.4 instructions would not work ?
Similarly fixed with @afganhalbana steps similar to the above thread.
macOS Catalina 10.15.x
Just tried few versions as the default based go. For compiling go1.18.1 on my old Mac OS High Sierra 10.13.6
1. gvm install go1.10.1 -B
2. gvm use go1.10.1 --default
3. export GOROOT_BOOTSTRAP=$GOROOT
4. gvm install go1.18.1