Hi,
I am developing a new beat and followed docs at https://www.elastic.co/guide/en/beats/devguide/6.6/creating-beat-from-metricbeat.html.
$ pwd
/Users/bob/workspace/go.ws/src/github.com/elastic/beats
$ git branch
* 6.6
master
$ uname -spr
Darwin 16.7.0 i386
$ go version
go version go1.11.5 darwin/amd64
$python --version
Python 2.7.15
$ virtualenv --version
16.4.0
$ docker --version
Docker version 18.09.2, build 6247962
I am at root folder of newly created beat , make setup
, make update
, make
works fine and I am able to run my new beat in my laptop, only the release
target fails.
Any help is highly appreciated,
$ make release -d
...
>> golangCrossBuild: Building for windows/amd64
>> buildGoDaemon: Building for linux/amd64
>> buildGoDaemon: Building for linux/386
>> golangCrossBuild: Building for linux/386
>> Building using: cmd='build/mage-linux-amd64 buildGoDaemon', env=[CC=gcc, CXX=g++, GOARCH=386, GOARM=, GOOS=linux, PLATFORM_ID=linux-386]
>> Building using: cmd='build/mage-linux-amd64 buildGoDaemon', env=[CC=gcc, CXX=g++, GOARCH=amd64, GOARM=, GOOS=linux, PLATFORM_ID=linux-amd64]
build/mage-linux-amd64: 1: build/mage-linux-amd64: Syntax error: "(" unexpected
Error: failed building for linux/386: exit status 2
failed building for linux/386: exit status 2
build/mage-linux-amd64: 1: build/mage-linux-amd64: Syntax error: "(" unexpected
Error: failed building for linux/amd64: exit status 2
failed building for linux/amd64: exit status 2
>> Building using: cmd='build/mage-linux-amd64 golangCrossBuild', env=[CC=x86_64-w64-mingw32-gcc, CXX=x86_64-w64-mingw32-g++, GOARCH=amd64, GOARM=, GOOS=windows, PLATFORM_ID=windows-amd64]
sh: 1: build/mage-linux-amd64: Exec format error
Error: failed building for windows/amd64: exit status 2
failed building for windows/amd64: exit status 2
>> Building using: cmd='build/mage-linux-amd64 golangCrossBuild', env=[CC=gcc, CXX=g++, GOARCH=386, GOARM=, GOOS=linux, PLATFORM_ID=linux-386]
build/mage-linux-amd64: 1: build/mage-linux-amd64: Syntax error: "(" unexpected
Error: failed building for linux/386: exit status 2
failed building for linux/386: exit status 2
>> golangCrossBuild: Building for linux/amd64
>> golangCrossBuild: Building for windows/386
>> golangCrossBuild: Building for darwin/amd64
>> Building using: cmd='build/mage-linux-amd64 golangCrossBuild', env=[CC=gcc, CXX=g++, GOARCH=amd64, GOARM=, GOOS=linux, PLATFORM_ID=linux-amd64]
build/mage-linux-amd64: 1: build/mage-linux-amd64: Syntax error: "(" unexpected
Error: failed building for linux/amd64: exit status 2
failed building for linux/amd64: exit status 2
>> Building using: cmd='build/mage-linux-amd64 golangCrossBuild', env=[CC=o64-clang, CXX=o64-clang++, GOARCH=amd64, GOARM=, GOOS=darwin, PLATFORM_ID=darwin-amd64]
sh: 1: build/mage-linux-amd64: Exec format error
Error: failed building for darwin/amd64: exit status 2
failed building for darwin/amd64: exit status 2
>> Building using: cmd='build/mage-linux-amd64 golangCrossBuild', env=[CC=i686-w64-mingw32-gcc, CXX=i686-w64-mingw32-g++, GOARCH=386, GOARM=, GOOS=windows, PLATFORM_ID=windows-386]
sh: 1: build/mage-linux-amd64: Exec format error
Error: failed building for windows/386: exit status 2
failed building for windows/386: exit status 2
package ran for 18.108525004s
Error: running "docker run --env EXEC_UID=1773838120 --env EXEC_GID=720748206 --rm --env MAGEFILE_VERBOSE= --env MAGEFILE_TIMEOUT= -v /Users/bob/workspace/go.ws/src/github.com/bob/netwitnessbeat:/go/src/github.com/bob/netwitnessbeat -w /go/src/github.com/bob/netwitnessbeat docker.elastic.co/beats-dev/golang-crossbuild:1.10.8-main-debian7 --build-cmd build/mage-linux-amd64 buildGoDaemon -p linux/386" failed with exit code 1
running "docker run --env EXEC_UID=1773838120 --env EXEC_GID=720748206 --rm --env MAGEFILE_VERBOSE= --env MAGEFILE_TIMEOUT= -v /Users/bob/workspace/go.ws/src/github.com/bob/netwitnessbeat:/go/src/github.com/bob/netwitnessbeat -w /go/src/github.com/bob/netwitnessbeat docker.elastic.co/beats-dev/golang-crossbuild:1.10.8-main-debian7 --build-cmd build/mage-linux-amd64 buildGoDaemon -p linux/amd64" failed with exit code 1
running "docker run --env EXEC_UID=1773838120 --env EXEC_GID=720748206 --rm --env MAGEFILE_VERBOSE= --env MAGEFILE_TIMEOUT= -v /Users/bob/workspace/go.ws/src/github.com/bob/netwitnessbeat:/go/src/github.com/bob/netwitnessbeat -w /go/src/github.com/bob/netwitnessbeat docker.elastic.co/beats-dev/golang-crossbuild:1.10.8-main --build-cmd build/mage-linux-amd64 golangCrossBuild -p windows/amd64" failed with exit code 1
running "docker run --env EXEC_UID=1773838120 --env EXEC_GID=720748206 --rm --env MAGEFILE_VERBOSE= --env MAGEFILE_TIMEOUT= -v /Users/bob/workspace/go.ws/src/github.com/bob/netwitnessbeat:/go/src/github.com/bob/netwitnessbeat -w /go/src/github.com/bob/netwitnessbeat docker.elastic.co/beats-dev/golang-crossbuild:1.10.8-main-debian7 --build-cmd build/mage-linux-amd64 golangCrossBuild -p linux/386" failed with exit code 1
running "docker run --env EXEC_UID=1773838120 --env EXEC_GID=720748206 --rm --env MAGEFILE_VERBOSE= --env MAGEFILE_TIMEOUT= -v /Users/bob/workspace/go.ws/src/github.com/bob/netwitnessbeat:/go/src/github.com/bob/netwitnessbeat -w /go/src/github.com/bob/netwitnessbeat docker.elastic.co/beats-dev/golang-crossbuild:1.10.8-main-debian7 --build-cmd build/mage-linux-amd64 golangCrossBuild -p linux/amd64" failed with exit code 1
running "docker run --env EXEC_UID=1773838120 --env EXEC_GID=720748206 --rm --env MAGEFILE_VERBOSE= --env MAGEFILE_TIMEOUT= -v /Users/bob/workspace/go.ws/src/github.com/bob/netwitnessbeat:/go/src/github.com/bob/netwitnessbeat -w /go/src/github.com/bob/netwitnessbeat docker.elastic.co/beats-dev/golang-crossbuild:1.10.8-darwin --build-cmd build/mage-linux-amd64 golangCrossBuild -p darwin/amd64" failed with exit code 1
running "docker run --env EXEC_UID=1773838120 --env EXEC_GID=720748206 --rm --env MAGEFILE_VERBOSE= --env MAGEFILE_TIMEOUT= -v /Users/bob/workspace/go.ws/src/github.com/bob/netwitnessbeat:/go/src/github.com/bob/netwitnessbeat -w /go/src/github.com/bob/netwitnessbeat docker.elastic.co/beats-dev/golang-crossbuild:1.10.8-main --build-cmd build/mage-linux-amd64 golangCrossBuild -p windows/386" failed with exit code 1
Reaping losing child 0x7fe6bec0de10 PID 22172
make: *** [release] Error 1
Removing child 0x7fe6bec0de10 PID 22172 from chain.