# Can't compile beats since 7.6.2

**URL:** https://discuss.elastic.co/t/cant-compile-beats-since-7-6-2/232695
**Category:** Beats
**Created:** [May 14, 2020, 7:12pm UTC](https://discuss.elastic.co/t/cant-compile-beats-since-7-6-2/232695 "2020-05-14T19:12:39Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Aaron\_Abbett](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aaron_abbett/32/63289_2.png) [@Aaron\_Abbett](https://discuss.elastic.co/u/Aaron_Abbett)
#### Post date: [May 14, 2020, 7:12pm UTC](https://discuss.elastic.co/t/cant-compile-beats-since-7-6-2/232695/1 "2020-05-14T19:12:39Z")

</div>

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

GOARCH=arm  
GOOS=linux  
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.

```auto
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 github.com/elastic/beats/libbeat/version.buildTime=2020-05-14T19:02:30Z -X github.com/elastic/beats/libbeat/version.commit=5e69e25b920e3d93bec76a09a31da3ab35a55607"
# 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

```

---

<div class="post-metadata">

### Author: ![andrewkroh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrewkroh/32/3784_2.png) [@andrewkroh](https://discuss.elastic.co/u/andrewkroh)
#### Post date: [May 15, 2020, 3:58pm UTC](https://discuss.elastic.co/t/cant-compile-beats-since-7-6-2/232695/2 "2020-05-15T15:58:47Z")

</div>

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

```auto
# 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.

```auto
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

```

---

<div class="post-metadata">

### Author: ![Aaron\_Abbett](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aaron_abbett/32/63289_2.png) [@Aaron\_Abbett](https://discuss.elastic.co/u/Aaron_Abbett)
#### Post date: [May 19, 2020, 8:24pm UTC](https://discuss.elastic.co/t/cant-compile-beats-since-7-6-2/232695/3 "2020-05-19T20:24:25Z")

</div>

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.

```auto
GOOS=linux GOARCH=arm make

```

Works fine for everything except Packetbeat:

```auto
go build -ldflags "-X github.com/elastic/beats/libbeat/version.buildTime=2020-05-19T20:13:05Z -X github.com/elastic/beats/libbeat/version.commit=d57bcf8684602e15000d65b75afcd110e2b12b59"
sniffer/afpacket_linux.go:26:2: build constraints exclude all Go files in .../src/github.com/elastic/beats/vendor/github.com/tsg/gopacket/afpacket
make: *** [packetbeat] Error 1

```

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [June 16, 2020, 10:25pm UTC](https://discuss.elastic.co/t/cant-compile-beats-since-7-6-2/232695/4 "2020-06-16T22:25:31Z")

</div>

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