Errors when using go get command to install Libbeat


(Brandon Klise) #1

I am attempting to create a simple beat but am running into an issue when trying to install Libbeat. I typed the following command:

$ go get "github.com/elastic/beats/libbeat"

and received the following errors:

# github.com/elastic/beats/libbeat/logp
elastic/beats/libbeat/logp/log.go:145:59: error: reference to undefined identifier ‘log.LUTC’
   flag := log.Ldate | log.Ltime | log.Lmicroseconds | log.LUTC | log.Lshortfile
                                                           ^
# github.com/elastic/go-ucfg
elastic/go-ucfg/variables.go:284:7: error: expected operand
   for range lex {
       ^
elastic/go-ucfg/variables.go:284:7: error: expected ‘{’
elastic/go-ucfg/variables.go:284:7: error: expected ‘;’ or ‘}’ or newline
elastic/go-ucfg/variables.go:282:8: error: argument to go/defer must be function call
  defer func() {
        ^
elastic/go-ucfg/variables.go:286:3: error: expected ‘;’ or newline after top level declaration
  }()
   ^
elastic/go-ucfg/variables.go:288:2: error: expected declaration
  pieces, perr := parseVarExp(lex, pathSep)
  ^
elastic/go-ucfg/variables.go:291:2: error: expected declaration
  err := <-errs
  ^
elastic/go-ucfg/variables.go:292:2: error: expected declaration
  if err != nil {
  ^
elastic/go-ucfg/variables.go:294:2: error: expected declaration
  }
  ^
elastic/go-ucfg/variables.go:297:2: error: expected declaration
  return pieces, perr
  ^
elastic/go-ucfg/variables.go:298:1: error: expected declaration
 }
 ^
elastic/go-ucfg/variables.go:286:2: error: missing return at end of function
  }()
  ^
# github.com/Shopify/sarama
Shopify/sarama/broker.go:73:28: error: reference to undefined identifier ‘tls.DialWithDialer’
    b.conn, b.connErr = tls.DialWithDialer(&dialer, "tcp", b.addr, conf.Net.TLS.Config)
                            ^
Shopify/sarama/broker.go:69:4: error: unknown field ‘KeepAlive’ in ‘net.Dialer’
    KeepAlive: conf.Net.KeepAlive,
    ^
# github.com/klauspost/compress/flate
klauspost/compress/flate/crc32_amd64.s: Assembler messages:
klauspost/compress/flate/crc32_amd64.s:7: Error: no such instruction: `text ·crc32sse(SB),4,$0'
klauspost/compress/flate/crc32_amd64.s:8: Error: junk `(FP)' after expression
klauspost/compress/flate/crc32_amd64.s:8: Error: too many memory references for `movq'
klauspost/compress/flate/crc32_amd64.s:9: Error: too many memory references for `xor'
klauspost/compress/flate/crc32_amd64.s:12: Error: no such instruction: `byte $0xF2'
klauspost/compress/flate/crc32_amd64.s:12: Error: no such instruction: `byte $0x41'
klauspost/compress/flate/crc32_amd64.s:12: Error: no such instruction: `byte $0x0f'
klauspost/compress/flate/crc32_amd64.s:13: Error: no such instruction: `byte $0x38'
klauspost/compress/flate/crc32_amd64.s:13: Error: no such instruction: `byte $0xf1'
klauspost/compress/flate/crc32_amd64.s:13: Error: no such instruction: `byte $0x1a'
klauspost/compress/flate/crc32_amd64.s:15: Error: too many memory references for `mov'
klauspost/compress/flate/crc32_amd64.s:19: Error: no such instruction: `text ·crc32sseAll(SB),4,$0'
klauspost/compress/flate/crc32_amd64.s:20: Error: junk `(FP)' after expression
klauspost/compress/flate/crc32_amd64.s:20: Error: too many memory references for `movq'
klauspost/compress/flate/crc32_amd64.s:21: Error: junk `(FP)' after expression
klauspost/compress/flate/crc32_amd64.s:21: Error: too many memory references for `movq'
klauspost/compress/flate/crc32_amd64.s:22: Error: junk `(FP)' after expression
klauspost/compress/flate/crc32_amd64.s:22: Error: too many memory references for `movq'
klauspost/compress/flate/crc32_amd64.s:26: Error: too many memory references for `movq'
klauspost/compress/flate/crc32_amd64.s:27: Error: bad expression
klauspost/compress/flate/crc32_amd64.s:27: Error: junk `len/4' after expression
klauspost/compress/flate/crc32_amd64.s:28: Error: bad expression
klauspost/compress/flate/crc32_amd64.s:28: Error: junk `len&3' after expression
klauspost/compress/flate/crc32_amd64.s:29: Error: too many memory references for `xor'
klauspost/compress/flate/crc32_amd64.s:31: Error: too many memory references for `test'
klauspost/compress/flate/crc32_amd64.s:35: Error: too many memory references for `movq'
klauspost/compress/flate/crc32_amd64.s:36: Error: too many memory references for `xor'
klauspost/compress/flate/crc32_amd64.s:37: Error: too many memory references for `xor'
klauspost/compress/flate/crc32_amd64.s:38: Error: too many memory references for `xor'

along with others that I removed to shorten the topic.

Should I not be using the go get command to install Libbeat? I'm sure there is an easy solution that I'm unaware of. Any help is greatly appreciated!


(ruflin) #2

The easiest way to create a new beat, is using our beat generator: https://github.com/elastic/beats/tree/master/generate/beat

Besides that I'm somehow surprised by the above errors but I never tried the above myself. Which version of Golang are you using?


(Steffen Siering) #3

what's go version saying? Beats project uses go 1.6 .


(Magnus Bäck) #4

I think I recognize the log.LUTC complaint, in which case the problem is an old Go compiler (as previously noted 1.6 is required).


(Brandon Klise) #5

That was the problem. Thanks for the help!


(system) #6

This topic was automatically closed after 21 days. New replies are no longer allowed.