# ARM64/aarch64 suppport (Debian Linux) for filebeat, metricbeat

**URL:** <https://discuss.elastic.co/t/arm64-aarch64-suppport-debian-linux-for-filebeat-metricbeat/227419>\
**Category:** Beats\
**Created:** [April 9, 2020, 11:27pm UTC](https://discuss.elastic.co/t/arm64-aarch64-suppport-debian-linux-for-filebeat-metricbeat/227419 "2020-04-09T23:27:54Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![siva-eh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/siva-eh/32/66152_2.png) [@siva-eh](https://discuss.elastic.co/u/siva-eh)\
**Post date:** [April 9, 2020, 11:27pm UTC](https://discuss.elastic.co/t/arm64-aarch64-suppport-debian-linux-for-filebeat-metricbeat/227419/1 "2020-04-09T23:27:54Z")

</div>

I have been using rsyslogd as the log forwarder, but I would prefer to use filebeat (and metricbeat). However, arm64/aarch64 is not being built as a standard platform. I installed go, and downloaded v7.6 of beats, but I'm running into compile issues. I suspect these are some sort of settings or environment variables. The error is shown below:

sst@sstgateway:~/go/src/github.com/elastic/beats/filebeat$ make filebeat  
go build -ldflags "-X [github.com/elastic/beats/libbeat/version.buildTime=2020-04-09T23:23:18Z](http://github.com/elastic/beats/libbeat/version.buildTime=2020-04-09T23:23:18Z) -X [github.com/elastic/beats/libbeat/version.commit=d57bcf8684602e15000d65b75afcd110e2b12b59](http://github.com/elastic/beats/libbeat/version.commit=d57bcf8684602e15000d65b75afcd110e2b12b59)"

# [github.com/elastic/beats/libbeat/common/file](http://github.com/elastic/beats/libbeat/common/file)

../libbeat/common/file/helper\_other.go:28:6: SafeFileRotate redeclared in this block  
previous declaration at ../libbeat/common/file/helper\_aix.go:26:44  
make: \*\*\* [../libbeat/scripts/Makefile:122: filebeat] Error 2

It appears to be trying to compile two mutually exclusive files for different operating systems (AIX and Linux). I have gone through the GO environment variables, and they should be correct, but clearly something is amiss. Any help would be gratefully appreciated. I am building this on the target machine.

Thanks

---

<div class="post-metadata">

**Author:** ![jsoriano](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsoriano/32/27920_2.png) [@jsoriano](https://discuss.elastic.co/u/jsoriano)\
**Post date:** [April 10, 2020, 5:53pm UTC](https://discuss.elastic.co/t/arm64-aarch64-suppport-debian-linux-for-filebeat-metricbeat/227419/2 "2020-04-10T17:53:54Z")

</div>

Hey @siva-eh, welcome to discuss!

I wonder why both `helper_other.go` and `helper_aix.go` are being compiled, only one of them should be compiled, what version of go are you using?

In any case I would recommend you to build the packages on your workstation using beats scripts. They use docker with the same parameters and go versions as the distributed binaries.  
For example you can build Filebeat for arm64 using [mage](https://magefile.org/), running the following command from `x-pack/filebeat`:

```auto
PLATFORMS='+all linux/arm64' mage package

```

When this command finishes, you will find the packages in the `build/distributions` directory.

You can find more information about this topic in the following threads:

- [Build 7.0 for arm64 failed](https://discuss.elastic.co/t/build-7-0-for-arm64-failed/222033)
- [File/Packet/Metric beat on Raspi Centos 7 (armhf/armv7l)](https://discuss.elastic.co/t/file-packet-metric-beat-on-raspi-centos-7-armhf-armv7l/184048)

---

<div class="post-metadata">

**Author:** ![siva-eh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/siva-eh/32/66152_2.png) [@siva-eh](https://discuss.elastic.co/u/siva-eh)\
**Post date:** [April 10, 2020, 11:37pm UTC](https://discuss.elastic.co/t/arm64-aarch64-suppport-debian-linux-for-filebeat-metricbeat/227419/3 "2020-04-10T23:37:37Z")

</div>

I originally installed Go version 1.14.2 (which appears to be the latest stable version) for Linux.

At your suggestion, I installed Go on my Mac (same version, different installer). After numerous attempts to get the right directory structure for the source, aligned with the $GOPATH, I was able successfully 'make filebeat'. I then used your suggestion above. I had to install mage. Now I get these errors:

MacBook-Pro:filebeat siva$ PLATFORMS='+all linux/arm64' mage package  
2020/04/10 16:33:17 Found Elastic Beats dir at /Users/siva/SecureStream/Go/src/github.com/elastic/beats  
No fields files for module azureeventhub  
No fields files for module googlepubsub  
No fields files for module httpjson  
Generated fields.yml for filebeat to /Users/siva/SecureStream/Go/src/github.com/elastic/beats/x-pack/filebeat/fields.yml

> > Building filebeat.yml for linux/amd64  
> > Building filebeat.reference.yml for linux/amd64  
> > Building filebeat.docker.yml for linux/amd64  
> > 2020/04/10 16:33:21 Found Elastic Beats dir at /Users/siva/SecureStream/Go/src/github.com/elastic/beats  
> > package ran for 4.531542443s  
> > Error: docker is not available: failed to run "docker info -f {{ json .}}: exec: "docker": executable file not found in $PATH"  
> > docker is not available: failed to run "docker info -f {{ json .}}: exec: "docker": executable file not found in $PATH"

It appears that I might need to install docker - correct? It's unclear to me both how and why this is needed, since I was not planning to use docker on the target machine.

Thanks again for continued assistance. Great progress with your help so far.

---

<div class="post-metadata">

**Author:** ![jsoriano](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsoriano/32/27920_2.png) [@jsoriano](https://discuss.elastic.co/u/jsoriano)\
**Post date:** [April 11, 2020, 11:28am UTC](https://discuss.elastic.co/t/arm64-aarch64-suppport-debian-linux-for-filebeat-metricbeat/227419/4 "2020-04-11T11:28:08Z")

</div>

Docker is only needed for `mage package`, on the build machine, this is not needed in the target machine.

---

<div class="post-metadata">

**Author:** ![siva-eh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/siva-eh/32/66152_2.png) [@siva-eh](https://discuss.elastic.co/u/siva-eh)\
**Post date:** [April 12, 2020, 9:35pm UTC](https://discuss.elastic.co/t/arm64-aarch64-suppport-debian-linux-for-filebeat-metricbeat/227419/5 "2020-04-12T21:35:20Z")

</div>

Unfortunately, there is no build/distributions directory,and thus no result. Am I looking in the wrong place, or is this error causing the build to fail?  
Thanks again

---

<div class="post-metadata">

**Author:** ![siva-eh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/siva-eh/32/66152_2.png) [@siva-eh](https://discuss.elastic.co/u/siva-eh)\
**Post date:** [April 12, 2020, 9:55pm UTC](https://discuss.elastic.co/t/arm64-aarch64-suppport-debian-linux-for-filebeat-metricbeat/227419/6 "2020-04-12T21:55:26Z")

</div>

NM - I installed Docker on the Mac, and voilà - distributions are built. On to installing and testing. Many thanks!

---

<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:** [May 10, 2020, 11:55pm UTC](https://discuss.elastic.co/t/arm64-aarch64-suppport-debian-linux-for-filebeat-metricbeat/227419/7 "2020-05-10T23:55:32Z")

</div>

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