perkeep / perkeep

Perkeep (née Camlistore) is your personal storage system for life: a way of storing, syncing, sharing, modelling and backing up content.
https://perkeep.org/
Apache License 2.0
6.49k stars 448 forks source link

Perkeep won't build with Go 1.11 #1211

Closed hairyhenderson closed 6 years ago

hairyhenderson commented 6 years ago

Trying to build Perkeep for the first time, I saw the following in the docs and assumed Go 1.11 would be OK:

As of revision 2e46fca5cc, Perkeep requires Go 1.10 or newer.

(see https://github.com/perkeep/perkeep/blame/master/website/content/download.md#L18)

The key phrase is "or newer" - it seems like it won't compile with 1.11:

$  go run make.go 
You're using go1.11 != go1.10, which GopherJS requires, and it was not found in /Users/hairyhenderson. You need to specify a go1.10 root in CAMLI_GOPHERJS_GOROOT for building GopherJS.
exit status 1

I think two things could be done to solve this:

  1. the docs could be updated to remove the or newer phrase
  2. the vendored GopherJS could be updated (Go 1.11 is supported as of https://github.com/gopherjs/gopherjs/issues/836)
bradfitz commented 6 years ago

We're in the process of moving to 1.11 now. GopherJS always makes things tricky.

hairyhenderson commented 6 years ago

Thanks @bradfitz!

mpl commented 6 years ago

@hairyhenderson btw, it does already build with Go 1.11. You only have to follow the instruction given in the error message. Is the message not clear enough?

mpl commented 6 years ago

The CL to make everything build under Go 1.11 is here btw: https://perkeep-review.googlesource.com/c/perkeep/+/18326

hairyhenderson commented 6 years ago

@mpl er... I guess it's not 😉

I see You need to specify a go1.10 root in CAMLI_GOPHERJS_GOROOT for building GopherJS., which implies that I need to have Go 1.10 in addition to Go 1.11 installed (which I do not).

Maybe something like You can build GopherJS separately from Perkeep by specifying a go1.10 root in CAMLI_GOPHERJS_GOROOT would be more clear?

Either way, this is the point where I throw my hands up in defeat, download the tarball, and just wait for go1.11 support before I try to compile it myself 😉

myitcv commented 6 years ago

The official GopherJS repo now has Go 1.11 support https://github.com/gopherjs/gopherjs (but is not module-aware)

My fork of GopherJS also has modules support on the go1.11 branch https://github.com/myitcv/gopherjs/tree/go1.11

mpl commented 6 years ago

@myitcv yeah I know. Just waiting for my CL above to be reviewed and merged.

bradfitz commented 6 years ago

Whoops, sorry. I missed that one.

Kyslik commented 6 years ago

Was this resolved? I can not install perkeep because of this very issue.

perkeep--git git:(0cbe4d5) go run make.go
You're using go1.11 != go1.10, which GopherJS requires, and it was not found in /Users/kyslik. You need to specify a go1.10 root in CAMLI_GOPHERJS_GOROOT for building GopherJS.
exit status 1
mpl commented 6 years ago

@Kyslik yes, this issue should be fixed. Are you sure you're using the latest pull of Perkeep?

Kyslik commented 6 years ago

@mpl I guess my bad I am on latest release tag 0.10.

I used brew install parkeep (that put me on 0.10 tag / 0cbe4d5)


I removed the brewed thing and just cloned perkeep to /Users/kyslik/go-default/src/perkeep.org

and got the following

➜  perkeep.org git:(master) go run make.go
perkeep.org/vendor/myitcv.io/gogenerate
perkeep.org/vendor/myitcv.io/react/cmd/reactGen
gopherjs rebuilt at /Users/kyslik/go-default/bin/gopherjs
generated /Users/kyslik/go-default/src/perkeep.org/app/publisher/js/zsearch.go
gopherjs for perkeep.org/app/publisher/js error: exit status 1, ../../../../../usr/local/opt/go/libexec/src/reflect/value.go:673:60: cannot use t (variable of type *rtype) as *funcType value in argument to funcLayout
../../../../../usr/local/opt/go/libexec/src/reflect/value.go:336:21: cannot use methodReceiver(op, v, int(v.flag) >> flagMethodShift) (value of type *rtype) as *funcType value in assignment
exit status 1

Note: I am still on Yosemite, but in theory everything should still work.

mpl commented 6 years ago

@Kyslik yeah, you're now hitting https://github.com/perkeep/perkeep/issues/1227

Kyslik commented 6 years ago

@mpl thanks I will subscribe for that issue.

mpl commented 6 years ago

@Kyslik in case that wasn't clear, you can avoid that issue in the meantime if you use Go 1.11 (and not Go 1.11.1).

Kyslik commented 6 years ago

@mpl gotcha; its not urgent for me; so I will probably wait another few days.

Thank you again.