maddyblue / moggio

A multi-source music player in Go
ISC License
372 stars 24 forks source link

Error while building mog #20

Closed annanay25 closed 9 years ago

annanay25 commented 9 years ago

I'm getting the following error while building mog:

I executed go build

# github.com/mjibson/mog/_third_party/github.com/facebookgo/httpcontrol
_third_party/github.com/facebookgo/httpcontrol/httpcontrol.go:215:4: error: unknown field ‘KeepAlive’ in ‘net.Dialer’
    KeepAlive: t.DialKeepAlive,
    ^
# github.com/mjibson/mog/_third_party/google.golang.org/cloud/compute/metadata
_third_party/google.golang.org/cloud/compute/metadata/metadata.go:54:5: error: unknown field ‘KeepAlive’ in ‘net.Dialer’
     KeepAlive: 30 * time.Second,
     ^
# github.com/mjibson/mog/protocol/stream
protocol/stream/stream.go:137:5: error: unknown field ‘KeepAlive’ in ‘net.Dialer’
     KeepAlive: 30 * time.Second,
     ^
protocol/stream/stream.go:140:3: error: unknown field ‘TLSHandshakeTimeout’ in ‘http.Transport’
   TLSHandshakeTimeout: 10 * time.Second,
   ^
protocol/stream/stream.go:132:13: error: incompatible type for field 1 in struct construction (type has no methods)
  Transport: &http.Transport{
             ^
# github.com/mjibson/mog/server
server/websocket.go:102:6: error: expected operand
  for range c {
      ^
server/websocket.go:102:6: error: expected ‘{’
server/websocket.go:102:6: error: expected ‘;’ or ‘}’ or newline
server/websocket.go:104:1: error: expected declaration
 }
 ^

Sorry, but I couldn't get my hands on install documentation so I logged an issue here. Annanay

maddyblue commented 9 years ago

You need Go 1.4, you're on 1.3.

annanay25 commented 9 years ago

Okay. Wow. I just went through the Go 'net' libraries. Thanks a lot and sorry for the trouble. Annanay

annanay25 commented 9 years ago

Hey, I'm sorry but running cat /usr/local/go/VERSION Gave me:go1.4.2

maddyblue commented 9 years ago

run go version

annanay25 commented 9 years ago

That prints go version xgcc (Ubuntu 4.9.1-0ubuntu1) 4.9.1 linux/amd64

maddyblue commented 9 years ago

I have no idea what go version that is. Until it prints something like the snippet below, I think the current problem is that your go installation is not correct.

% go version
go version go1.4.2 linux/amd64
maddyblue commented 9 years ago

Ah, got it. You are using gccgo, which currently comes with a Go 1.2 implementation. I recommend you switch to a non-gccgo installation. See: https://golang.org/doc/install/gccgo

annanay25 commented 9 years ago

Aah! Okay. I shall do that. Thanks a ton. Annanay