Issue building auditbeat

Is anyone else having issues building auditbeat in the 6.6 or 6.7 branch? Here is an example of building auditbeat in the 6.6 branch. I do not see this issue in the 7.0 branch.

# git branch
* 6.6
  6.7
  7.0
  master

# mage -v build
Running target: Build
>> build: Building auditbeat
exec: git rev-parse HEAD
Adding build environment vars: map[CGO_ENABLED:1]
exec: go build -o auditbeat -ldflags -X github.com/elastic/beats/libbeat/version.commit=e5124f2e4cc6c1f07604bd0efa52c1260baddcbb -X github.com/elastic/beats/libbeat/version.buildTime=2019-03-18T16:41:04Z
# github.com/elastic/beats/auditbeat
github.com/elastic/beats/vendor/golang.org/x/crypto/blake2b.supportsAVX2: relocation target runtime.support_avx2 not defined
github.com/elastic/beats/vendor/golang.org/x/crypto/blake2b.supportsAVX: relocation target runtime.support_avx not defined
Error: running "go build -o auditbeat -ldflags -X github.com/elastic/beats/libbeat/version.commit=e5124f2e4cc6c1f07604bd0efa52c1260baddcbb -X github.com/elastic/beats/libbeat/version.buildTime=2019-03-18T16:41:04Z" failed with exit code 2
# go version
go version go1.11.5 linux/amd64

# mage -version
Mage Build Tool v1.8.0-10-g8dce728
Build Date: 2019-03-18T15:50:17Z
Commit: 8dce728
built with: go1.11.5

Hi @mikemadden42,

Welcome!

I'm able to reproduce this locally on my Mac OS X laptop with the 6.7 branch as well. Incidentally, the issue does not occur on the 7.0, 7.x, or master branches.

I'll post any more information if/when I have it.

Cheers,

Shaunak

The 6.7 branch uses golang version 1.10.8 (see https://github.com/elastic/beats/blob/6.7/.go-version). If you try to build with that, it should succeed. It did on mine:

auditbeat [6.7] $ go version
go version go1.10.8 darwin/amd64
auditbeat [6.7] $ mage build
>> build: Building auditbeat

Hi @shaunak, thanks for the information. You made a great observation that go 1.10.8 was used to build the 6.7 branch. I'll try building with with go 1.10.8.

I've confirmed that I can build the 6.7 branch in a docker container with go 1.10.8. Thanks @shaunak for your help.

[root@2bedff55a079 auditbeat]# git branch
* 6.7
  master
[root@2bedff55a079 auditbeat]# go version
go version go1.10.8 linux/amd64
[root@2bedff55a079 auditbeat]# mage -version
Mage Build Tool v1.8.0-10-g8dce728
Build Date: 2019-03-18T15:50:17Z
Commit: 8dce728
built with: go1.11.5
[root@2bedff55a079 auditbeat]# mage -v build
Running target: Build
>> build: Building auditbeat
exec: git rev-parse HEAD
Adding build environment vars: map[CGO_ENABLED:1]
exec: go build -o auditbeat -ldflags -X github.com/elastic/beats/libbeat/version.buildTime=2019-03-19T01:59:08Z -X github.com/elastic/beats/libbeat/version.commit=a86145962d2a35759f5a4766e6e4b383ba6c6846
[root@2bedff55a079 auditbeat]# echo $?
0

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.