Can't compile beats since 7.6.2

Using the same methods I've been using to compile Beats for Pi since v6, I can no longer compile beats.

GO v1.13.10

I clone the repo, checkout the commit for the release (5e69e25), cd to the beat I want (eg. metricbeat) and then make.

Makefile:84: warning: overriding recipe for target 'integration-tests'
../libbeat/scripts/Makefile:213: warning: ignoring old recipe for target 'integration-tests'
go build -ldflags "-X -X"
# runtime/internal/sys
/usr/share/go/src/runtime/internal/sys/intrinsics_common.go:28:5: ntz8tab redeclared in this block
	previous declaration at /usr/share/go/src/runtime/internal/sys/intrinsics.go:58:5
/usr/share/go/src/runtime/internal/sys/intrinsics_common.go:108:7: deBruijn64 redeclared in this block
	previous declaration at /usr/share/go/src/runtime/internal/sys/intrinsics.go:11:20
make: *** [../libbeat/scripts/Makefile:133: metricbeat] Error 2

On my macbook where I have Go and Docker, I use this to build for armv7.

# Make sure $GOPATH/bin is on PATH
export PATH=$PATH:"$(go env GOPATH)"
cd metricbeat
git checkout v7.7.0
make mage
PLATFORMS='+all linux/armv7' mage -v package

The packages are in build/distributions. I install the .deb on my rpi.

ls -la build/distributions/
total 146968
drwxr-xr-x   8 akroh  staff       256 May 15 11:51 .
drwxr-xr-x  10 akroh  staff       320 May 15 11:50 ..
-rw-r--r--@  1 akroh  staff  24356032 May 15 11:51 metricbeat-oss-7.7.0-armhf.deb
-rw-r--r--   1 akroh  staff       160 May 15 11:51 metricbeat-oss-7.7.0-armhf.deb.sha512
-rw-r--r--   1 akroh  staff  24141686 May 15 11:51 metricbeat-oss-7.7.0-armhfp.rpm
-rw-r--r--   1 akroh  staff       161 May 15 11:51 metricbeat-oss-7.7.0-armhfp.rpm.sha512
-rw-r--r--   1 akroh  staff  24656644 May 15 11:50 metricbeat-oss-7.7.0-linux-armv7.tar.gz
-rw-r--r--   1 akroh  staff       169 May 15 11:50 metricbeat-oss-7.7.0-linux-armv7.tar.gz.sha512

Thanks! That at least got me started in the right direction i.e. forget trying to keep compiling these things on a Pi 4 and instead just cross-compile on my Mac.

GOOS=linux GOARCH=arm make

Works fine for everything except Packetbeat:

go build -ldflags "-X -X"
sniffer/afpacket_linux.go:26:2: build constraints exclude all Go files in .../src/
make: *** [packetbeat] Error 1

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