McKael / madonctl

CLI client for the Mastodon social network API
MIT License
194 stars 9 forks source link

Compilation error on Debian stable #1

Closed bortzmeyer closed 7 years ago

bortzmeyer commented 7 years ago
% sudo  -E go get github.com/McKael/madonctl 
# github.com/gorilla/websocket
/local/go/src/github.com/gorilla/websocket/client_clone_legacy.go:24: unknown tls.Config field 'GetCertificate' in struct literal
/local/go/src/github.com/gorilla/websocket/compression.go:36: undefined: flate.Resetter
# golang.org/x/sys/unix
/local/go/src/golang.org/x/sys/unix/asm_linux_386.s:8 8a: No such file or directory: textflag.h
McKael commented 7 years ago

Which go version?

It looks like this happens with Go < 1.4 and that Debian stable still has Go 1.3... (From https://github.com/adnanh/webhook/issues/96)

I'm using a local Golang installation (on Debian as well), but if you can use the golang package from the backports I guess it should work.

bortzmeyer commented 7 years ago
% go version  
go version go1.3.3 linux/386
McKael commented 7 years ago

OK, it seems the dependencies golang.org/x/sys/unix and github.com/gorilla/websocket do not support Go < 1.4.

I'll add a note to the README.

McKael commented 7 years ago

I've updated the README; please let me know if it still doesn't build with Go v1.5+ (but it should be fine, I've just tested here).

Thanks for the report.

bortzmeyer commented 7 years ago

I do not ask for a port to the old Go package of Debian stable, just for better error messages, such as "please upgrade".

bortzmeyer commented 7 years ago

By the way, it works fine on Debian unstable.

McKael commented 7 years ago

I see two problems with this request:

The biggest: I don't think Golang provides any way to do that with the usual "go get" way of installing a package. I could add a wrapper script but that's not really the Go way of doing things AFAIK...

The other one is that any dependency could break the version assumption, so it might be unreliable as well. So I'd have to start vendoring everything, and I'd rather not to (esp. since vendoring is still a WIP in Go).

Not sure where to go with this, TBH.